Calling powershell script server 2008r2 -- Default Printer
I have a 2012r2 print server with about 30 printers that I assign to specific OUs via "launch with Group Policy" from the printer management snapin. I then assign the specific printers to their corresponding OUs. That works fine. However, from what I've read you can't create a default printer if you assign printers that way. So, I created a powershell script, tested it locally (worked) and then went to the specific OU on a 2008r2 server, computer config --> policies --> windows settings --> scripts and added it to the powershell scripts tab and told windows to "run windows powershell scripts first"
The workstations in that particular OU are receiving the GPO with the default printer powershell script however, they aren't setting the default printer. Yet if I run the script locally from the desktop, it works without issue and sets the default printer. All workstations are Windows 7 enterprise. I've attached the power shell script code below (wouldn't allow upload) as well (with server and printer names set to "server" and "printer" for security).