I've been trying to install a network printer using Powershell on Windows 7 so that I can automate the setup of our development machines using Puppet. I found a couple of instructions around but none seem to work in my case.
One of them uses
Add-Printer, which is only available on Windows 8, and the other ones don't seem to do anything:
# First one I tried PS> $net = New-Object -Com WScript.Network PS> $net.AddWindowsPrinterConnection('\\server\name') # Second one: PS> $printer=[WMIClass]"\\.\root\cimv2:Win32_Printer" PS> $printer.AddPrinterConnection("\\server\name")
Am I missing something? Or is there another way of achieving this?