# Skript Download PrinterPermissions
$URL = ‘https://gallery.technet.microsoft.com/scriptcenter/’ +
‘Modify-Printer-Permissions-149ae172/file/116651/1/’ +
‘Set-PrinterPermissions.ps1’
$Target = ‘C:\Temp\Set-PrinterPermissions.ps1’
Start-BitsTransfer -Source $URL -Destination $Target
# Hilfe anzeigen lassen
Get-Help $Target
# Drucker GUI öffnen
rundll32.exe printui.dll,PrintUIEntry /p /n “HP Color Laser MFP 178 179”
# Jeder Berechtigung löschen
$PE = @{
ServerName = ‘Worker’
Remove = $True
AccountName = ‘Jeder’
SinglePrinterName = ‘HP Color Laser MFP 178 179’
}
C:\Temp\Set-PrinterPermissions.ps1 @PE
# Eine AD Sicherheitsgruppe der Sicherheit hinzufügen
$GP = @{
ServerName = ‘Worker’
AccountName = ‘dwp.local\IT’
AccessMask = ‘Print’
SinglePrinterName = ‘HP Color Laser MFP 178 179’
}
C:\Temp\Set-PrinterPermissions.ps1 @GP
# IT Chefs dürfen die Dokumente verwalten
$AD = @{
ServerName = ‘Worker’
AccountName = ‘dwp.local\ITAdmins’
AccessMask = ‘ManageDocuments’
SinglePrinterName = ‘HP Color Laser MFP 178 179’
}
C:\Temp\Set-PrinterPermissions.ps1 @AD
# Drucker GUI zur Überprüfung öffnen
rundll32.exe printui.dll,PrintUIEntry /p /n “HP Color Laser MFP 178 179”