Skip to main content

Posts

Showing posts with the label Instance

PowerShell + WMI - Static & Instance Methods

One has to get their feet wet with WMI when it comes to managing ConfigMgr with PowerShell. How ConfigMgr uses WMI ?  Not only ConfigMgr but for other products if you leverage WMI with PowerShell then understanding what are Static & Instance methods is important. But there are lot of places where People stumble ( I did too ). Below is a question asked in Hyderabad PowerShell User Group (PSHUG) showing one of the common point of confusion. If you are a ConfigMgr Admin then you already know that in SCCM client we have a lot many Client actions that can be triggered remotely. Below are the available SCCM Client actions (In CM 2012) : Going back to the question, below code will work,which is triggering "Software Inventory" on a remote $machine: 001 002 $Client1   =  $( [WmiClass] "\\$Machine\ROOT\ccm:SMS_Client" ) $Client1 . TriggerSchedule( "{00000000-0000-0000-0000-000000000021}" ) One can get more info o...