Maybe you never “got” VBScript, and perhaps you haven’t been in IT long enough to have ever built a .BAT file. Well guess what – Microsoft rebooted the command prompt. Welcome to the new, easier world of PowerShell.
So your boss reads a blog post about a new malware threat going around and wants to know if the new Hyper-V server down the hall is infected with a particular executable. Sounds like ten minutes of your day you’re not going to get back, right? Time to fire up your RDP client and remote in, wait for it to load your profile, and then into Task Manager, right? Take a screen shot, paste it into MSPaint, and email it to the boss…
WRONG. How about this, instead? At your Windows 7 computer, start PowerShell.exe (it’s installed by default) and type this:
PS:> Get-Process –ComputerName CHI-HYPER-V.GlobalKnowledge.com
(Use your server’s name, of course) Here’s a sample of the results…
Ah ha! Found it! The boss wants the evidence in a file? No problem.
PS:> Get-Process –ComputerName CHI-HYPER-V.GlobalKnowledge.com | Out-File C:\FoundMalware.txt
Done! That was easy — back to developing plans for the corporate-wide IPv6 rollout!
PowerShell needs to be a part of your company’s automation strategy. It takes time-consuming, tedious tasks and makes them easy and fast. Built-in remoting capabilities make it easy to do this check on 50 computers — or 500. And did you notice — I did everything you see here with no variables, no For loops, and no unrecognizable gibberish. Forget everything you fear about scripting, and get to know PowerShell — the first scripting language built just for Windows system administrators!
Microsoft just released the language specification for PowerShell 2.0 under a license that allows it to be implemented on any platform, so we could see PowerShell for Linux, PowerShell for MacOS, maybe even PowerShell for Android. This extends the remarkable manageability benefits of PowerShell beyond Windows into the broader IT market. It will be exciting to see who picks up the ball on this.