-
-
Save anonymous/c9e40043105374c95ab4bc67bd69f1f6 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
[xml]$xml2 = @' | |
<?xml version="1.0" encoding="utf-8"?> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<settings pass="specialize"> | |
<component name="" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"> | |
<Identification> | |
<Credentials> | |
<Username> | |
</Username> | |
<Domain> | |
</Domain> | |
<Password> | |
</Password> | |
</Credentials> | |
<JoinDomain> | |
</JoinDomain> | |
<JoinWorkgroup> | |
</JoinWorkgroup> | |
<MachineObjectOU> | |
</MachineObjectOU> | |
</Identification> | |
</component> | |
<component name="Microsoft-Windows-" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"> | |
<ComputerName> | |
</ComputerName> | |
<ProductKey> | |
</ProductKey> | |
<RegisteredOrganization>xxxx Group Headquarters, IT Services</RegisteredOrganization> | |
</component> | |
</settings> | |
</unattend> | |
'@ | |
$registeredorganization = "PowerShell.org" | |
$xml2.unattend.settings.component.registeredorganization | |
($xml2.unattend.settings.component | Where-Object {$_.Name -eq "Microsoft-Windows-"}).registeredorganization = $registeredorganization | |
$xml2.unattend.settings.component.registeredorganization |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment