Retrieve printer permissions via command

A very special situation happened today,On Windows Server 2012 Adjust the "Security" of a printer in R2,Masaru “Everyone” After changing the "Print" permission from "Allow" to "Deny",It disappeared from the "printer" page,Go to "Device Manager",Also disappear,But the print screen in Excel is still visible,From “\\localhost” I can still see it (Originally opened sharing printing)。Tried to restart Print Spool service and restart,The results are still the same,So I had to try the command mode instead,Change permissions back。

 

◎ First confirm the name of the computer and printer,Here to”MyPC”、”ZM400 (203 dpi) – ZPL” A Case Study,Enter the following command to enter "Printer Content":

rundll32 printui.dll,PrintUIEntry /p /n "\\MyPC\ZM400 (203 dpi) - ZPL"

◎ After the first execution,Since there is no permission,So it will jump out “You do not have access to this printer。Some index labels will not be displayed。”

 

◎ Then there will be a page with only security label,Click "Advanced",Prepare to force back ownership。

 

◎ Enter your account or group,Change the "owner" of this printer to you or your group。

 

◎ After confirmation,Click "OK"

 

◎ Run the following command again to enter the "printer content"

rundll32 printui.dll,PrintUIEntry /p /n "\\MyPC\ZM400 (203 dpi) - ZPL"

◎ At present we are only the owner,But no permission,So it will jump out “You do not have access to this printer。Some index labels will not be displayed。”

 

◎ The complete "Security" setting window appears here,Take my example,The “Everyone” Change the permissions back to "Allow"。

 

◎ After modification,Run the following command again to enter "Printer Properties",The completed content is now visible。

rundll32 printui.dll,PrintUIEntry /p /n "\\MyPC\ZM400 (203 dpi) - ZPL"

 

Actually got the authority back here,But I still don't see this printer on the "Printer" page,Restart Print Spool service is the same (Never tried rebooting),But it can already be seen in "Device Manager",Since I have already installed another one for User to use,So my follow-up action was to remove this printer from the "Device Manager" before finishing。

 

【參考連結】

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.