Find the Serial number of a computer
wmic /node:WSNAME1 path win32_computersystemproduct get identifyingnumber
wmic /node:WSNAME1 csproduct get identifyingnumber
Query Active Directory using WMI
WMIC /NAMESPACE:\\root\directory\ldap PATH ds_user WHERE ds_cn="user1" GET ds_department /VALUE
Issue:
WMIC returns error "Invalid Global Switch."
Cause:
This is caused by the computer name containing the "-" special character.
Workaround:
Enclose the computer name with double quotes.
Blog Index
-
▼
2008
(40)
-
▼
April
(24)
- Access a Network Resource Alias using Computer Acc...
- ZTI DefaultDomainName setting lost
- ZTITattoo.wsf - OSD clears TaskSequence registry e...
- PowerShell appears to "hang" when executed from a ...
- Need to move the Microsoft Deployment Distribution...
- Fix Broken Windows Scripting Host
- Set Location in "Regional and Language Options" co...
- Dial up connections do not use LAN proxy settings
- Ever needed an Automated RunAs?
- LTI deployment fails with error "A connection to t...
- ZTI PreInstall phase fails with error 214700057
- ZTI Package update leaves .$M$ file(s)
- Error creating ZTI CD when using local SMS Console
- Various WMIC commands
- Various DSQUERY commands
- Using ImageX to compress a WIM file after modifica...
- When installing Windows XP on ESX you may receive ...
- VMWare Workstation - After WinPE deploy of sysprep...
- Pre-Stage Computer resource record in SMS
- Windows Path issues may prevent Group Policy from ...
- Hiding or Displaying Default Desktop icons
- ImportGPO.wsf may not import GPO's using a Migrati...
- Permissions for Moving a Computer Account
- Cached logons are available by default on a domain...
-
▼
April
(24)
Wednesday, April 16, 2008
Various WMIC commands
Subscribe to:
Post Comments (Atom)
1 comment:
Thank you for this. I was fighting with getting it to work by name alone and not ip.
Post a Comment