Windows Classroom Series – 01/Oct/2020

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 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.

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Plugin for Social Media by Acurax Wordpress Design Studio

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%