diff --git a/scripts/Windows/OS/User.ps1 b/scripts/Windows/OS/User.ps1 index 70cc07fb..7c02ddc7 100644 --- a/scripts/Windows/OS/User.ps1 +++ b/scripts/Windows/OS/User.ps1 @@ -78,8 +78,8 @@ function Set-UACState([bool] $value) { function Enable-UACNextLogin([Context] $context) { Set-UACState $true; $tempTask = "PortValhalla Temp"; - $autoLoginTrigger = Get-Random; - $uacDisablerTrigger = Get-Random; + $autoLoginTrigger = Get-Random -Maximum 65535; + $uacDisablerTrigger = Get-Random -Maximum 65535; $key = Get-SystemPolicyKey; $context.Set($autoLoginTriggerProperty, $autoLoginTrigger, "DWord");