Created
July 24, 2021 12:15
-
-
Save ProIntegritate/b97d7567d4d3c5a35e9cca21c25ef2f2 to your computer and use it in GitHub Desktop.
Exploring WMI objects with Powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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