Do PowerShell Demos in the ISE

PowerShell Team

Jeffry Snover and many other have used Start-Demo in powershell.exe

Continuing the tradition, we now have ISEDemo.psm1

To use it, start ISE and run
Import-Module ISEDemo.psm1 #(attached)
Start-Demo c:\path\to\demofile.txt

  1. Type enter to execute the command once its finished typing
  2. You can escape to clear and type some other command
  3. To get the next command again, execute a blank enter
  4. To skip, execute s or Move-SkipCommand
  5. To go back, execute b or Move-PreviousCommand
  6. To dump the demo contents, execute d or Write-DemoDump
  7. Stop-Demo returns you to a clean state

Demo files look like

# Get 10 lowest handle count processes
gps | sort handles | select -first 10

# Import all available modules
Get-Module -ListAvailable | Import-Module

Ibrahim Abdul Rahim [MSFT]
Windows PowerShell Test
This posting is provided “AS IS” with no warranties.



Discussion is closed.

Feedback usabilla icon