This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Requires -Module NetSecurity | |
| #Requires -RunAsAdministrator | |
| $Rules = @{ | |
| "NA West" = @( | |
| "24.105.8.0/21" | |
| ); | |
| "NA East" = @( | |
| "24.105.40.0/21" | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import win32print | |
| import sys | |
| from pathlib import Path | |
| # Python 3 only.. | |
| if sys.version_info[0] < 3: | |
| raise Exception("Python 3 or a more recent version is required.") | |
| printers = win32print.EnumPrinters(4) | |
| printercount = 0 |