I got the fallowing code but it doesn't do anything and i dont' get any errors. Apreciate 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()