Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ProIntegritate/b97d7567d4d3c5a35e9cca21c25ef2f2 to your computer and use it in GitHub Desktop.
Save ProIntegritate/b97d7567d4d3c5a35e9cca21c25ef2f2 to your computer and use it in GitHub Desktop.
Exploring WMI objects with Powershell
Exploring WMI objects with Powershell:
For this example on how to explore WMI classes, i've used Win32_ShadowCopy
as an example. Some classes, like Win32_ShadowCopy, REQUIRES administrator
privileges to work.
Search for classes names *shadow*
powershell -c "Get-CimClass -ClassName *shadow*"
See if a class has Methods and Properties:
powershell -c "get-cimclass -Class Win32_ShadowCopy | format-list"
List Methods:
powershell -c "(Get-CimClass Win32_ShadowCopy).CimClassMethods"
List Properties:
powershell -c "(Get-CimClass Win32_ShadowCopy).CimClassProperties"
List the actual Content:
powershell -c "Get-wmiobject Win32_ShadowCopy"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment