[Windows-2025] Enable permission inheritance for the C: drive (#12467)

This commit is contained in:
Alexey-Ayupov
2025-06-30 17:30:31 +02:00
committed by GitHub
parent 27d8a9d902
commit 0790ef6e2a

View File

@@ -36,6 +36,14 @@ if ($LASTEXITCODE -ne 0) {
throw "Failed to grant Users full control of $env:SystemRoot\Temp"
}
# Enable inheritance for the entire C:\ drive
if (Test-IsWin25) {
cmd /c "icacls C:\ /inheritance:e /c /q 2>&1" | Out-Null
if ($LASTEXITCODE -ne 0) {
throw "Failed to enable inheritance for C:\ drive"
}
}
# Registry settings
$registrySettings = @(
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"; Name = "AUOptions"; Value = 1; PropertyType = "DWORD" }