It was a dark and stormy night in the data center. The rain fell in clumps, pounding the roof. "I hope those roof tiles hold tonight." I spoke out loud as I often do. I received the response I expected: a loud CLAP of thunder and more rain.

"I need to get these web servers deployed before morning!" The day was not a good one, filled with one emergency after another. I normally do not mind. The junior administrator staff normally handles the fires, but today was different.

It started at noon with the boss walking into my office. He sat down heavily in the chair I save for honored guests, the one next to the candy bowl. He is in the wrong chair again. He looked up and spoke: "Jason I need a new deployment of web servers on the middle tier by morning. The junior guys are racking the boxes and getting a base operating system deployed. I need 24 new web boxes or the new product launch fails. The developers tell me they can test and launch the site in the morning, but they don't think your department will be ready."

I was watching his right hand as he spoke. He usually manages to steal some of my candy, the candy I put there for special guests. I raised my eyes and smiled. "No problem." He stood with a start, "Good, then I'll see you at the launch in the morning!" With a gruff turn, he left. The rain was beginning to pound the roof harder.

I rose and closed the door to my office. No need to let my secrets slip out to the other IT admins. This was going to be a job for PowerShell Man. "This is going to be easy!" I again said out loud. "I'll grab the computer names from Active Directory, build a PowerShell remote session to them, and then load and run the ServerManager cmdlets to install the web servers. Easy!"

All I need to do is type—SCREAM! LOUD CRASH! "Help! The roof is leaking all over my Windows 7 PC!" The shrill of her voice made my spine freeze. Alice needed my help quickly, so I had better get this problem solved fast.

I also wanted to enable script execution in case I need it later. I enabled “Turn on Script Execution” and set the policy setting to “Allow only signed scripts”. I always sign my scripts to be the most secured. The key can be found at the following location:

Last, if I had Windows Firewall running on those computers, I would need an Inbound Rule because WinRM listens on port 5985. Again, I checked this article to get it right. The key can be found at the following location:

It took me about a minute to set the GPOs, but it would take time for the servers to update the policy—too much time. Alice was in bad shape. Like a sinking ship, she was up to her wheelhouse.

I knew I could restart all the servers with a Windows PowerShell cmdlet, but that is crazy. I just needed to update the policy! LOUD THUNDER CLAP! Gently, I felt a cool touch and a slight whisper in my left ear. The message wasn’t clear so I responded to the haunting voice: “Go to the Bonsai tree in my forest?”

LOUD THUNDER CLAP!

“No, you fool. Do you have BSonPoSH cmdlets for your Active Directory forest!?” Ah, it was The Scripting Guy, Ed Wilson! “Hey Scripting Guy, I don’t have the BSonPoSH cmdlets!” He responded with a gruff grumble, something about me not checking his blog on a regular basis, and then magically on my screen the URL appeared. “Go there and install them.”

Astonished at his power over my computer screen, I gasped, “But how is that going to help me, Scripting Guy?!” I could tell there was a slight pause of exacerbation before he responded.

“Get-Help and Get-Command shall lead you to the solution.” I quickly installed the cmdlets, imported the module (Import-Module BSonPosh) and typed Get-Help GPO.

That’s it! That’s the cmdlet I needed! A quick look at the full help for the cmdlet showed me that –computername expected string input and could be piped to both ByValue and ByPropertyName.

SCREAM! “I’m going to drown!” GURGLE!

I started to stand up and race from the office to save Alice, but, just needed to type one more thing. I imported the modules for ActiveDirectory and BSonPosh, and then updated the policies with the Update-GPO cmdlet:

I ran to Alice’s cube and reached into the murky water. I felt a hand and then a Windows 7 PC. I lifted them both to safety. As I escorted Alice from the building a gentle whisper returned to my left ear.

“Well done. Remember that the Scripting Community has many resources. Spend your time there.”

I sank back into my office chair closing up for the night. “Hey Scripting Guy? Want some candy before you go?”

And with a squeak of the chair opposite me, I knew my Active Directory management experience was just beginning. So many wonderful cmdlets: those by Microsoft, Quest, and of course BSonPoSH can help me manage a better Active Directory and network. The storms cleared and the rain stopped. In the morning, my boss came into the office again and sat in the wrong chair.

“I see you deployed the web servers. Must have taken you all night. Good job.” At that moment, he sneaked a candy, the ones I reserve for special guests.

I want to thank Jason for writing both an entertaining and informative guest article. Join us tomorrow as Guest Blogger Week continues with Thiyagu and part 1 of a two-part blog post about Exchange message headers.