Escolar Documentos
Profissional Documentos
Cultura Documentos
Terminal
Remote Services Globalization Shell Tablet
Assistance
Improvements In Group Policy
Applied more reliably, and easier to use
Support for editing Group Policy Search and filter (Post Vista)
settings in Multilingual
Environments Templates (Post Vista)
WMI EventLog
WSMAN
IPMI
driver
Hardware
BMC
Architecture WMI EventLog
Boundary
Reg Service Service
Machine
Svchost
Config WMI
Config SEL Events
Client Cmdline plugin plugin
plugin plugin plugin
App tool
WSMan WSMan
WSMan Client DLL Prov DLL
Automation DLL
WSMan service
WSMan WSMan
Client DLL Prov DLL
WSMan
WinHTTP HTTP.sys
plugin
3rd party
WSMan
Other mgmnt
component HTTP/HTTPS
Windows platform
Event Forwarding
Collector
Machine Event Source
Boundary
Machine
Machine
3rd party Cmdline Event
App tool Viewer
Create
Subscription
Collector API
Svchost
Svchost
Events EventLog
EventLog Event Collector plugin Service
Service Service WSMan
WSMan service
Client API
Event
Event
WinHTTP HTTP.sys Log
Log
3rd party
WSMan component
EventLog component
HTTP/HTTPS
Windows platform
Remote Shell
Access to Remote shell (cmd.exe)
Batch mode execution of scripts
and commands
Access to output streams from remote shell
Input data for prompts
Example usage: Add/Remove server roles,
collect inventory, configure Firewall etc
PowerShell will use WinRS for remoting
New Vista Event Logging
Windows Eventing 6.0
Defines constraints
Conditions Multiple conditions allowed
AND-ed
~ OR ~
~ OR ~
~ AND ~
Includes attachments
E-Mail
Over SMTP
Transient Control
COM+ Process
Scripting Session
API Task Scheduler Manager
Service
(shared svchost) S4U / CredMan 2 per login session
(Logon) (high and low privileges)
Credentials “Jobs”
Pre-Vista computers (Credman)
DCOM, RPC Access User Process
User Process
(cmd.exe, dll, etc.)
User Process
(cmd.exe, dll, etc.)
(cmd.exe, dll, etc.)
PowerShell Highlights
Rich set of Namespaces (data dources)
Man-style help with rich schema
and searching
Command-line-oriented following strong
naming guidelines
E.g., Verb-Noun
Interactive experience (aliases,
navigation, tab-completion, command
line editing)
Pipelines
Object utilities
Shell
Uniformity
Get-Process | Where { $_.handles –gt 500 } | Sort handlecount | Format-
Table
Common PowerShell Parser
Get-Process
Where Class
Format
Class
Class
Class
Sort
Commands
Verb-Noun
Verb-Noun –FirstP Val –SecondP V2,V3 –ThirdP:V4
You can alias
Set-Alias gps Get-Process
Parameters can be positional
gps –ProcessName LSASS
gps LSASS
Many parameters can be wildcarded
gps c*
Partial parameter names allowed
Gps –p lsass
Shell
Trusting Operations
Commands with side-effects support:
Whatif
Gps |where {$_.handles –ge 500} |
stop-process –WhatIf
Confirm
Stop-process S* -Confirm
Verbose
Stop-Process [a-x]*[q]*[r-t] -Verbose
Shell
Finding Data
Data stores surfaced as “Drives”
Filesystem, Registry, Alias, Certs, Env, Functions, Variables, etc
> Get-Drive
> dir HKLM:\SOFTWARE\Microsoft
Drive is a namespace with numerous
information axis
Item, ChildItem, Content, ItemProperty, ACL, etc.
New navigation/interaction model supported with aliases
for existing commands
Get-ChildItem dir ls
Get-Cwd cd pwd
Get-Content type cat
New-Item –type Directory mkdir mkdir
Set-Location cd cd
Shell
Scripting
Supports existing scripting models
*NIX model of text processing including regular expressions
Visual Basic Script model of COM automation
Supports scripting .NET objects
Support loose, strong, and extensible typing models
Uniform syntax to access to a wide range of types
WMI, XML, COM, ADSI, ADO
Rich variable semantics (typed, read-only, constraints,
descriptions)
Rich operators and control structures (C#-like with access
to cmds & utilities)
Functions (positional, named, typed,
constrained params)
PowerShell Scripting
For more Information
Related Sessions on the MMS 2006 DVD