How to Demo Windows PowerShell with Ease

How to run PowerShell commands as part of a demo.

John Savill

February 26, 2013

1 Min Read
How to Demo Windows PowerShell with Ease

Q: I have a list of Windows PowerShell commands I need to run as part of a demo--how can I enter these commands during a demo?

A: I do a lot of PowerShell demos, and typically I just type out the commands during the demo. This sometimes leads to some typos. Other times I cut and paste commands from Notepad, which is not very smooth. Several scripts on the Internet help run all the commands in a text file, allowing you to press the return key to display the next line in the file, and then press return to actually run the command.

I found a script at the Microsoft MSDN blog. It creates a Start-Demo function. I also found an enhanced version at PoshCode, which does a great job. Download the Start-Demo.ps1 file from the site, place all your commands in a text file, then pass the text file to the Start-Demo.ps1 script. Here's an example, with output:

.Start-Demo.ps1 demo.txtPress ? for help.[0]≥ get-process skydriveHandles  NPM(K)    PM(K)      WS(K) VM(M)   CPU(s)     Id ProcessName-------  ------    -----      ----- -----   ------     -- -----------    599      44    16036      16260   160     5.33   5324 SkyDrive[1]≥ get-service powerStatus   Name               DisplayName------   ----               -----------Running  Power              power[2]≥ Write-Host 'The End'The End1/27/2013 1:54:18 PMPS D:projectsPowerShell>

 

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like