Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

$PrinterList = IMPORT-CSV C:\printersL.csv

$
0
0

 

Need to include a csv file command below

Location.ps1

$printer = Get-WmiObject win32_printer -Comp PPR235QFLS01| Where-Object { $_.name -eq "OTT235Q-354A-X7535" }

$printer.Location = "OTT235QDC"

$printer.Put()

 Also tried

$PrinterList=IMPORT-CSV C:\printer.csv
$USERLIST | FOREACH-OBJECT { $_ }

FOREACH ($Printer in $PrinterList) {
$Location=$Printer.Location
$printer = Get-WmiObject win32_printer -Comp PPR235QFLS01| Where-Object { $_.name -eq "$($Printer.Name)" }
$printer.Location = "$($Printer.Location)"
$printer.Put()
}

I need to update the printer location on roughly 900 printers in print management (Print Management Microsoft Corporation Version: 6.1.7600.16385)

csv file as: 

 

Server, Location, Printer Name,

 

 

Remi

 


Viewing all articles
Browse latest Browse all 8411

Latest Images

Trending Articles



Latest Images