From a06d9085873a48de5d5bd5eca3ebe5605e0f8e45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicklas=20Bj=C3=A4lemark?= <65188814+urizen-source@users.noreply.github.com> Date: Wed, 26 Oct 2022 19:27:36 +0300 Subject: [PATCH] Fix incorrect cmdlet name in the script used by `Restart-Computer` (#18374) --- .../commands/management/Computer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs index e7e185ff8f..e1b06c0bc9 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs @@ -306,7 +306,7 @@ foreach ($computerName in $array[1]) ComputerName = $computerName ScriptBlock = { $true } - SessionOption = NewPSSessionOption -NoMachineProfile + SessionOption = New-PSSessionOption -NoMachineProfile ErrorAction = 'SilentlyContinue' }