Relative Content

Tag Archive for powershell

Auto Mapping Script in Powershell: Filtration Error

$ACTIVE_PRINTERS = Get-Printer try { if (Get-Variable -Name LM -ErrorAction SilentlyContinue){ Write-Host “Lexmark Printers” foreach ($PrinterName in $LM.Keys) { $ip = $LM[$PrinterName] if (!$ACTIVE_PRINTERS.Contains($PrinterName)) { Add-PrinterPort “$ip” Add-Printer -DriverName “Lexmark Universal v2” -Name $PrinterName -PortName “$ip” } Write-Host “$PrinterName : $ip Are Mapped” } } else { Write-Host “No Lexmark Printers Located in $sqdrn” } […]

Auto Mapping Script in Powershell: Filtration Error

$ACTIVE_PRINTERS = Get-Printer try { if (Get-Variable -Name LM -ErrorAction SilentlyContinue){ Write-Host “Lexmark Printers” foreach ($PrinterName in $LM.Keys) { $ip = $LM[$PrinterName] if (!$ACTIVE_PRINTERS.Contains($PrinterName)) { Add-PrinterPort “$ip” Add-Printer -DriverName “Lexmark Universal v2” -Name $PrinterName -PortName “$ip” } Write-Host “$PrinterName : $ip Are Mapped” } } else { Write-Host “No Lexmark Printers Located in $sqdrn” } […]

Auto Mapping Script in Powershell: Filtration Error

$ACTIVE_PRINTERS = Get-Printer try { if (Get-Variable -Name LM -ErrorAction SilentlyContinue){ Write-Host “Lexmark Printers” foreach ($PrinterName in $LM.Keys) { $ip = $LM[$PrinterName] if (!$ACTIVE_PRINTERS.Contains($PrinterName)) { Add-PrinterPort “$ip” Add-Printer -DriverName “Lexmark Universal v2” -Name $PrinterName -PortName “$ip” } Write-Host “$PrinterName : $ip Are Mapped” } } else { Write-Host “No Lexmark Printers Located in $sqdrn” } […]

Auto Mapping Script in Powershell: Filtration Error

$ACTIVE_PRINTERS = Get-Printer try { if (Get-Variable -Name LM -ErrorAction SilentlyContinue){ Write-Host “Lexmark Printers” foreach ($PrinterName in $LM.Keys) { $ip = $LM[$PrinterName] if (!$ACTIVE_PRINTERS.Contains($PrinterName)) { Add-PrinterPort “$ip” Add-Printer -DriverName “Lexmark Universal v2” -Name $PrinterName -PortName “$ip” } Write-Host “$PrinterName : $ip Are Mapped” } } else { Write-Host “No Lexmark Printers Located in $sqdrn” } […]