Enable builtin administrator (override default sysprep behaviour)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
465088b455
commit
b2f607e2b5
@ -183,7 +183,7 @@ Switch ($ovfPropertyValues['deployment.type']) {
|
||||
Force = $True
|
||||
}
|
||||
$SetLocalUserSplat = @{
|
||||
InputObject = $BuiltinAdministrator
|
||||
InputObject = $BuiltinAdministrator
|
||||
Password = ConvertTo-SecureString @ConvertToSecureStringSplat
|
||||
PasswordNeverExpires = $True
|
||||
AccountNeverExpires = $True
|
||||
@ -192,6 +192,12 @@ Switch ($ovfPropertyValues['deployment.type']) {
|
||||
Confirm = $False
|
||||
}
|
||||
Set-LocalUser @SetLocalUserSplat
|
||||
|
||||
$EnableLocalUserSplat = @{
|
||||
InputObject = $BuiltinAdministrator
|
||||
Confirm = $False
|
||||
}
|
||||
Enable-LocalUser @EnableLocalUserSplat
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user