Skip to content

Instantly share code, notes, and snippets.

@kekoa-
Created August 15, 2020 19:22
Show Gist options
  • Select an option

  • Save kekoa-/2778899e61cd5aba41cceba81241968b to your computer and use it in GitHub Desktop.

Select an option

Save kekoa-/2778899e61cd5aba41cceba81241968b to your computer and use it in GitHub Desktop.
uses wmi to delete all network printers
Get-WMIObject Win32_Printer | Where-Object { $_.Network -eq 'true' } | Foreach-Object { $_.delete() }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment