Listing 1: Sample MSH Code
# Minimize every open desktop window.
$(new-object -ac Shell.Application).MinimizeAll()
# Display detailed help for every installed cmdlet.
foreach ($cmd in get-command){ get-help $cmd.Name }
# Get a list of all software categories from the registry.
dir HKLM:/Software
# Display the current day of the year.
[System.DateTime].Now.DayOfYear