Created
May 11, 2015 05:55
-
-
Save sinky/4809461a195c69846c3a to your computer and use it in GitHub Desktop.
restore XPS Printer with Powershell
This file contains 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
$printerclass = [wmiclass]'Win32_Printer'; | |
$printer = $printerclass.CreateInstance(); | |
$printer.Name = $printer.DeviceID = 'Microsoft XPS Document Writer'; | |
$printer.PortName = 'XPSPort:'; | |
$printer.Network = $false; | |
$printer.Shared = $false; | |
$printer.DriverName = 'Microsoft XPS Document Writer'; | |
$printer.Put() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment