$message = "Do you want to restart computer now (it is necessary to finish this configuring properly)?"
$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", `
  "Restarts computer."
$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", `
  "Does nothing."
$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)
$result = $host.ui.PromptForChoice($title, $message, $options, 1)
switch ($result) {
  0 {
    Restart-Computer
  }
}
