At work a colleague of mine was looking to modify printer permissions on a Server 2008 R2 terminal server using PowerShell. And to be honest, it was more difficult to do than I had expected.
So naturally, I started looking if someone had already created a script for this same purpose and eventually I found this great script created by Vadims Podans:
PrinterUtils.ps1 / Functions for advanced printer management
By leveraging this script, permissions were easily modified by adding the following lines:
$name = “Printername”
Get-Printer “localhost” $name | Add-PrinterPermission “corp\Domain Users” 0 “print”
Get-Printer “localhost” $name | Remove-PrinterPermission “everyone”
Get-Printer “localhost” $name
My modified script can be found here: http://bjornhouben-web.sharepoint.com/Lists/Scripts/DispForm.aspx?ID=22
Be sure to check Vadims Podans website for other great resources: http://en-us.sysadmins.lv/
nazir
January 28, 2014 at 23:20
Dear Bjorn Houben ,
How are you ?
please help me how to active this script in win server 2008 r2
Best regards
LikeLike
David
September 24, 2018 at 10:54
The link http://bjornhouben-web.sharepoint.com/Lists/Scripts/DispForm.aspx?ID=22 got permissions denied.
LikeLike
Bjorn Houben
June 4, 2019 at 19:22
Sorry for the late reply, but I uploaded it to GitHub: https://github.com/bjornhouben/blog.bjornhouben.com
LikeLike