Skip to content

Instantly share code, notes, and snippets.

@bklockwood
Created December 18, 2015 03:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bklockwood/e4efe23b4d6d5117dcf1 to your computer and use it in GitHub Desktop.
Save bklockwood/e4efe23b4d6d5117dcf1 to your computer and use it in GitHub Desktop.
Find CIM methods and parameters in powershell
PS C:\> $wumethods = gcls -Namespace ROOT/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession
PS C:\> $wumethods.CimClassMethods
Name ReturnType Parameters Qualifiers
---- ---------- ---------- ----------
SetCallerID UInt32 {CallerID} {implemented}
ApplyApplicableUpdates UInt32 {HResult} {implemented}
ScanForUpdates UInt32 {OnlineScan, SearchCriteria, HResult, Updates} {implemented}
ScanForUpdatesWithProxy UInt32 {BypassList, BypassLocal, ProxyAddress, SearchCriteria...} {implemented}
DownloadUpdates UInt32 {Updates, HResult} {implemented}
DownloadUpdatesWithProxy UInt32 {BypassList, BypassLocal, ProxyAddress, Updates...} {implemented}
InstallUpdates UInt32 {Updates, HResult} {implemented}
UninstallUpdates UInt32 {Updates, HResult} {implemented}
CheckWUOperationState UInt32 {operationState} {implemented}
PS C:\> $wumethods.CimClassMethods | where name -eq ScanForUpdates | select -ExpandProperty Parameters | fl
Name : OnlineScan
CimType : Boolean
Qualifiers : {ID, In}
ReferenceClassName :
Name : SearchCriteria
CimType : String
Qualifiers : {ID, In}
ReferenceClassName :
Name : HResult
CimType : UInt32
Qualifiers : {ID, Out}
ReferenceClassName :
Name : Updates
CimType : InstanceArray
Qualifiers : {EmbeddedInstance, ID, Out}
ReferenceClassName :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment