Fix format of resulting .xml file

This commit is contained in:
Manuel Thalmann 2023-06-22 16:50:40 +02:00
parent 95e770f4c9
commit 10e205c122

View file

@ -24,6 +24,7 @@ $specializeSettings.SelectSingleNode("./ua:component[@name='Microsoft-Windows-Sh
$oobeSystemSettings = Get-PassSettings "oobeSystem"; $oobeSystemSettings = Get-PassSettings "oobeSystem";
$oobeSystemSettings.SelectSingleNode("./ua:component/ua:FirstLogonCommands/ua:SynchronousCommand[last()]/ua:CommandLine", $namespace).InnerText += "`npwsh 'PortValhalla/$env:SETUP_SCRIPT_NAME';"; $oobeSystemSettings.SelectSingleNode("./ua:component/ua:FirstLogonCommands/ua:SynchronousCommand[last()]/ua:CommandLine", $namespace).InnerText += "`npwsh 'PortValhalla/$env:SETUP_SCRIPT_NAME';";
$unattendedConfig.PreserveWhitespace = $true;
$unattendedConfig.Save("$drive\Autounattend.xml"); $unattendedConfig.Save("$drive\Autounattend.xml");
Write-Warning "Attention: This program will completely wipe your current disk #1 and install Windows on it. Are you sure you want to do this?" Write-Warning "Attention: This program will completely wipe your current disk #1 and install Windows on it. Are you sure you want to do this?"