mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-05-30 06:58:49 +02:00
Update list-printers.ps1
This commit is contained in:
parent
43bbf406d7
commit
febe6ed9f7
@ -15,9 +15,9 @@ try {
|
|||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
# TODO
|
# TODO
|
||||||
} else {
|
} else {
|
||||||
$ComputerName = $(hostname)
|
# $ComputerName = $(hostname)
|
||||||
Get-WMIObject -Class Win32_Printer -ComputerName $ComputerName | Format-Table
|
# Get-WMIObject -Class Win32_Printer -ComputerName $ComputerName | Format-Table
|
||||||
"(PrinterStatus: 1=various 2=unknown 3=idle 4=printing 5=warmup 6=finished 7=offline)"
|
Get-Printer * | Select-Object Name,Type,Location,Comment,DriverName,PrinterStatus | Format-Table -autoSize
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user