Академический Документы
Профессиональный Документы
Культура Документы
Windows Management
Instrumentation
Module Overview
Explain the structure of the WMI repository
Configure and inspect WMI security
pipeline
About WMI
WMI is a management technology that was first
WMI Communications
WMI communications take place using the Remote
Management exception
WMI Structure
WMI is not a single piece of software.
Classes
Within each WMI namespace are one or more classes. A
Instances
Instances are real-world occurrences of a class
There are few tools that enable searching for WMI classes
based on keywords
Get-WmiObject list
Get-WmiObject list class *user*
Three techniques for finding your class (and data):
Examples: Using Internet search engines to search for taskrelated keywords will assist in finding examples
Be Aware of Changes
WMI is constantly evolving, constantly changing as
Documentation
There is no central documentation repository for every
the Internet
WMI Security
WMI security can be defined on an entire namespace or
namespaces
class be named?
repository on a computer
pipeline
Querying WMI
The Get-WmiObject cmdlet also
Win32_Service | Get-Member
Multiple Computers?
Get-WmiObject also has an extremely useful ability in
Gwmi Win32_Service
computerName "LON-DC1", "SEA-DC2"
Gwmi Win32_Service
(Get-Content c:\names.txt)
Lists of multiple computers are interrogated sequentially
gwmi win32_logicaldisk |
select deviceid,drivetype,
@{Label='freespace(gb)';Expression={$_.freespace/1GB}}
Gwmi win32_operatingsystem |
select caption,
@{Label='PhysMemory';
Expression={(gwmi
win32_computersystem).totalphysicalmemory}}
Language or WQL
System Properties
Some properties have names that begin with a double-
underscore
__SERVER
__PATH
valuable information
In other situations, you may be forced to resort to ForEachObject to accomplish the necessary task.
Gwmi Win32_Process | ForEach-Object { Something }
Computers
Logon information
Virtual machine
LON-DC1
Logon user
name
Password
LON-SVR1
LON-SVR2
LON-CLI1
Contoso\Adminis Contoso\Administ
trator
rator
Contoso\Administ
rator
Contoso\Administ
rator
Pa$$w0rd
Pa$$w0rd
Pa$$w0rd
Pa$$w0rd
Lab Scenario
You work as a systems administrator, and you need to
computers.
Lab Review
How do you list WMI classes in a specific namespace?
What is the WMI class to retrieve operating system
information called?
WmiObject?
connections?
What protocol does WMI use, and how can you enable it to