18 lines
723 B
PowerShell
18 lines
723 B
PowerShell
# Only run the this export script once all printers desired preferences have been set or if preferences have been tweaked, then run once again.
|
|
|
|
# Specify the desired output directory
|
|
$outputDirectory = "C:\Scripts\Printers\03-Printer-Properties"
|
|
|
|
# Specify printers to ignore (adjust as needed)
|
|
$printersToIgnore = "Fax", "Microsoft Print to PDF", "Microsoft XPS Document Writer"
|
|
|
|
# Get a list of all printers
|
|
$printers = Get-Printer
|
|
|
|
$printers = $printers | Where-Object { $printersToIgnore -notcontains $_.Name }
|
|
|
|
# Iterate through each printer
|
|
foreach ($printer in $printers) {
|
|
# Export the Printer Properties as Dat
|
|
printUI.exe /Ss /n $printer.Name /a "$outputDirectory\$($printer.Name).dat"
|
|
} |