diff --git a/scripts/Windows/OS/User/Add.ps1 b/scripts/Windows/OS/User/Add.ps1 index ab93873df..c92415aaa 100644 --- a/scripts/Windows/OS/User/Add.ps1 +++ b/scripts/Windows/OS/User/Add.ps1 @@ -154,8 +154,8 @@ function Enable-PersonalUserAutologon([Context] $context, [string] $userName) } } - $context.Set($preparedUsernameProperty, $userName, "ExpandString"); - $context.Set($preparedPasswordProperty, $password, "ExpandString"); + $context.Set($preparedUsernameProperty, $userName); + $context.Set($preparedPasswordProperty, $password); Start-EventDrivenTask $context.Get($autoLoginTriggerProperty); } diff --git a/scripts/Windows/Scripts/Context.ps1 b/scripts/Windows/Scripts/Context.ps1 index 914843b7e..dda31b22c 100644 --- a/scripts/Windows/Scripts/Context.ps1 +++ b/scripts/Windows/Scripts/Context.ps1 @@ -117,7 +117,7 @@ class Context { } [void] SetStage([string] $name) { - $this.Set($this.StagePropertyName, $name, "ExpandString"); + $this.Set($this.StagePropertyName, $name); } [string] GetStage() { @@ -393,7 +393,7 @@ class Context { if ($currentScheme -ne $performanceScheme) { Write-Information "Disabling Power Save mode"; - $this.Set("Power Scheme", $currentScheme, "ExpandString"); + $this.Set("Power Scheme", $currentScheme); powercfg /S 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c; } }