Question: Below is the PowerShell syntax to create a mandatory input parameter for a computer name ( see PowerShell syntax below ) [ CmdletBinding ( )
Below is the PowerShell syntax to create a mandatory input parameter for a computer name see PowerShell syntax below
CmdletBinding
param
Parameter Mandatory$True
String $Computername
If a user runs a script with the above PowerShell syntax, what will happen if they DO NOT pass a value to the $Computername parameter?
Group of answer choices
The script will fail with a Red Error
The script will run successfully, ignoring the parameter
The script will prompt the user for a value
The script will run successfully, using LocalHost as a default parameter value
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
