Fix non-functioning script

This commit is contained in:
Manuel Thalmann 2024-08-05 22:45:17 +02:00
parent 129b79d33c
commit 6cf83d1a70
2 changed files with 5 additions and 5 deletions

View file

@ -31,7 +31,7 @@ $null = New-Module {
[hashtable] $Arguments [hashtable] $Arguments
) )
$argumentList = { $argumentList = @{
installer = $installHandler; installer = $installHandler;
arguments = $Arguments; arguments = $Arguments;
}; };

View file

@ -57,7 +57,7 @@ Start-SoftwareInstaller @PSBoundParameters `
) )
$path = "$($Key.PSPath)\Software\Microsoft\Lighting"; $path = "$($Key.PSPath)\Software\Microsoft\Lighting";
New-Item $path; $null = New-Item $path;
Set-ItemProperty $path -Name "AmbientLightingEnabled" -Value 0 -Type "DWord"; Set-ItemProperty $path -Name "AmbientLightingEnabled" -Value 0 -Type "DWord";
}; };
} }
@ -75,9 +75,9 @@ Start-SoftwareInstaller @PSBoundParameters `
$contentDeliveryKey = "$winKey\ContentDeliveryManager"; $contentDeliveryKey = "$winKey\ContentDeliveryManager";
$cloudContentKey = "HKLM:\Software\Policies\Microsoft\Windows\CloudContent"; $cloudContentKey = "HKLM:\Software\Policies\Microsoft\Windows\CloudContent";
foreach ($key in @($contentDeliveryKey, $cloudContentKey)) { foreach ($path in @($contentDeliveryKey, $cloudContentKey)) {
if (-not (Test-Path $key)) { if (-not (Test-Path $path)) {
$null = New-Item $key; $null = New-Item $path;
} }
} }