File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -138,21 +138,21 @@ function Protect-Path
138138 )
139139
140140 Write-Log " Protect-Path: Grant Administrator"
141- cmd .exe / c cacls.exe $path / E / P Administrators:F
141+ icacls .exe $path / grant " Administrators:(OI)(CI)F "
142142 if ($LASTEXITCODE -ne 0 )
143143 {
144144 Throw " Error setting ACL for $path exited with $LASTEXITCODE "
145145 }
146146
147147 Write-Log " Protect-Path: Remove BUILTIN\Users"
148- cmd .exe / c cacls.exe $path / E / R " BUILTIN\Users"
148+ icacls .exe $path / remove " BUILTIN\Users"
149149 if ($LASTEXITCODE -ne 0 )
150150 {
151151 Throw " Error setting ACL for $path exited with $LASTEXITCODE "
152152 }
153153
154154 Write-Log " Protect-Path: Remove BUILTIN\IIS_IUSRS"
155- cmd .exe / c cacls.exe $path / E / R " BUILTIN\IIS_IUSRS"
155+ icacls .exe $path / remove " BUILTIN\IIS_IUSRS"
156156 if ($LASTEXITCODE -ne 0 )
157157 {
158158 Throw " Error setting ACL for $path exited with $LASTEXITCODE "
You can’t perform that action at this time.
0 commit comments