diff --git a/scripts/Windows/OS/Setup.ps1 b/scripts/Windows/OS/Setup.ps1 index 9e7f8838..fcfd2f65 100644 --- a/scripts/Windows/OS/Setup.ps1 +++ b/scripts/Windows/OS/Setup.ps1 @@ -43,7 +43,7 @@ $orderElement = $newCommand.SelectSingleNode("./ua:Order", $namespace); $orderElement.InnerText = ([int]($orderElement.InnerText) + 1); $newCommand.SelectSingleNode("./ua:Description", $namespace).InnerText = "Install PowerShell Core and git and run setup script"; -if (Get-Command Initialize-SetupConfig) { +if (Get-Command Initialize-SetupConfig -ErrorAction SilentlyContinue) { Initialize-SetupConfig $unattendedConfig $namespace; }