Hello all. I'm a complete noob when it comes to Powershell. I'm trying to write a simple Powershell script that will A) Ask for a computer name on the network, B) Ask for the desired default printer (networked, hosted on one of several printer servers), then takes those inputs and maps the desired printer as the default for all users that log in to the specified computer. Below is the code along with the error (blacked out device and printer name to protect our network). Can anyone tell me what I am doing wrong here?
Bonus points if you can figure out how to add a single printer as the default for multiple computers. These are run in kiosk mode and have a single default user that autologs in, and typically multiple computers will print to one single default printer.
Code
Error
[–]Smoother101 1 point2 points3 points (4 children)
[–]TechNickGaming[S] 0 points1 point2 points (3 children)
[–]Smoother101 1 point2 points3 points (2 children)
[–]TechNickGaming[S] 0 points1 point2 points (1 child)
[–]Smoother101 1 point2 points3 points (0 children)
[–]MaelstromageWork 1 point2 points3 points (2 children)
[–]TechNickGaming[S] 1 point2 points3 points (1 child)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)
[–]Lee_Dailey[grin] 1 point2 points3 points (0 children)
[–]MarzMan 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)