Powershell: Adding printer permissions to all network printers
hi gurus,
i've created new sec group , provisioned management access our print server; however, these permissions have not been inherited downward printers themselves. i'm looking script apply these permissions have not had success. any appreciated.
the below i've found during search, not know syntax of sddl access: print, manage printers, manage documents, view server, manage server.
$printers = get-printer -computername $printservername -name bld* foreach ($printer in $printers) { set-printer -computername $printservername -name $printer.name -permissionsddl #fill in permissions here }
thanks in advance.
hi pigtaru,
to add printer permission using security definition description language (sddl), function below may helpful , adds full controll rights sddl.
and run function this:
$permissionsddl = get-printer -full -name test99 | select permissionsddl -expandproperty permissionsddl $newsddl = add-lhsprinterpermissionsddl -account "domain\username" -existingsddl $permissionsddl get-printer -name test99 | set-printer -permissionsddl $newsddl -verbosehope helps.
Windows Server > Windows PowerShell
Comments
Post a Comment