I’m not sure where gbecerra got this script, but it is very nice. And, the reason it was posted on experts-exchange is because it was being executed in PowerShell ISE, which doesn’t support the *-Tracing commands (they are only supported from the command line on the host).
http://www.experts-exchange.com/Programming/Languages/Scripting/Powershell/Q_26769992.html
The only slight improvement that was added to the script was implementing MS Knowledge Base issue 977754 (http://support.microsoft.com/kb/977754). For some odd reason, some of our servers had this problem.
1 |
########################## Implement KB977754 fix ##########################<br># <a href="http://support.microsoft.com/kb/977754">http://support.microsoft.com/kb/977754</a><br>Write-Host "Implementing KB977754 fix"<br><br>$kb977754Files = Get-Item $Env:ALLUSERSPROFILE\Microsoft\Crypto\RSA\MachineKeys\76944fb33636aeddb9590521c2e8815a_*<br>foreach($i in $kb977754Files) {<br> $acl = Get-Acl $i<br> $permissionSet = "NT AUTHORITY\LOCAL SERVICE",”Read”,”Allow”<br> $ar = New-Object system.security.accesscontrol.filesystemaccessrule $permissionSet<br> $acl.SetAccessRule($ar)<br> Set-Acl $i $acl<br>} |
0 comments:
Post a Comment