diff --git a/scripts/Windows/Scripts/Software.ps1 b/scripts/Windows/Scripts/Software.ps1 index a1f16f48..ce1aeef3 100644 --- a/scripts/Windows/Scripts/Software.ps1 +++ b/scripts/Windows/Scripts/Software.ps1 @@ -31,7 +31,7 @@ $null = New-Module { [hashtable] $Arguments ) - $argumentList = { + $argumentList = @{ installer = $installHandler; arguments = $Arguments; }; diff --git a/scripts/Windows/Software/Windows/Manage.ps1 b/scripts/Windows/Software/Windows/Manage.ps1 index c2a1773c..faa2e48d 100644 --- a/scripts/Windows/Software/Windows/Manage.ps1 +++ b/scripts/Windows/Software/Windows/Manage.ps1 @@ -57,7 +57,7 @@ Start-SoftwareInstaller @PSBoundParameters ` ) $path = "$($Key.PSPath)\Software\Microsoft\Lighting"; - New-Item $path; + $null = New-Item $path; Set-ItemProperty $path -Name "AmbientLightingEnabled" -Value 0 -Type "DWord"; }; } @@ -75,9 +75,9 @@ Start-SoftwareInstaller @PSBoundParameters ` $contentDeliveryKey = "$winKey\ContentDeliveryManager"; $cloudContentKey = "HKLM:\Software\Policies\Microsoft\Windows\CloudContent"; - foreach ($key in @($contentDeliveryKey, $cloudContentKey)) { - if (-not (Test-Path $key)) { - $null = New-Item $key; + foreach ($path in @($contentDeliveryKey, $cloudContentKey)) { + if (-not (Test-Path $path)) { + $null = New-Item $path; } }