PowerShell Core で確認ダイアログ

以下のコードで実装。

$title = "タイトル"
$message = "メッセージ"
$options = [System.Management.Automation.Host.ChoiceDescription[]](
   (New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "実行する"),
   (New-Object System.Management.Automation.Host.ChoiceDescription "&No", "実行しない")
)
$defaultChoice = 1
$result = $Host.UI.PromptForChoice($title, $message, $options, $defaultChoice)
if ($result -ne 0) { exit }

ちなみに、Command Prompt の pause コマンドは以下で再現出来ます。

Write-Host "続行するには何かキーを押してください...`n"
$host.UI.RawUI.ReadKey() | Out-Null