%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell_ise.exe
—————————————————————————————————————————————————————
Set-ItemProperty -Path “HKLM:\Software\Policies\Microsoft\Windows NT\Printers” RegisterSpoolerRemoteRpcEndPoint -Value 1 –Force
$Path = „C:\Windows\System32\spool\drivers“
$Acl = (Get-Item $Path).GetAccessControl(‚Access‘)
$Ar = New-Object System.Security.AccessControl.FileSystemAccessRule(„System“, „Modify“, „ContainerInherit, ObjectInherit“, „None“, „Deny“)
$Acl.AddAccessRule($Ar)
Set-Acl $Path $Acl
Stop-Service -Name „Spooler“
Start-Sleep -s 10
Start-Service -Name „Spooler“
—————————————————————————————————————————————————————
$Path = „C:\Windows\System32\spool\drivers“
$Acl = (Get-Item $Path).GetAccessControl(‚Access‘)
$Ar = New-Object System.Security.AccessControl.FileSystemAccessRule(„System“, „Modify“, „ContainerInherit, ObjectInherit“, „None“, „Deny“)
$Acl.RemoveAccessRule($Ar)
Set-Acl $Path $Acl
Stop-Service -Name „Spooler“
Start-Sleep -s 10
Start-Service -Name „Spooler“
—————————————————————————————————————————————————————
