(view source code of showprn.ps as plain text)
# WMI query to list all properties and values of the Win32_Printer class
# This PowerShell script was generated using the WMI Code Generator, Version 1.30
# http://www.robvanderwoude.com/updates/wmigen.html
param( [string]$strComputer = "." )
$colItems = get-wmiobject -class "Win32_Printer" -namespace "root\CIMV2" -computername $strComputer
foreach ($objItem in $colItems) {
write-host "Name :" $objItem.Name
write-host "Default :" $objItem.Default
write-host "Network :" $objItem.Network
write-host "Port Name :" $objItem.PortName
write-host "Driver Name :" $objItem.DriverName
write-host "Server Name :" $objItem.ServerName
write-host "Share Name :" $objItem.ShareName
write-host
}
page last modified: 2024-04-16; loaded in 0.0069 seconds