Allow setting of username, hostname and password

This commit is contained in:
James Stringer 2021-11-17 04:45:35 -08:00
parent 407fb3672f
commit 9127d5e96c
2 changed files with 233 additions and 216 deletions

View File

@ -1,5 +1,5 @@
$params = @{ $params = @{
VMName = "GPU-P" VMName = "GPUP"
SourcePath = "C:\Users\james\Downloads\Win11_English_x64.iso" SourcePath = "C:\Users\james\Downloads\Win11_English_x64.iso"
Edition = 6 Edition = 6
VhdFormat = "VHDX" VhdFormat = "VHDX"
@ -12,9 +12,11 @@
GPUResourceAllocationPercentage = 50 GPUResourceAllocationPercentage = 50
Team_ID = "" Team_ID = ""
Key = "" Key = ""
Username = "GPUVM"
Password = "CoolestPassword!"
Autologon = "true"
} }
Function Setup-ParsecInstall { Function Setup-ParsecInstall {
param( param(
[string]$DriveLetter, [string]$DriveLetter,
@ -47,7 +49,6 @@ param(
Copy-Item -Path $psscriptroot\Machine\Install.ps1 -Destination $DriveLetter\Windows\system32\GroupPolicy\Machine\Scripts\Startup Copy-Item -Path $psscriptroot\Machine\Install.ps1 -Destination $DriveLetter\Windows\system32\GroupPolicy\Machine\Scripts\Startup
} }
Function Add-VMGpuPartitionAdapterFiles { Function Add-VMGpuPartitionAdapterFiles {
param( param(
[string]$hostname = $ENV:COMPUTERNAME, [string]$hostname = $ENV:COMPUTERNAME,
@ -4213,6 +4214,26 @@ VirtualHardDisk
Add-Type -TypeDefinition $code -ReferencedAssemblies "System.Xml","System.Linq","System.Xml.Linq" -ErrorAction SilentlyContinue Add-Type -TypeDefinition $code -ReferencedAssemblies "System.Xml","System.Linq","System.Xml.Linq" -ErrorAction SilentlyContinue
} }
Function Modify-AutoUnattend {
param (
[string]$username,
[string]$password,
[string]$autologon,
[string]$hostname,
[string]$UnattendPath
)
[xml]$xml = get-content -path $UnattendPath
($xml.unattend.settings.component | where-object {$_.autologon}).autologon.password.value = $password
($xml.unattend.settings.component | where-object {$_.autologon}).autologon.username = $username
($xml.unattend.settings.component | where-object {$_.autologon}).autologon.enabled = $autologon
($xml.unattend.settings.component | where-object {$_.UserAccounts}).UserAccounts.LocalAccounts.localaccount.Group = "Administrators"
($xml.unattend.settings.component | where-object {$_.UserAccounts}).UserAccounts.LocalAccounts.localaccount.Name = $username
($xml.unattend.settings.component | where-object {$_.UserAccounts}).UserAccounts.LocalAccounts.localaccount.DisplayName = $username
($xml.unattend.settings.component | where-object {$_.UserAccounts}).UserAccounts.LocalAccounts.localaccount.Password.Value = $password
($xml.unattend.settings.component | where-object {$_.Computername}).Computername = $hostname
$xml.Save("$UnattendPath")
}
function Assign-VMGPUPartitionAdapter { function Assign-VMGPUPartitionAdapter {
param( param(
[string]$VMName, [string]$VMName,
@ -4245,13 +4266,17 @@ param(
[float]$GPUResourceAllocationPercentage, [float]$GPUResourceAllocationPercentage,
[string]$SourcePath, [string]$SourcePath,
[string]$Team_ID, [string]$Team_ID,
[string]$Key [string]$Key,
[string]$username,
[string]$password,
[string]$autologon
) )
Modify-AutoUnattend -username "$username" -password "$password" -autologon $autologon -hostname $VMName -UnattendPath $UnattendPath
Convert-WindowsImage -SourcePath $SourcePath -Edition $Edition -VHDFormat $Vhdformat -VHDPath $VhdPath -DiskLayout $DiskLayout -UnattendPath $UnattendPath -GPUName $GPUName -Team_ID $Team_ID -Key $Key| Out-Null Convert-WindowsImage -SourcePath $SourcePath -Edition $Edition -VHDFormat $Vhdformat -VHDPath $VhdPath -DiskLayout $DiskLayout -UnattendPath $UnattendPath -GPUName $GPUName -Team_ID $Team_ID -Key $Key| Out-Null
New-VM -Name $VMName -MemoryStartupBytes $MemoryAmount -VHDPath $VhdPath -Generation 2 -SwitchName "Default Switch" | Out-Null New-VM -Name $VMName -MemoryStartupBytes $MemoryAmount -VHDPath $VhdPath -Generation 2 -SwitchName "Default Switch" | Out-Null
Set-VM -Name $VMName -ProcessorCount $CPUCores -CheckpointType Disabled -LowMemoryMappedIoSpace 3GB -HighMemoryMappedIoSpace 32GB -GuestControlledCacheTypes $true -AutomaticStopAction ShutDown Set-VM -Name $VMName -ProcessorCount $CPUCores -CheckpointType Disabled -LowMemoryMappedIoSpace 3GB -HighMemoryMappedIoSpace 32GB -GuestControlledCacheTypes $true -AutomaticStopAction ShutDown
Set-VMMemory -VMName $VMName -DynamicMemoryEnabled $false Set-VMMemory -VMName $VMName -DynamicMemoryEnabled $false
Set-VMProcessor -VMName $VMName -ExposeVirtualizationExtensions $true
Set-VMKeyProtector -VMName $VMName -NewLocalKeyProtector Set-VMKeyProtector -VMName $VMName -NewLocalKeyProtector
Enable-VMTPM -VMName $VMName Enable-VMTPM -VMName $VMName
Add-VMDvdDrive -VMName $VMName -Path $SourcePath Add-VMDvdDrive -VMName $VMName -Path $SourcePath
@ -4259,11 +4284,9 @@ param(
Assign-VMGPUPartitionAdapter -GPUName $GPUName -VMName $VMName -GPUResourceAllocationPercentage $GPUResourceAllocationPercentage Assign-VMGPUPartitionAdapter -GPUName $GPUName -VMName $VMName -GPUResourceAllocationPercentage $GPUResourceAllocationPercentage
} }
New-GPUEnabledVM @params New-GPUEnabledVM @params
Start-VM -Name $params.VMName
Start-VM -Name GPU-P
Read-Host -Prompt "If all went well the Virtual Machine will have started - Read-Host -Prompt "If all went well the Virtual Machine will have started -
you need to approve a certificate install inside the VM you need to approve a certificate install inside the VM

View File

@ -1,204 +1,198 @@
<!--************************************************* <?xml version="1.0" encoding="utf-8"?>
Windows 10 Answer File Generator
Created using Windows AFG found at:
;http://www.windowsafg.com
Installation Notes
Location:
Notes: Enter your comments here...
**************************************************-->
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend"> <unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE"> <settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage> <SetupUILanguage>
<UILanguage>en-US</UILanguage> <UILanguage>en-US</UILanguage>
</SetupUILanguage> </SetupUILanguage>
<InputLocale>0409:00000409</InputLocale> <InputLocale>0409:00000409</InputLocale>
<SystemLocale>en-US</SystemLocale> <SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage> <UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback> <UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-AU</UserLocale> <UserLocale>en-AU</UserLocale>
</component> </component>
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DiskConfiguration> <DiskConfiguration>
<Disk wcm:action="add"> <Disk wcm:action="add">
<DiskID>0</DiskID> <DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk> <WillWipeDisk>true</WillWipeDisk>
<CreatePartitions> <CreatePartitions>
<!-- Windows RE Tools partition --> <!-- Windows RE Tools partition -->
<CreatePartition wcm:action="add"> <CreatePartition wcm:action="add">
<Order>1</Order> <Order>1</Order>
<Type>Primary</Type> <Type>Primary</Type>
<Size>300</Size> <Size>300</Size>
</CreatePartition> </CreatePartition>
<!-- System partition (ESP) --> <!-- System partition (ESP) -->
<CreatePartition wcm:action="add"> <CreatePartition wcm:action="add">
<Order>2</Order> <Order>2</Order>
<Type>EFI</Type> <Type>EFI</Type>
<Size>100</Size> <Size>100</Size>
</CreatePartition> </CreatePartition>
<!-- Microsoft reserved partition (MSR) --> <!-- Microsoft reserved partition (MSR) -->
<CreatePartition wcm:action="add"> <CreatePartition wcm:action="add">
<Order>3</Order> <Order>3</Order>
<Type>MSR</Type> <Type>MSR</Type>
<Size>128</Size> <Size>128</Size>
</CreatePartition> </CreatePartition>
<!-- Windows partition --> <!-- Windows partition -->
<CreatePartition wcm:action="add"> <CreatePartition wcm:action="add">
<Order>4</Order> <Order>4</Order>
<Type>Primary</Type> <Type>Primary</Type>
<Extend>true</Extend> <Extend>true</Extend>
</CreatePartition> </CreatePartition>
</CreatePartitions> </CreatePartitions>
<ModifyPartitions> <ModifyPartitions>
<!-- Windows RE Tools partition --> <!-- Windows RE Tools partition -->
<ModifyPartition wcm:action="add"> <ModifyPartition wcm:action="add">
<Order>1</Order> <Order>1</Order>
<PartitionID>1</PartitionID> <PartitionID>1</PartitionID>
<Label>WINRE</Label> <Label>WINRE</Label>
<Format>NTFS</Format> <Format>NTFS</Format>
<TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID> <TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID>
</ModifyPartition> </ModifyPartition>
<!-- System partition (ESP) --> <!-- System partition (ESP) -->
<ModifyPartition wcm:action="add"> <ModifyPartition wcm:action="add">
<Order>2</Order> <Order>2</Order>
<PartitionID>2</PartitionID> <PartitionID>2</PartitionID>
<Label>System</Label> <Label>System</Label>
<Format>FAT32</Format> <Format>FAT32</Format>
</ModifyPartition> </ModifyPartition>
<!-- MSR partition does not need to be modified --> <!-- MSR partition does not need to be modified -->
<ModifyPartition wcm:action="add"> <ModifyPartition wcm:action="add">
<Order>3</Order> <Order>3</Order>
<PartitionID>3</PartitionID> <PartitionID>3</PartitionID>
</ModifyPartition> </ModifyPartition>
<!-- Windows partition --> <!-- Windows partition -->
<ModifyPartition wcm:action="add"> <ModifyPartition wcm:action="add">
<Order>4</Order> <Order>4</Order>
<PartitionID>4</PartitionID> <PartitionID>4</PartitionID>
<Label>OS</Label> <Label>OS</Label>
<Letter>C</Letter> <Letter>C</Letter>
<Format>NTFS</Format> <Format>NTFS</Format>
</ModifyPartition> </ModifyPartition>
</ModifyPartitions> </ModifyPartitions>
</Disk> </Disk>
</DiskConfiguration> </DiskConfiguration>
<ImageInstall> <ImageInstall>
<OSImage> <OSImage>
<InstallTo> <InstallTo>
<DiskID>0</DiskID> <DiskID>0</DiskID>
<PartitionID>4</PartitionID> <PartitionID>4</PartitionID>
</InstallTo> </InstallTo>
<InstallToAvailablePartition>false</InstallToAvailablePartition> <InstallToAvailablePartition>false</InstallToAvailablePartition>
</OSImage> </OSImage>
</ImageInstall> </ImageInstall>
<UserData> <UserData>
<ProductKey> <ProductKey>
<!-- Do not uncomment the Key element if you are using trial ISOs --> <!-- Do not uncomment the Key element if you are using trial ISOs -->
<!-- You must uncomment the Key element (and optionally insert your own key) if you are using retail or volume license ISOs --> <!-- You must uncomment the Key element (and optionally insert your own key) if you are using retail or volume license ISOs -->
<Key></Key> <Key>
<WillShowUI>Never</WillShowUI> </Key>
</ProductKey> <WillShowUI>Never</WillShowUI>
<AcceptEula>true</AcceptEula> </ProductKey>
<FullName>GPU-P</FullName> <AcceptEula>true</AcceptEula>
<Organization></Organization> <FullName>GPU-P</FullName>
</UserData> <Organization>
</component> </Organization>
</settings> </UserData>
<settings pass="offlineServicing"> </component>
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> </settings>
<EnableLUA>true</EnableLUA> <settings pass="offlineServicing">
</component> <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
</settings> <EnableLUA>true</EnableLUA>
<settings pass="generalize"> </component>
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> </settings>
<SkipRearm>1</SkipRearm> <settings pass="generalize">
</component> <component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
</settings> <SkipRearm>1</SkipRearm>
<settings pass="specialize"> </component>
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> </settings>
<InputLocale>0409:00000409</InputLocale> <settings pass="specialize">
<SystemLocale>en-AU</SystemLocale> <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UILanguage>en-AU</UILanguage> <InputLocale>0409:00000409</InputLocale>
<UILanguageFallback>en-AU</UILanguageFallback> <SystemLocale>en-AU</SystemLocale>
<UserLocale>en-AU</UserLocale> <UILanguage>en-AU</UILanguage>
</component> <UILanguageFallback>en-AU</UILanguageFallback>
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <UserLocale>en-AU</UserLocale>
<SkipAutoActivation>true</SkipAutoActivation> </component>
</component> <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SkipAutoActivation>true</SkipAutoActivation>
<CEIPEnabled>0</CEIPEnabled> </component>
</component> <component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <CEIPEnabled>0</CEIPEnabled>
<ComputerName>GPU-P</ComputerName> </component>
<ProductKey>W269N-WFGWX-YVC9B-4J6C9-T83GX</ProductKey> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
</component> <ComputerName>GPUP</ComputerName>
</settings> <ProductKey>W269N-WFGWX-YVC9B-4J6C9-T83GX</ProductKey>
<settings pass="oobeSystem"> </component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> </settings>
<AutoLogon> <settings pass="oobeSystem">
<Password> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Value>CoolPassword!:)</Value> <AutoLogon>
<PlainText>true</PlainText> <Password>
</Password> <Value>CoolestPassword!</Value>
<Enabled>true</Enabled> <PlainText>true</PlainText>
<Username>GPUP</Username> </Password>
</AutoLogon> <Enabled>true</Enabled>
<OOBE> <Username>GPUVM</Username>
<HideEULAPage>true</HideEULAPage> </AutoLogon>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> <OOBE>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens> <HideEULAPage>true</HideEULAPage>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<NetworkLocation>Home</NetworkLocation> <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<SkipUserOOBE>true</SkipUserOOBE> <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<SkipMachineOOBE>true</SkipMachineOOBE> <NetworkLocation>Home</NetworkLocation>
<ProtectYourPC>1</ProtectYourPC> <SkipUserOOBE>true</SkipUserOOBE>
</OOBE> <SkipMachineOOBE>true</SkipMachineOOBE>
<UserAccounts> <ProtectYourPC>1</ProtectYourPC>
<LocalAccounts> </OOBE>
<LocalAccount wcm:action="add"> <UserAccounts>
<Password> <LocalAccounts>
<Value>CoolPassword!:)</Value> <LocalAccount wcm:action="add">
<PlainText>true</PlainText> <Password>
</Password> <Value>CoolestPassword!</Value>
<Description></Description> <PlainText>true</PlainText>
<DisplayName>GPUP</DisplayName> </Password>
<Group>Administrators</Group> <Description>
<Name>GPUP</Name> </Description>
</LocalAccount> <DisplayName>GPUVM</DisplayName>
</LocalAccounts> <Group>Administrators</Group>
</UserAccounts> <Name>GPUVM</Name>
<RegisteredOrganization></RegisteredOrganization> </LocalAccount>
<RegisteredOwner>GPU-P</RegisteredOwner> </LocalAccounts>
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet> </UserAccounts>
<FirstLogonCommands> <RegisteredOrganization>
<SynchronousCommand wcm:action="add"> </RegisteredOrganization>
<Description>Allow Scripts</Description> <RegisteredOwner>GPU-P</RegisteredOwner>
<Order>1</Order> <DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
<CommandLine>reg add HKLM\Software\Policies\Microsoft\Windows\Powershell</CommandLine> <FirstLogonCommands>
<RequiresUserInput>false</RequiresUserInput> <SynchronousCommand wcm:action="add">
</SynchronousCommand> <Description>Allow Scripts</Description>
<SynchronousCommand wcm:action="add"> <Order>1</Order>
<Description>Allow Scripts</Description> <CommandLine>reg add HKLM\Software\Policies\Microsoft\Windows\Powershell</CommandLine>
<Order>2</Order> <RequiresUserInput>false</RequiresUserInput>
<CommandLine>reg add HKLM\Software\Policies\Microsoft\Windows\Powershell /v ExecutionPolicy /t REG_SZ /d Unrestricted</CommandLine> </SynchronousCommand>
<RequiresUserInput>false</RequiresUserInput> <SynchronousCommand wcm:action="add">
</SynchronousCommand> <Description>Allow Scripts</Description>
<SynchronousCommand wcm:action="add"> <Order>2</Order>
<Description>Allow Scripts</Description> <CommandLine>reg add HKLM\Software\Policies\Microsoft\Windows\Powershell /v ExecutionPolicy /t REG_SZ /d Unrestricted</CommandLine>
<Order>3</Order> <RequiresUserInput>false</RequiresUserInput>
<CommandLine>reg add HKLM\Software\Policies\Microsoft\Windows\Powershell /v EnableScripts /t REG_DWORD /d 1</CommandLine> </SynchronousCommand>
<RequiresUserInput>false</RequiresUserInput> <SynchronousCommand wcm:action="add">
</SynchronousCommand> <Description>Allow Scripts</Description>
<SynchronousCommand wcm:action="add"> <Order>3</Order>
<Order>4</Order> <CommandLine>reg add HKLM\Software\Policies\Microsoft\Windows\Powershell /v EnableScripts /t REG_DWORD /d 1</CommandLine>
<RequiresUserInput>false</RequiresUserInput> <RequiresUserInput>false</RequiresUserInput>
<CommandLine>cmd /C wmic useraccount where name="GPU-P" set PasswordExpires=false</CommandLine> </SynchronousCommand>
<Description>Password Never Expires</Description> <SynchronousCommand wcm:action="add">
</SynchronousCommand> <Order>4</Order>
</FirstLogonCommands> <RequiresUserInput>false</RequiresUserInput>
<TimeZone>GTB Standard Time</TimeZone> <CommandLine>cmd /C wmic useraccount where name="GPU-P" set PasswordExpires=false</CommandLine>
</component> <Description>Password Never Expires</Description>
</settings> </SynchronousCommand>
</FirstLogonCommands>
<TimeZone>GTB Standard Time</TimeZone>
</component>
</settings>
</unattend> </unattend>