Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for login_disconnect.bat_style_network_printer.ps

(view source code of login_disconnect.bat_style_network_printer.ps as plain text)

  1. $oldErrorActionPreference = $ErrorActionPreference
  2. $ErrorActionPreference = 'SilentlyContinue'
  3. # Remove the printer first, then remove the printerport
  4. Get-Printer -Name 'LaserJet Marketing' | Remove-Printer
  5. Get-PrinterPort -Name 'LPT1:' | Remove-PrinterPort
  6. $ErrorActionPreference = $oldErrorActionPreference

page last modified: 2024-04-16; loaded in 0.0221 seconds