

RDNIC - Remote Desktop connection on a specific network adapter RDACCOUNT - Remote Desktop connection permission QUOTASETTING - Setting information for disk quotas on a volume. PRINTERCONFIG - Printer device configuration PORTCONNECTOR - Physical connection ports PARTITION - Partitioned areas of a physical disk. ONBOARDDEVICE - Common adapter devices built into the motherboard. NETPROTOCOL - Protocols (and their network characteristics). NETLOGIN - Network login information for a particular user. MEMLOGICAL - System memory, layout and availability LOADORDER - System services that define execution dependencies. JOB - Jobs scheduled using the schedule service. ON, OFFĬONTEXT Display the current state of all global switches.ĪLIAS - Access local system aliases īASEBOARD - Base board management (motherboard or system board)īIOS - BIOS management (Basic input/output services)ĬOMPUTERSYSTEM - Computer system ĬSPRODUCT - Computer system product information from SMBIOS.ĭEVICEMEMORYADDRESS - Device memory addressesĭISKQUOTA - Disk space usage for NTFS volumes.ĭMACHANNEL - Direct memory access (DMA) channelĮNVIRONMENT - System environment settings įSDIR - Filesystem directory entry TRACE Output debugging information to stderr. ROLE Path for the role containing the alias definitions. RECORD Log all input commands and output:


PRIVILEGES Enable or disable all privileges: ENABLE, DISABLE OUTPUT Mode for output redirection: STDOUT, CLIPBOARD, NAMESPACE Path for the namespace the alias operates against. INTERACTIVE Interactive mode:(prompt before WMI schema changes) ON, OFF IMPLEVEL Client impersonation level: Anonymous,Identify, Impersonate,Delegate FAILFAST FailFast mode:(timeout for connection to remote machine) ON, OFF AGGREGATE Aggregate mode: (column titles) ON, OFF AUTHLEVEL Client authentication level: Default,None,Connect,Call, Pkt,Pktintegrity,Pktprivacy APPEND Mode for output redirection: STDOUT, CLIPBOARD,

a specific printer instead of all printers. The WHERE clause can be added to filter down to a specific item, e.g. The ALIAS defines the component of your system that you want WMIC to interact with.
#Wmic desktopmonitor get serial number windows#
The WMIC tool is deprecated in Windows 10, version 21H1 and the 21H1 semi-annual channel release of Windows Server. Make configuration changes to multiple remote machines. Retrieve a huge range of information about local or remote computers. just adds to the complexity and efficiency, and reduces clarity.Windows Management Instrumentation Command. "" -f $Manufacturer,$Name,$Serial | Out-File $LogFileĪdding a "Decode" function in place of a copy/paste of the string ::ASCII.GetString($_. $Serial = ::ASCII.GetString($_.SerialNumberID).Trim(0x00) $Name = ::ASCII.GetString($_.UserFriendlyName).Trim(0x00) $Manufacturer = ::ASCII.GetString($_.ManufacturerName).Trim(0x00) Get-WmiObject WmiMonitorID -Namespace root\wmi |
#Wmic desktopmonitor get serial number code#
The whole set of code in the original poster's question can be replaced by this: $LogFile = "c:\Junk\monitors.txt" It will remove items within the byte array representation of the string that match the value of zero, not just the trailing items that match. The "-notmatch" operator is acting on the individual elements of the byte array, not on the entire value. It's an object of type byte (an array of bytes). The "SerialNumberID" property is not a string. I think the problem is the lack of understanding about what the Get-CimInstance WmiMonitorID -Namespace root\wmi).SerialNumberID -notmatch 0 is actually doing.
