I am pretty new to PowerShell and just wondering what it can enable for me. I am hoping that will the proper remoting/session setup, I can sit in my office and run powershell code across all the teacher computers in my school at the same time. The first use case would be to install printers (by calling vb scripts), but it could be anything.
Thanks for the recommendation! I read the whole book. I would love to continue this discussion, specifically in regards to printing. Our domain is not set up yet so it’s hard to test remoting.
Basically I am planning two scripts. One uses copy-item to copy drivers from a file share to the local c drive.
The next calls on some vbscript to install the printer and looks like this:
Lines that start with # in PowerShell are comments for humans only. The computer ignores them.
The dollar sign ($) is used for variables in PowerShell. We might add variables latter; it gets kind of tricky.
The first line creates a printer port.
The second line installs the print driver.
The third line installs the new printer.
C163 Computer Lab Printer
cscript “C:\Windows\System32\Printing_Admin_Scripts\en-us\PRnport.vbs” -a -r “IP_10.8.50.196” -h “10.8.50.196” -o raw -n 9100
As you can imagine I am going to be writing a lot of scripts!
Any help comments or discussion is appreciated. I am worried about permissions when running these under remoting. The printers must be installed by a local admin and the copy-item command must have permissions to see the file share.