Today, I will discuss How to Find Out SCCM ConfigMgr WMI commands. WMIC – Take Command-line Control over WMI.
Microsoft is creating many good reasons to make the command prompt in Windows XP and the Windows Server 2003 family your home for systems management.
One of those reasons is the Windows Management Instrumentation Command-line (WMIC), which uses the power of Windows Management Instrumentation (WMI) to enable systems management from the command line. It is even working for SCCM and Windows 7.
WMIC is a powerful but rarely used tool for managing WMI from the command line. It’s been part of the operating system since Windows XP!
Table of Contents
Learn How to Find Out SCCM ConfigMgr WMI Commands
Some examples to trigger SMS/SCCM Client Actions from the command line:
- Fix Report Server Cannot Open A Connection Error ConfigMgr | SCCM
- How To Disable SCCM Application Deployment | ConfigMgr | MEMCM
Disable Software-Distribution:
WMIC /namespace:\\root\ccm\policy\machine\requestedconfig path ccm_SoftwareDistributionClientConfig CREATE ComponentName=”Disable SWDist”,Enabled=”false”,LockSettings=”TRUE”,PolicySource=”local”,PolicyVersion=”1.0″ ,SiteSettingsKey=”1″ /NOINTERACTIVE
Re-Activate Software-Distribution:
WMIC /namespace:\\root\ccm\policy\machine\requestedconfig path ccm_SoftwareDistributionClientConfig WHERE ComponentName=”Disable SWDist” delete /NOINTERACTIVE
Trigger Hardware Inventory:
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000001}” /NOINTERACTIVE
Trigger Software Inventory:
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000002}” /NOINTERACTIVE
Trigger DataDiscoverRecord (DDR) update:
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000003}” /NOINTERACTIVE
Force a FULL HW Inventory on next HW-Inv Schedule:
WMIC /namespace:\\root\ccm\invagt path inventoryActionStatus where InventoryActionID=”{00000000-0000-0000-0000-000000000001}” DELETE /NOINTERACTIVE
Repair SMS/SCCM Agent on a remote client:
WMIC /node:%MACHINE% /namespace:\\root\ccm path sms_client CALL RepairClient
Repair a list (all clients listed in clients.txt) of remote SMS/SCCM Agents:
WMIC /node:@clients.txt /namespace:\\root\ccm path sms_client CALL RepairClient Orginal Post.
We are on WhatsApp. To get the latest step-by-step guides and news updates, Join our Channel. Click here –HTMD WhatsApp.
Author
Anoop C Nair is Microsoft MVP! He is a Device Management Admin with more than 20 years of experience (calculation done in 2021) in IT. He is a Blogger, Speaker, and Local User Group HTMD Community leader. His primary focus is Device Management technologies like SCCM 2012, Current Branch, and Intune. He writes about ConfigMgr, Windows 11, Windows 10, Azure AD, Microsoft Intune, Windows 365, AVD, etc.
You should be using Windows PowerShell 🙂
how could we distribute an application or package using wmic.
which class is capable of catering my requirement.
-Noor
Agree with @Trevor on using PowerShell to make the WMI Calls
Nah, WMIC is much more portable and great to use for most sccm WMI commands. I only use powershell for more complex things that WMIC doesn’t support, and even then I have to use ECHO Powershell code >> powershell_script.ps1 to make stuff on the fly.