Title: What Is WMI and How Does SMS 2'0 Use It Wally Mead Program Manager SMS Product Group Microsoft Corpo
1What Is WMI and How Does SMS 2.0 Use It?Wally
MeadProgram ManagerSMS Product GroupMicrosoft
Corporation
2 Overview
- Web-Based Enterprise Management (WBEM) concepts
- Systems Management Server (SMS) 2.0 integration
with Windows Management Instrumentation (WMI) - Accessing SMS data using WMI
- Troubleshooting SMS and WMI issues
3Web-Based Enterprise Management Concepts
- What is the WBEM initiative?
- WBEM terminology
- WMI
- How SMS uses WMI
4What Is the WBEM Initiative?
5 WBEM Terminology
- Schema Common Information Model (CIM)
- CIM repository
- Provider
- Management Object Format (MOF) file
- Consumer application
6Windows Management Instrumentation
7SMS and WMI
- Used by SMS for many tasks
- Hardware inventory
- HealthMon
- Network Monitor Control tool
- Network Discovery
- Network Trace
- SMS Service Manager
- SMS site database access
- All SMS Administrator console actions to SMS site
database go through the provider
8WMI Versions and SMS
- WMI is optional for Windows NT 4.0 and Windows
98 - Available on Windows NT 4.0 SP4 and Windows 98 CD
- SMS 2.0 installs WMI version 1.1 (build 698)
- If later build not already installed
- Will install by default on Windows 95, Windows
98, and Windows NT - Windows 2000 installs WMI version 1.5 (build
1085) by default - Can manually install WMI 1.5 on earlier platforms
- Q262317 SMS WMI 1.5 Support in SMS 2.0 SP2
- Q269411 SMS Windows 95 Clients May Hang After
Upgrade to Service Pack 2
9SMS Administrator Console and WMI
- SMS security rights are validated by SMS Provider
before requested action is completed - All actions use SMS SDK calls
- SMS Administrator console was written with the
SMS SDK - Any process completed in SMS Administrator
console can be scripted for command line - Some tasks already scripted in SMS 2.0 Resource
Guide a sample folder (there are others) is - Import folder make CAPs, DPs, collections,
import and export queries, import site boundaries - The exception is any password creation and
manipulation cant be scripted with the SDK - Excel and Access tools to run SMS queries
10Hardware Inventory and WMI
- Hardware inventory on 32-bit clients uses WMI
- WMI providers gather data when requested
- CIM repository stores last instance for deltas
- Gathers much more data than SMS 1.x
- WMI 1.5 retrieves serial number and manufacturer
from PC BIOS if hardware supports SMBios 2.1 - Can manually install WMI 1.5 on earlier platforms
- Default inventory controlled by Sms_def.mof
- Can be modified by MOF Manager
11Modifying Hardware Inventory through WMI
- MOF Manager from SMS 2.0 Resource Guide can be
used to tune inventory - Some classes require network access
- Adding more classes and attributes create larger
MIF sizes transferred across network - Additional customization available through WMI
extensions - Over 30 providers available now to retrieve
additional data for inventory - If you use additional providers instead of MIF
files, the data is available to not only SMS, but
any WMI consumer - See http//www.microsoft.com/Seminar/1033/2000082
2SMSHWAREPT1/Seminar.htm - Note that the URL should be entered as one line
it is - wrapped here for readability.
12HealthMon and WMI
- HealthMon agent is a WMI provider
- Gathers Performance Monitor counter data and
sends to HealthMon console - Use WMI to gather data
- HealthMon console receives and displays data
- Single agent can send to multiple consoles
13Network Monitor Control Tool and WMI
- Monitor Control tool must be started
- Specific monitors must be enabled, configured,
and started - When the monitor detects the configured
condition, an event is created - Event data written to console through WMI
14Network Discovery and WMI
- Network Discovery stores some temporary
configuration data in CIM repository - Configuration of Network Discovery scope
- Retrieves data from site server registry and site
control file through WMI - Quick retrieval of current data
- No storage of discovered resources
- Was done prior to RTM
15Network Trace and WMI
- Site system retrieval
- Uses WMI to pull site systems from site control
file - Network Trace Component Poller
- Uses provider to access SMS services and threads
on site systems - Network Trace Ping
- Uses provider to redirect ICMP ping request from
SMS Administrator console to site server - Pings from site server to remote site system, not
SMS Administrator console to remote site system
16SMS Service Manager and WMI
- Uses WMI from client to server
- SMS Administrator console on client uses WMI to
find site server computer - Uses WMI to validate user rights
- Site server component uses WMI to validate the
user has rights to the server - SMS Service Manager Component Poller
- Uses provider to access SMS services and threads
on site systems
17A Visual Look at How SMS Uses WMI
Network Discovery Agent
Network Trace
SMS Administrator Console
Hardware Inventory Agent
CIM Object Manager
Component Poll
SMS Provider
ICMP Provider
Win32 Provider
18SMS Provider Access
- Controls who has access to the SMS site database
- Three ways to gain access to WMI (prior to the
SMS Provider) - SMS Administrators local group
- Wbemperm.exe (WMI control in Windows 2000)
- Member of local Administrators group
- Access to SMS Provider is logged in Smsprov.log
(automatically enabled)
19SMS Provider Location
- SMS Provider can reside
- On site server computer
- On SQL Server computer
- Logged on user requires access to SMS Provider
- Needs Windows NT, RPC, and DCOM security rights
(Everyone group by default) - Needs WMI rights (SMS Administrators local group)
20Accessing SMS Data Using WMI
- SMS Administrator console
- Uses WMI and the SMS Provider for security
- SMSQuery.xls on SMS 2.0 CD
- WMI calls through Visual Basic for Applications
to the SMS Provider - Crystal Info for SMS (Crystal Reports)
- WBEM ODBC driver
- Microsoft Access can use WBEM ODBC driver
- Custom utilities can use WMI calls or WBEM ODBC
driver
21Using the WBEM ODBC Driver
- Requires WBEM SDK
- Automatically installed on SMS Administrator
consoles - Can be installed using Wbemsdk.exe on SMS 2.0 CD
- For Microsoft Access, there are three data access
options - Create links to SMS data
- Create tables from imported SMS data
- Create SQL pass-through queries
- Connect to the WBEM source during data access
22Creating Links to SMS Data
- Advantage is up-to-date data
- Disadvantage is no modifications to data
- In Microsoft Access
- On File menu, point to Get External Data, click
Link Tables - Connect to WBEM source of \\siteserver\site_site
- Select table from SMS site database
- Set unique identifier
23Creating Tables from Imported SMS Data
- Advantage is data modifications are possible
- Disadvantage is data is not current (snapshot)
- In Microsoft Access
- On File menu, point to Get External Data, click
Import - Connect to WBEM source of \\siteserver\site_site
- Select table from SMS site database
24Creating SQL Pass-Through Queries
- Advantage is speed (bypasses Jet)
- Disadvantage is no modifications to data
- In Microsoft Access
- On Insert menu, click Query, click Design View
- On Query menu, point to SQL Specific, click
Pass-Through - Connect to WBEM source of \\siteserver\site_site
- Build query
- Run
25SMS Administrator Failures
- Verify that Windows Management is running
- Verify that SQL Server is running
- Verify that user has SMS Provider permissions
- Test with Wbemtest
- Test from another SMS Administrator console
- Delete repository files
- Stop Windows Management
- Delete Systemroot\system32\Wbem\Repository
- Start Windows Management
- Run upgrade from SMS 2.0 SP2 CD
26WBEMTest Diagnostic Tool
27Troubleshooting SMS Provider Issues
- Connect to the computer the SMS Provider is
installed on - \\providercomputer\root\sms
- \\providercomputer\root\sms\site_sc
- Can use the built-in Wbemtest.exe
- Uses SMS Provider
- Can duplicate SMS Administrator console tasks
- Shows what is available in SQL Server
- Alternately can use CIM Studio
- Graphical interface to show relationships and
associations - Available from http//msdn.microsoft.com/downloads
/sdks/wmi/download.asp - Note that the URL should be entered as one line
it is - wrapped here for readability.
28CIM Studio
29Troubleshooting DCOM Issues
- WMI connections occur over DCOM
- By default, permissions are enabled
- However, if no WMI connections work
- Run Dcomcnfg.exe
- On Default Properties page, verify
- Authentication Level set to Connect
- Impersonation Level set to Identify
- On Default Protocol page, verify
- Connection-oriented TCP/IP at top
- Especially with Windows 2000 SMS Administrator
console connecting to Windows NT 4.0 site server
30Verifying the Provider Site
- Check registry key HKEY_LOCAL_MACHINE
\Software\Microsoft\SMS\AdminUI\Connection for
site server name - Connect to \\providercomputer\root\sms
- To verify the site code
- select from SMS_ProviderLocation where
providerforlocalsite True, then Apply - This is what the SMS Administrator console
attempts to connect to - You may get multiple instances returned if a
reinstall occurred with a new site code
31Verifying Access to SMS Site Data in SQL Server
- Always go through SMS Provider, and never go
directly to SQL Server - Direct SQL access bypasses SMS Security
- Connect to \\providercomputer\root\sms\site_sitec
ode - Enum Classes, Recursive, view Instance data
- Query for specific data example select from
SMS_Collection - If you can view instance data, you are retrieving
data from SQL Server - Problem must be elsewhere
32Fixing a Corrupted SMS Provider MOF
- Verify normal sources
- Windows Management is running
- SQL Server running (MSSQLServer)
- User has permissions to Sms.msc and required
files - User is a member of SMS Administrators
- Copy or create Smsprov.mof
- Copy current version from \Sms\Bin\I386
- Create from SMS 2.0 CD \Smssetup\Bin\I386\_smsprov
.mof - Drop in systemroot\System32\Wbem\Mofs
33SMS Provider Connection Issues
- Prior to SP2, each SMS Administrator console
consumed multiple connections - Usually two per SMS Administrator, but could be
more - Not shared or released well
- Caused a lack of available connections
- Work around was to increase available connections
- \Sms\Bin\I386\Smsprov.mof
- MaxSQLConnections defaulted to 60 (about 30
consoles) - SP2 fixes the use and release of connections
34 Summary
- WBEM is a management initiative for common data
sources - WMI is Microsofts implementation of WBEM
- SMS 2.0 uses WMI for many processes
- Hardware inventory, HealthMon, Network Monitor
Control tool, Network Trace, the SMS
Administrator console - SMS data can be accessed outside the SMS
Administrator console using WMI - Troubleshooting WMI usually involves using
Wbemtest - Verify SQL Server and WMI services are running
first
35(No Transcript)