Created
July 11, 2016 21:18
-
-
Save mczerniawski/5d9ac4cb9974a206708af18feafa05ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$XMLFile = Get-Content $TemplateUnattendFile -Raw | |
$XmlFileOutput = $XMLFile.Replace('unattendAdministratorHere',$LocalAdministrator).Replace('unattendPasswordHere',$LocalAdministratorPassword) | |
if (-not (Test-Path (Split-Path $OutputUnattendFile -Parent))) { | |
$null = New-Item (Split-Path $OutputUnattendFile -Parent) -ItemType Directory | |
} | |
$XmlFileOutput | Out-File $OutputUnattendFile -Force utf8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment