Enable builtin administrator (override default sysprep behaviour)
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Danny Bessems 2021-04-11 11:46:22 +02:00
parent 465088b455
commit b2f607e2b5

View File

@ -183,7 +183,7 @@ Switch ($ovfPropertyValues['deployment.type']) {
Force = $True Force = $True
} }
$SetLocalUserSplat = @{ $SetLocalUserSplat = @{
InputObject = $BuiltinAdministrator InputObject = $BuiltinAdministrator
Password = ConvertTo-SecureString @ConvertToSecureStringSplat Password = ConvertTo-SecureString @ConvertToSecureStringSplat
PasswordNeverExpires = $True PasswordNeverExpires = $True
AccountNeverExpires = $True AccountNeverExpires = $True
@ -192,6 +192,12 @@ Switch ($ovfPropertyValues['deployment.type']) {
Confirm = $False Confirm = $False
} }
Set-LocalUser @SetLocalUserSplat Set-LocalUser @SetLocalUserSplat
$EnableLocalUserSplat = @{
InputObject = $BuiltinAdministrator
Confirm = $False
}
Enable-LocalUser @EnableLocalUserSplat
} }
} }