User Tools

Site Tools


microsoft:scripting:wmi

Microsoft - Scripting - WMI

StdRegProv Methods Return Codes

  • 0 for success
  • 1 for key read with no default value
  • 2 for key not found
  • 6 for invalid hive

Source:eggheadcafe - trying to read a registry value DWORD

wmic.exe

Get the manufacturer and model of the local computer.

wmic COMPUTERSYSTEM Get Manufacturer,Model

See also:TechNet - WMIC - Take Command-line Control over WMI

Disable password expiration on an account

Disable password expiration on the local Administrator account:

"%SYSTEMROOT%\system32\wbem\wmic.exe" useraccount where "name='Administrator'" set PasswordExpires=FALSE
microsoft/scripting/wmi.txt · Last modified: 2017/02/27 20:38 by bas

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki