PowerShell Fundamentals For Beginners
PowerShell Fundamentals For Beginners
Mike F Robbins
Senior Systems Engineer
What is PowerShell?
Moving entire GUI admin toolset to running PowerShell behind the scenes.
PowerShell Commands are called Cmdlets
PowerShell 1.0
Installed but not enabled on Windows Vista and Server 2008
PowerShell 2.0
Installed by default on Windows 7 and Server 2008 R2
The PowerShell ISE is installed by default on Windows 7
Can be installed on Windows XP and Server 2003 or Higher
PowerShell 3.0
Installed by default on Windows 8 and Server 2012
ISE is installed by default on Windows 8 and Server 2012 GUI
Can be installed on Windows 7 and Server 2008 or Higher
PowerShell Remoting is enabled by default on Server 2012
Want VM Reliability and Uptime?
Hyper-V on Server Core
How do I start PowerShell?
Parameter Sets
Parameters
Mandatory Parameters
Optional Parameters
Named Parameters
Parameter names always start with a dash (-)
Positional Parameters
Switch Parameters
Get-Member
Discover Objects, Properties, and Methods
The Pipeline
Filtering
Filter Left and Filter Often
Whenever possible, try to filter before the first pipeline
Where-Object
Select-Object
Dotted Notation
Sorting
Sort-Object
Formatting
Format Right
Format-Table
Format-List
Scripts
Script Execution Policy
Get-ExecutionPolicy
Set-ExecutionPolicy
Be verbose in your scripts
Syntax
Back Tick (Grave Ascent) is the line continuation and escape charater
Break at the pipe symbol
Cmdlet and parameter names are not case sensitive
Tabbed Expansion & Intellisense
Variables
PowerShell Remoting
Aliases
Aliases are Nick Names
My Blog: mikefrobbins.com or mrpowershell.com
Twitter: @mikefrobbins
Other Resources:
Learn Windows PowerShell in a Month of Lunches Book
Hey, Scripting Guy! Blog (scriptingguys.com)
PowerShell Team Blog (blogs.msdn.com/b/powershell)
PowerShell Community (PowerShell.org)
Scripting Games: PowerShell.org/Games
PowerScripting Podcast: powerscripting.net
youtube.com/powershelldon
Twitter: #PowerShell
Questions?