This is a more challenging topic. You could say the cim commands are less user friendly than the wmi commands when it comes to methods. You need to use get-cimclass to list the methods. Both types of commands are using the same wmi database
on the backend.
get-cimclass win32_service | % cimclassmethods
And then invoke-cimmethod to invoke a method. At least the -name parameter supports tab completion. You can't leave out '-name'. A returnvalue of 0 is success.
get-ciminstance win32_service | where name -eq spooler |
Invoke-CimMethod -name stopservice
ReturnValue PSComputerName
----------- --------------
0
Reference: Hey dude where are my methods? https://devblogs.microsoft.com/scripting/hey-dude-where-are-my-methods/