I got the fallowing code but it doesnt do anything and I don't get any errors. Appreciate any help.
$Srv = "."$print = ([WMICLASS]"\\$Srv\ROOT\cimv2:Win32_Printer").createInstance()
$print.drivername = $drv32
$print.PortName = $PortName
$print.Shared = $Shared
$print.Sharename = $ShareName
$print.Location = $Loc
$print.Comment = $Comment
$print.DeviceID = $deviceID
$print.Put()