So we want to take a CSV file with printer share names and install them to a client. I have some of the script but I have no idea how to import from the csv and create a printer for each object. The CSV only has one column 'PrintShareName'
I am pretty sure the import looks like this
Import-Csv \\gbci02sanct4\apps\common\scripts\printers\gbci91\gbci91.csv | Foreach-Object {
$printer = $_.PrintShareName
-----------------------
How do I get the $PrinterPath variable to be \\printserver\$_.PrintShareName?
$PrinterPath = \\printserver\printer
$net = new-Object -com WScript.Network
$net.AddWindowsPrinterConnection $PrinterPath