PowerShell Parameters

Parameter declaration can have many options. The one below has been set to require input from the user when executing the script and assigns the value to the variable $computerNames. This allows for programmers to force some type of control to end users.

# Mandatory=$True <-- Statementt says the script requires a input parameter

# Has to appear at the top of the script or function 

# The parameter input will assing the value to the $computerNames variable 
Write-Output $computerNames

#Format for requiring multiple parameters to be entered



Woman Studying