Spelunking PowerShell

Where We compare exploring PowerShell to caving…

Jeffery Snover encourages us to explore PowerShell, spelunking I believe he calls it. Spelunking is the art of cave exploring the Urban dictionary has other definitions NSF. Spelunking is pursued due to the great enjoyment practitioner’s experience, Snover wants us to experience the same joy with PowerShell.

Steve Knutson editor of the National Speleological society termed the untrained and inexperienced  as a ‘spelunker’ and denoted  those who were trained and experienced ‘cavers’. Our goal is to go from Spelunker to PowerSheller, I suppose spelunkers probably wear the title like some of us wear the title hacker, and those who see the term as derogatory. For my Brothers in the UK I believe the correct term is Potholer, and you say we yanks screw up the language..

Spelunkers have tools helmets, head lamps, rope, knee and elbow pads and apparently cups thanks @jsnover. These tools help them explore the caves they seek out. PowerShellers have tools too, Get-Help, Get-Command, Help about_*, and don’t forget the helmet or -Whatif  and cup -CONFIRM which are parameters which let you explore safely. Get-Help along with Help about_ are like guidebooks written by the original explorers.

This article will teach the basic use of these tools let’s enter the cave.

Down the Rabbit Hole
Down the Rabbit Hole

Get-Command think of get command as the flashlight which let’s you see in the dark. Caves have features Powershell has cmdlets. These cmdlets follow a basic semantic pattern of verb+noun.

Get-Command
#alias
GCM

Get-Help Get-Help allows you to further explore commands once you’ve discovered them.  Get-Help is like the guidebook that helps you navigated an already discovered cave feature.

Get-Help Get
#Alias
Help
Man

Get-Verb  Gets the list of approved verbs. You can find guidance here https://msdn.microsoft.com/en-us/library/ms714428(v=vs.85).aspx . They get pretty pissy if you deviate… For good reason. Although I wonder if they have a User voice for dictionary adds.
Cavers write guides and maps to the caves they have explored and for PowerShell this guidebook is Get-Verb.

Entering Get-Verb at the PowerShell prompt yields the following truncated, for space ,results.

Get-Verb
Verb        Group
----        -----
Add         Common
Clear       Common
Close       Common
Copy        Common
Enter       Common
Exit        Common
Find        Common
Format      Common
Get         Common
Hide        Common
Join        Common
Lock        Common
Move        Common
New         Common

Help About_*  IF Get-Command is a flashlight, the about _* is the full guidebook. The About topics cover the core topics and concepts of PowerShell.  About topics are part of the help system

Helpful parameters

Helpful comment from the father of PowerShell in terminology

-Whatif  Put on your helmet and add this to parameter as you crawl to end of your Pipeline.

Set-ADForest -Windows2012Forest -Whatif

-Confirm Definitely a cup it’s your last form of protection from a mistake that could indeed leave you breathless

 Set-ADForest -Windows2012Forest -Confirm

These are the basic commands to let you explore the cave that is PowerShell.

Cavers Resources

The cavers Guidebook to PowerShell starts with Learn Windows PowerShell in a Month of Lunches, Third Edition Don Jones@concentrateddon and  Jeff Hicks @JeffHicks . Note this is a MEAP which means the book is being published in chapters. The 2nd Edition can be found on the same site.

Learn PowerShell Toolmaking in a Month of Lunches also by Don Jones and Jeff Hicks also on the Manning Press site.

Lee Holmes @Lee_Holmes PowerShell Cookbook

Video Resources

The video responsible for this mess

Explore PowerShell unplugged with Jeffrey Snover & Don Jones

Stephen Owens Gave his first Big Talk at ignite on the basics of PowerShell and the response was so great he got his own ignite Video

MVP HubTalk Stephen Owen – Intro to PowerShell

Stephen is a real up and comer Check out his blog below in the Link to Fox Deploy in the Blogs I follow section.

 

 

Enjoy!