Learn about Windows PowerShell
Summary: The Scripting Wife sees why it is important for IT Pros to learn about Windows PowerShell.
Microsoft Scripting Guy, Ed Wilson, is here. Morning comes early, especially when it is still morning. Today is the Charlotte IT Pro Appreciation Day conference in downtown Charlotte, North Carolina. The Scripting Wife needs to be there early to help with registration, and so I will go along with her. Traversing Charlotte can take nearly two hours depending on traffic. We are getting a real early start to ensure that we are there when we need to be there.
It is oh dark thirty, and I am sitting on the lanai sipping a cup of English Breakfast tea and munching on a left over blueberry scone from yesterday’s bounty. I have my laptop with me, and I am checking the email sent to the firstname.lastname@example.org alias because I will be out of the office all day today due to the conference. I don’t know if I have mentioned this before, but the Scripting Wife is sort of like a bear—she loves to hibernate, and it can be downright dangerous waking a sleeping bear. So I just sort of hope that she has set her alarm on her Windows 7 phone to awaken in time to get to the conference. In the meantime, I am enjoying a bit of early morning solitude.
“You really do not know how to make breakfast, do you?” the Scripting Wife’s voice cut like a hot knife through a stick of warm butter.
“Sometimes I wish you would announce yourself,” I complained as I wiped hot tea off the front of my shirt.
“I just did. You know I am here, don’t you?” she replied in a logical tone of voice. “I was hoping you would have made breakfast, instead of sneaking around and eating the last blueberry scone.”
“It did not have any ownership tags on it that I saw,” I replied rather defensively.
“So what are you up to?” she asked.
“Well, aside from getting ready to go put on a clean shirt, I was reviewing the Scripter email, and thinking about my presentation for today,” I said.
“What are you going to talk about?” she asked.
“Windows PowerShell,” I replied.
“Don’t be a smart alec,” she replied.
“I am going to talk about why it is important for people to learn about Windows PowerShell,” I said.
“OK. Why do you think it is important for people to learn it?” she asked.
“There are a number of reasons. For one thing, it is fun. For example, someone actually wrote a Windows PowerShell version of the old-fashioned Space Invaders game. Here, let me show you,” I said as I turned my laptop so the Scripting Wife could see the screen. I then launched psinvaders.ps1.
“That is cool,” she remarked, “I also know that you have written lots of silly scripts that draw pictures like cats sitting on fences.”
“In addition to being fun,” I said, ignoring her comment about silly scripts, “Windows PowerShell is pretty easy to learn. All the cmdlets use a verb-noun naming convention. For example, if I want to get information about a process it is Get-Process.”
“I know that one,” said the Scripting Wife, “I used that a couple weeks ago when I asked you about easy commands I could teach my friends.”
“If I want to find information about services, I use the Get-Service cmdlet,” I continued.
“I know that one as well. We worked with that one back in February to find service accounts,” she said.
“If I want to shut down my computer, what do I use?” I asked.
“Shutdown-Computer?” she queried.
“You are close. It is Stop-Computer. Remember, we worked with that one last year,” I gently reminded.
“Yeah, I guess so. Now that you mention it, it does make sense.”
“One easy way to learn about the Windows PowerShell cmdlets is to use the Get-Verb command to list all the verbs available to use in Windows PowerShell. Here let me show you,” I said as I leaned over to type on my keyboard, “See, here is the list”.
“Nice,” the Scripting Wife replied.
“But the most important reason is that Windows PowerShell is the management solution moving forward. All of the new Microsoft products are building-in Windows PowerShell cmdlets. It is really important for any IT Pro to learn Windows PowerShell now,” I paused to catch my breath.
“You mean, Learn PowerShell Now Before It Is an Emergency,” quipped the Scripting Wife, as she parodied the name of one of my week long Live Meeting Series.
I smiled, and said, “Absolutely.”
“Why are you still sitting around the lanai? If you are not going to fix breakfast, you can at least take me out for breakfast. But first, you have got to change your shirt. Honestly, you cannot drink a cup of tea without making a mess. I am thinking about fitting you for a bib.”
And with that she left. I am not certain where she went—maybe to find a bib, but I hope not.
Join me tomorrow for more Windows PowerShell cool stuff.
I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at email@example.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.
Ed Wilson, Microsoft Scripting Guy
Hi Teresa, Hi Ed,
I really don't envy you for getting up that early ... that's not my time!!!
In fact I ready slowly and carefully through your blog this time while I had to look-up several words that I haven't heard before, like "scone", "oh dark thirty", "smart aleck" and so on ( you know, I'm german ... )
Well, what I didn't do before, I took a look at Charlotte and found out why you need two hours to traverse the city: There are rather interesting ( strange ) road signs in Charlotte, that may be the reason why ...
YES, the IT-Pros should learn Powershell.
But: NO, they don't ... at least here :-(
Up to now, I haven't seen any Powershell scripts in my company besides the ones, I've written ... and I'm no admin!
But I won't give up! New Microsoft products like Exchange 2010, SQL Server 2008R2, Windows Server 2008R2, ... do have support for Powershell and the next generation of server products will have even more Powershell based management tools.
So, maybe after the games, mayybe next year, maybe later ... I will succeed in spreading the "Powershell word" here :-)
After all: Have a pleasant day and good luck, talking to the IT pros!
@K_Schulte I am glad you enjoyed reading the blog. Yes, it is early ... and yes it takes a while to navigate in Charlotte. The picture in your link is so funny!
At first I was going to argue the point about Charlotte being difficult to navigate then I remembered my high school English teacher complaining about how major roads each had multiple names. For example: North and South Tryon Street is also Route 49, Billy Graham Parkway has another name and I'm not sure I ever figured out where East, West, North and South Blvd actually diverge.
And, I haven't heard or used the word lanai in that context for over 20 years.
It would be important if the functionality in powershell had been simply added to VBScript/JScript instead of trying to turn millions of IT people into the equivalent UNIX shell experts. Yes, Powershell code may be more internally consistent and extremely powerful. This does not prevent it from being a human-factors and productivity disaster for millions of people who simply have to get something done by tomorrow. I'm sure that even Microsoft noticed that Powershell was not universally embraced with glad cries of delight.
Sometimes, change is NOT good.
Your claim is not supported by the great number of Admins who have moved to PowerShell. PowerShell is now almost universal. VBScript and DOS/CMD shell could not be upgraded to do what PowerShell does. PowerShell run on CLR which is more powerful and safer (more secure) than any API based scripting schemes.
PowerShell will execute nearly all batch scripts and can be used to enhance batch scripts. This blog and others like it have demonstrated using PowerShell to squeeze extra functionality out of existing batch scripts and VBScript/WSH scripts. We can even call into VBScript functions in a script file or call PowerShell from VBScript.
PowerShell works almost exactly like a CMD shell and will execute nearly all commands correctly.
PowerShell will run on Mac and Unix. PowerShell can integrate into most OS and applications.
Take a bit more time to research PowerShell and you will see that it is a much needed enhancement to systems management.
I too was reticent about switching to PowerShell, having spend nearly a decade invested in VBScript. However, Ed convinced me to give it a try and reluctantly I did back in 2008/2009. Within a month I had converted over 300 scripts into PowerShell and have been an ardent PowerShell evangelist within my company, and with whomever will listen to me, ever since. Change is scary and frustrating (it was for me), but the results and the value I bring to my company have increased immeasurably since then and I can tie that directly to my conversion to PowerShell. I was even given my company's highest award in 2010 (and flown to Chicago with my wife to stay in a 5-star hotel!!) for the time/money-saving PS scripts I wrote.
You may lose some hours of productivity in the conversion but the ROI is extremely short. If PowerShell isn't technically universally accepted yet, it might as well be. Quit kicking the dead horse of VBScript and join the future. In short: embrace the change and ride the wave, lest you be swallowed by it.
Thank you, PowerShell; I love you! XOXOXO
And what jrv said.