Confirm, WhatIf and Force
- These parameters are used with commands that make changes
Get-Help about_Preference_Variables
- Lets use Confirm Parameter:
- Confirm paramater causes a command to prompt before an action is taken
- Confirm paramater causes a command to prompt before an action is taken
- Confirm Preference: The variable $ConfirmPreference can have four possible values
- High (default)
- Medium
- Low
- None
- Lets Use WhatIf Parmeter.
- Force Parameter: With this parameter it will overwrite any existing blocks (errors)
Providers
- Get-Help from Powershell
Get-Help about_Providers
- At it simplest Providers present access to data that is normally not easily accesible. We have Providers for
- filesystem
- registry
- Certificate Store
- Execute the commands as shown below
Splatting
- This is way of defining the paramters of a command before usage.
- Individual Parameters are written in a hashtable(@{}), then to use the paramter @ symbol is used
Modules and Snap-ins
- Modules and snap-ins are package collection of commands.