Fix non-functioning script
This commit is contained in:
parent
b1544a6a60
commit
e7ced15185
|
@ -31,7 +31,7 @@ $null = New-Module {
|
||||||
[hashtable] $Arguments
|
[hashtable] $Arguments
|
||||||
)
|
)
|
||||||
|
|
||||||
$argumentList = {
|
$argumentList = @{
|
||||||
installer = $installHandler;
|
installer = $installHandler;
|
||||||
arguments = $Arguments;
|
arguments = $Arguments;
|
||||||
};
|
};
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue