Input Box Pop-up
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null
$Value = [Microsoft.VisualBasic.Interaction]::InputBox("Enter a value", "Title", $null)
Details
Displays a pop-up box that prompts the user to enter a value. The value entered is then saved to a variable in the script.
  |  
Yes/No Prompt
$yes = new-Object System.Management.Automation.Host.ChoiceDescription "&Yes","help"
$no = new-Object System.Management.Automation.Host.ChoiceDescription "&No","help"
$choices = [System.Management.Automation.Host.ChoiceDescription[]]($yes,$no)
$answer = $host.ui.PromptForChoice("Prompt","Click yes to continue",$choices,0)

if($answer -eq 0){
    Write-Host "You clicked Yes"
}elseif($answer -eq 1){
    Write-Host "You clicked No"
}
Details
Creates a Yes/No prompt and provides an example of taking actions based on the answer selected.
  |  |