|
| |
#http://www.microsoft.com/technet/scriptcenter/resources/pstips/jan08/pstip0125.mspx
" "
"#########################################################"
#
#
#
" "
" "
" **** You are about to run a powershell script"
" "
" "
" **** Written by Don Wilwol"
" "
" "
" "
" "
"##########################################################"
" "
$title = "Paused Script"
$message = "Do you want to continue?"
$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", `
"Deletes all the files in the folder."
$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", `
"Retains all the files in the folder."
$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)
$result = $host.ui.PromptForChoice($title, $message, $options, 0)
switch ($result)
{
0 {" "
"You selected Yes."
" "
"You will move on."
" " }
1 {"You selected No."}
}
|