From ba5c46a8849ad0e3b5ccedf1ff82084a8d6fd173 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 23 Mar 2024 17:31:16 +0100 Subject: [PATCH] Silence unnecessary errors --- scripts/Windows/OS/Setup.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }