wmi for the system center configuration manager 2007 administrator system center user group belgium
TRANSCRIPT
WMI For the System Center Configuration
manager 2007 Administrator
System CenterUser Group Belgium
Agenda
Introduction WMI basics Troubleshoot WMI Extended WQL (WMI query language) WMI Tools WMI in ConfigMgr Advanced WMI in ConfigMgr SccmAutoDoc Q & A
IntroductionWhat is WMI?
◦Wikipedia: “WMI is Microsoft's implementation of the Web-Based Enterprise Management (WBEM) and Common Information Model (CIM) standards from the Distributed Management Task Force (DMTF).
◦SMS 2.0 MOC: “WMI does for management software what printer drivers did for printing”
◦Me: “ The registry on steroids.”
WMI basics (1)NamespacesClassesMethodsProperties
◦Embedded properties Props Proplists regmultistringlists
◦Lazy properties
WMI basics (2) Providers
◦ regProv◦ regPropProv◦ Disk & CPU◦ View instance provider◦ AI Providers (aainstprov)◦ Write your own (
http://myitforum.com/cs2/blogs/rzander/archive/2009/03/30/wmi-provider-to-list-the-monitors-serialnr-and-model-name.aspx)
Events◦ SELECT * FROM __InstanceModificationEvent WITHIN 10 WHERE
TargetInstance ISA 'SMS_Collection' Qualifiers
◦ Dynamic◦ CimType
Troubleshoot WMI Wmidiag Repair
◦ XP SP2+ rundll32 wbemupgd, UpgradeRepository
◦ Vista and above (Needs to be Run as administrator) winmgmt /salvagerepository
◦ Windows server 2003 rundll32 wbemupgd, RepairWMISetup
Re-register wmi components◦ cd /d %windir%\system32\wbem ◦ for %i in (*.dll) do RegSvr32 -s %i ◦ for %i in (*.exe) do %i /RegServer
Rebuild repository as a last resort (Might kill other applications)◦ Net stop winmgmt
◦ Ren %windir%\System32\Wbem\Repository %windir%\System32\Wbem\Repository_Bad
◦ Net start winmgmt
Extended WQLExtended Wql (http://msdn.microsoft.com/en-us/library/cc146121.aspx)
◦Select x from class◦Other keywords
Distinct, count, join, where, order by In / not in GetDate, datediff, dateadd http://
www.myitforum.com/articles/8/view.asp?id=10909SELECT DISTINCT SMS_MonthlyUsageSummary.ResourceIDFROM SMS_MonthlyUsageSummaryINNER JOIN SMS_MeteredFilesON SMS_MonthlyUsageSummary.FileID = SMS_MeteredFile.MeteredFileIDWHERE DateDiff(day,SMS_MonthlyUsageSummary.LastUsage, GetDate()) < 90AND SMS_MeteredFiles.RuleID = 6
WMI ToolsWbemtestCim studioWmic
◦ http://scug.be/blogs/sccm/archive/2009/09/15/adding-wmic-right-click-actions-to-the-configmgr-2007-admin-console-1.aspx
PolicyspyScriptSDK
◦ http://www.microsoft.com/downloads/details.aspx?FamilyId=064A995F-EF13-4200-81AD-E3AF6218EDCC&displaylang=en
WMI in ConfigMgr (1)Omni-Present
◦SMS Provider / Administrator console◦Dynamic Collections◦Queries◦Hardware inventory◦ConfigMgr client settings store
WMI in ConfigMgr (2) Namespaces used by Sccm
◦ Server side Root\sms (sms_providerlocation) Root\sms\site_sitecode
◦ Client side Root\ccm Root\ccm\invagt Root\ccm\policy
Sccm wmi Class structure◦ Abstract classes (Require sitecode='xyz')
Sms_sci Sms_siib
◦ Sms_r*◦ Sms_g*◦ Sms_cm_res_coll_collid
Advanced WMI inConfiguratio ManagerLocal Policies
◦http://technet.microsoft.com/en-us/magazine/2006.09.customizesms.aspx
◦Examples Request permission for Remote Tools Custom Hardware Inventory Disable individual agents
[CCM_Policy_PartialPolicy(true)] instance of CCM_SoftwareDistributionClientConfig {SiteSettingsKey = 1; PolicySource = "Local"; // override only this property, all others from the Site/Management Point [CCM_Policy_Override(true)] Enabled = FALSE;};
SccmAutoDocWhat is SccmAutodoc?
1. My source for getting to know WMI in ConfigMgr2. A program that, based on WMI queries
automatically documents your site settings Where can I get SccmAutodoc?
◦ SccmAutodoc 1.126 is currently in beta and can be downloaded from http://www.scug.be/media
Is SccmAutodoc freeware?◦ SccmAutodoc will become moderately priced
software once it leaves the beta stages, hopefully somewhere near the end of this year.
Q & A
Thank You
SCUG.be !