SlideShare una empresa de Scribd logo
1 de 22
Automating Windows Server 2008 R2
Administration with Windows PowerShell


Aleksandar Nikolić, PowerShell MVP
Twitter: @alexandair

October 20, 2011
What is Windows PowerShell?

•   Not just a command-line shell
•   Not just a scripting language
•   An automation engine, an automation platform
•   Designed especially for system administration
•   Cmdlets – built-in PowerShell commands
Why Windows PowerShell? (1)

•   To automate administrative tasks
•   Manage the computers from the command-line
•   Access to file system, Registry, certificate store…
•   The Admin Development Model
    – An interactive shell -> quick and dirty scripting -> a formal production scripting

• Based on the .NET Framework
Why Windows PowerShell? (2)

•   Consistency and discoverability
•   Standards-based management (WMI/CIM and WSMan)
•   Extensible (PowerShell modules/snap-ins)
•   Great help system
•   PowerShell vs. GUI PowerShell and GUI
How to get it?

• Windows PowerShell v2
• Windows 7 and Server 2008 R2
   – A part of the operating system
   – Server Core! (optional feature)


• XP SP3, Vista SP2, Server 2003 SP2, and 2008 SP2
   – Windows Management Framework (KB968929)
   – Windows Update and WSUS
Windows PowerShell in a Nutshell

•   Cmdlets (Verb-Noun)
•   PSProviders and PSDrives
•   Get-Help, Get-Command, Get-Member, Get-PSDrive
•   Pipeline
•   Sends objects down the pipeline
•   -WhatIf and –Confirm parameters
DEMO:
basic
commands
Automating Management Tasks

•   Standards-based management (WMI/CIM and WSMan)
•   Local and remote
•   PowerShell jobs
•   Task scheduling
Management Stack in PowerShell v2


          Management    DCOM                     DCOM          WMI
                                   DCOM                                   Providers
          Application   Client                   Service      Engine     Providers




                                                             WMI
 Server                                                       Default
           PowerShell   WinRM                     WinRM     PowerShell
Manager                          WS-Management               Endpoint    PowerShell
            Remoting    Client                    Service
Console                                                       Custom
                                                            PowerShell
                                                             Endpoint
Standards-Based Management

                                                                  ion
                                                       Communicat
                                                          Pathway

                                                  0)
                                           rt 8
                                      po
                                    p(
                                 htt
                                                       Internet
                                                                        wsman.msft.net
                                                                        Managed Source
                                                                        Managed Source
            Management Station
           Management Station



•    Protocol: DMTF Standard Protocol: Web Services Management (WSMan)
•    Agent: The WinRM service in Windows implements the server role of the WSMan protocol. WMI
     implements the CIMOM.
•    Tool: WSMan cmdlets allow access to any device that complies with CIM and WSMan standards
•    Extensions: Microsoft extensions to WSMan enable PowerShell remoting (1-1, 1-many, many-1)
DEMO:
management
tasks
Extending Windows PowerShell

•   Think about MMC snap-ins
•   A set of related PowerShell functionalities
•   To package and deploy PowerShell functionalities
•   PSSnapins (v1+)
    – Get-PSSnapin –Registered
    – Quest AD cmdlets and VMware vSphere PowerCLI cmdlets
• Modules (v2+)
    – Get-Module –ListAvailable
    – include cmdlets, providers, functions, variables, aliases
Built-in Modules


Name                                             Command to import module or add snap-in
Active Directory Rights Management Services      Import-Module ADRMS
module for Windows PowerShell

Application ID Policy Management module for      Import-Module AppLocker
Windows PowerShell

Best Practice Analyzer module for Windows        Import-Module BestPractices
PowerShell

Background Intelligent Transfer Service (BITS)   Import-Module BITSTransfer
module for Windows PowerShell

Server Manager module for Windows PowerShell     Import-Module ServerManager
Troubleshooting pack support                     Import-Module TroubleshootingPack
Name                                              Required installed role or feature                     Command to import module or add snap-in

Active Directory module for Windows PowerShell    Requires installation of the Active Directory Domain   Import-Module ActiveDirectory
                                                  Services role

Active Directory Rights Management Services       Requires installation of the AD RMS role.              Import-Module ADRMSAdmin
administration module for Windows PowerShell

Failover Clusters module for Windows PowerShell   Requires installation of the Failover Clustering       Import-Module FailoverClusters
                                                  feature.

Group Policy module for Windows PowerShell        Requires installation of the Group Policy              Import-Module GroupPolicy
                                                  Management feature.

Network Load Balancing Clusters module for        Requires installation of the Network Load Balancing    Import-Module NetworkLoadBalancingClusters
Windows PowerShell                                feature.

Remote Desktop Services module for Windows        Requires installation of the Remote Desktop            Import-Module RemoteDesktopServices
PowerShell                                        Services role.

Server Migration module for Windows PowerShell    Requires installation of the Windows Server            Add-PSSnapin
                                                  Migration Tools feature                                Microsoft.Windows.ServerManager.Migration

Windows Backup snap-in for Windows PowerShell     Requires installation of the Windows Server Backup     Add-PSSnapin Windows.ServerBackup
                                                  Features: Windows Server Backup and Command-
                                                  line Tools.

Internet Information Services (IIS) module for    Requires installation of the Web Server (IIS) role     Import-Module WebAdministration
Windows PowerShell

Web Services for Management (WS-Management)       Requires installation of Web Services for              Add-PSSnapin Microsoft.WSMan.Management
                                                  Management (WS-Management) role
DEMO:
built-in
modules
Further Reading

Windows PowerShell in Action, Second Edition
Bruce Payette
http://www.manning.com/payette2/



Windows PowerShell Cookbook, Second Edition
Lee Holmes
http://oreilly.com/catalog/9780596801519




Administrator's Guide to Windows PowerShell Remoting
Dr. Tobias Weltner, Aleksandar Nikolic, Richard Giles
http://powershell.com/cs/media/p/4908.aspx
Requirements

• Windows PowerShell requires Microsoft .NET Framework 2.0 SP1

• PowerShell ISE requires Microsoft .NET Framework 3.5 SP1

• Out-GridView requires Microsoft .NET Framework 3.5 SP1

• Get-WinEvent requires Vista or newer and Microsoft .NET Framework 3.5

• Get-Counter and Import-Counter require Vista or newer

• Export-Counter requires Windows 7
Microsoft Resources

• Microsoft Windows PowerShell
   – http://www.microsoft.com/powershell
• Windows PowerShell Team Blog
   – http://blogs.msdn.com/PowerShell
• MS TechNet Script Center
   – http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
• PowerShell Forum
   – http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/
• Windows PowerShell Survival Guide
   – http://social.technet.microsoft.com/wiki/contents/articles/windows-
     powershell-survival-guide.aspx
Community Resources

• PowerShell Community
    – http://powershellcommunity.org
• PowerShell Code Repository
    – http://poshcode.org
• PowerShell.com Community
    – http://powershell.com
• PowerGUI.org Community
    – http://powergui.org
• PowerShell Magazine
    – http://powershellmagazine.com
• irc.freenode.net #PowerShell
Thank you for your attention.
Openness and Interoperability @Microsoft

     Microsoft and                     Port25                    Codeplex
     Open Source               blogs from the platform          resources for
   gateway for deeper            community and the             developers and
   exploration of open            OSS Lab teams              consumers of open
  source engagements           http://Port25.technet.com       source projects
 http://www.microsoft.com/                                 http://www.codeplex.com
         openness




    Interoperability                 Open Up                 Shared Source
        Bridges                    cross-Industry                 portal for
 technical collaborative        Interoperability and          programmatically
         works                  Standards activities            sharing code
 http://www.interoperability   http://www.microsoft.com/   http://www.microsoft.com/
         bridges.com                  interop/openup              sharedsource




         OData                      Open Spec                    BizSpark
 open source starter kit       protocols, file formats,    Program for Start-Up
for Internet publishing of      standards, technical       companies from both
  Government datasets              specifications          commercial and open
  using the Open Data          http://www.microsoft.com/    source backgrounds
http://ogdisdk.cloudapp.net        openspecifications      http://www.microsoft.com/
                                                                    bizspark




How can I receive up-to-date Openness announcements from Microsoft?
In addition to the websites above, you can receive regular updates to Microsoft’s
openness, interoperability and standards efforts via the following channels:
• http://blogs.technet.com/b/openness/
• http://blogs.msdn.com/b/interoperability/
• http://twitter.com/OpenAtMicrosoft
• http://port25.technet.com
• http://channel9.msdn.com/Blogs/Interoperability
Please rate this lecture
                                  and WIN HTC MOZART!
                                             Help us choose the best Sinergija
                                                lecturer! Telekom Srbija and
                                              Microsoft will award you – at the
                                            conference end, we’ll give one HTC
                                             Mozart WP7 phone to someone
                                               from the audience – randomly.

                                            Go to www.mssinergija.net, log in
                                                   and cast your votes.
     You can rate only lectures that you were present at, just once. More lectures you rate, more chances you have.
  Please use computers at the front of this room, or rate lecture from your phone or home computer, at Sinergija portal.
This prize contest will end at Thursday, October 20th at 9 PM. Winner will be announced at the official Sinergija web portal,
                                                    www.mssinergija.net



                       is a friend of Sinergija 2011
                       Conference and Imagine Cup
                       student competition in Serbia.

Más contenido relacionado

La actualidad más candente

Virtualization technologies - Windows Server 2008 R2 Hyper-V
Virtualization technologies - Windows Server 2008 R2 Hyper-VVirtualization technologies - Windows Server 2008 R2 Hyper-V
Virtualization technologies - Windows Server 2008 R2 Hyper-Vsolsoft
 
WebLogic for DBAs 1.0h
WebLogic for DBAs 1.0hWebLogic for DBAs 1.0h
WebLogic for DBAs 1.0hSimon Haslam
 
What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5Vinayak Tavargeri
 
Social Enabler for XPages
Social Enabler for XPagesSocial Enabler for XPages
Social Enabler for XPagesNiklas Heidloff
 
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...Carl Tyler
 
Collaborative lifecycle development for Mobile Software
Collaborative lifecycle development for Mobile Software Collaborative lifecycle development for Mobile Software
Collaborative lifecycle development for Mobile Software IBM WebSphereIndia
 
Websphere Application Server V8.5
Websphere Application Server V8.5Websphere Application Server V8.5
Websphere Application Server V8.5IBM WebSphereIndia
 
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the CloudAAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the CloudWASdev Community
 
BP501 - Building and deploying custom IBM sametime connect client installatio...
BP501 - Building and deploying custom IBM sametime connect client installatio...BP501 - Building and deploying custom IBM sametime connect client installatio...
BP501 - Building and deploying custom IBM sametime connect client installatio...Carl Tyler
 
01 server manager spiffy
01 server manager spiffy01 server manager spiffy
01 server manager spiffySpiffy
 
IBM WebSphere Application Server Introduction for Lotus
IBM WebSphere Application Server Introduction for LotusIBM WebSphere Application Server Introduction for Lotus
IBM WebSphere Application Server Introduction for Lotusdominion
 
WAS vs JBoss, WebLogic, Tomcat (year 2015)
WAS vs JBoss, WebLogic, Tomcat (year 2015)WAS vs JBoss, WebLogic, Tomcat (year 2015)
WAS vs JBoss, WebLogic, Tomcat (year 2015)Roman Kharkovski
 
Auto scaling and dynamic routing for was liberty collectives
Auto scaling and dynamic routing for was liberty collectivesAuto scaling and dynamic routing for was liberty collectives
Auto scaling and dynamic routing for was liberty collectivessflynn073
 
IBM WebSphere Application Server Update - Technical University (March 2015)
IBM WebSphere Application Server Update - Technical University (March 2015)IBM WebSphere Application Server Update - Technical University (March 2015)
IBM WebSphere Application Server Update - Technical University (March 2015)Ian Robinson
 
Jan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configurationJan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configurationNordic Infrastructure Conference
 
Whats new in was liberty security and cloud readiness
Whats new in was liberty   security and cloud readinessWhats new in was liberty   security and cloud readiness
Whats new in was liberty security and cloud readinesssflynn073
 
websphere commerce server admin configuration
websphere commerce server admin configuration websphere commerce server admin configuration
websphere commerce server admin configuration Laxmi Kanth Kshatriya
 
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing WorkloaAAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing WorkloaWASdev Community
 
WebSphere App Server vs JBoss vs WebLogic vs Tomcat
WebSphere App Server vs JBoss vs WebLogic vs TomcatWebSphere App Server vs JBoss vs WebLogic vs Tomcat
WebSphere App Server vs JBoss vs WebLogic vs TomcatWASdev Community
 

La actualidad más candente (20)

Virtualization technologies - Windows Server 2008 R2 Hyper-V
Virtualization technologies - Windows Server 2008 R2 Hyper-VVirtualization technologies - Windows Server 2008 R2 Hyper-V
Virtualization technologies - Windows Server 2008 R2 Hyper-V
 
WebLogic for DBAs 1.0h
WebLogic for DBAs 1.0hWebLogic for DBAs 1.0h
WebLogic for DBAs 1.0h
 
What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5
 
Social Enabler for XPages
Social Enabler for XPagesSocial Enabler for XPages
Social Enabler for XPages
 
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
 
Collaborative lifecycle development for Mobile Software
Collaborative lifecycle development for Mobile Software Collaborative lifecycle development for Mobile Software
Collaborative lifecycle development for Mobile Software
 
Websphere Application Server V8.5
Websphere Application Server V8.5Websphere Application Server V8.5
Websphere Application Server V8.5
 
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the CloudAAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
 
BP501 - Building and deploying custom IBM sametime connect client installatio...
BP501 - Building and deploying custom IBM sametime connect client installatio...BP501 - Building and deploying custom IBM sametime connect client installatio...
BP501 - Building and deploying custom IBM sametime connect client installatio...
 
01 server manager spiffy
01 server manager spiffy01 server manager spiffy
01 server manager spiffy
 
IBM WebSphere Application Server Introduction for Lotus
IBM WebSphere Application Server Introduction for LotusIBM WebSphere Application Server Introduction for Lotus
IBM WebSphere Application Server Introduction for Lotus
 
WAS vs JBoss, WebLogic, Tomcat (year 2015)
WAS vs JBoss, WebLogic, Tomcat (year 2015)WAS vs JBoss, WebLogic, Tomcat (year 2015)
WAS vs JBoss, WebLogic, Tomcat (year 2015)
 
Auto scaling and dynamic routing for was liberty collectives
Auto scaling and dynamic routing for was liberty collectivesAuto scaling and dynamic routing for was liberty collectives
Auto scaling and dynamic routing for was liberty collectives
 
IBM WebSphere Application Server Update - Technical University (March 2015)
IBM WebSphere Application Server Update - Technical University (March 2015)IBM WebSphere Application Server Update - Technical University (March 2015)
IBM WebSphere Application Server Update - Technical University (March 2015)
 
Jan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configurationJan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configuration
 
WAS 8 Webcast
WAS 8 WebcastWAS 8 Webcast
WAS 8 Webcast
 
Whats new in was liberty security and cloud readiness
Whats new in was liberty   security and cloud readinessWhats new in was liberty   security and cloud readiness
Whats new in was liberty security and cloud readiness
 
websphere commerce server admin configuration
websphere commerce server admin configuration websphere commerce server admin configuration
websphere commerce server admin configuration
 
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing WorkloaAAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
 
WebSphere App Server vs JBoss vs WebLogic vs Tomcat
WebSphere App Server vs JBoss vs WebLogic vs TomcatWebSphere App Server vs JBoss vs WebLogic vs Tomcat
WebSphere App Server vs JBoss vs WebLogic vs Tomcat
 

Similar a Automating Windows Server 2008 R2 Administration with Windows PowerShell

CIT-2697 - Customer Success Stories with IBM PureApplication System
CIT-2697 - Customer Success Stories with IBM PureApplication SystemCIT-2697 - Customer Success Stories with IBM PureApplication System
CIT-2697 - Customer Success Stories with IBM PureApplication SystemHendrik van Run
 
Introduction To Windows Power Shell
Introduction To Windows Power ShellIntroduction To Windows Power Shell
Introduction To Windows Power ShellMicrosoft TechNet
 
Managing Web Infrastructure Systems With Windows Power Shell™ 2.0 90
Managing Web Infrastructure Systems With Windows Power Shell™ 2.0 90Managing Web Infrastructure Systems With Windows Power Shell™ 2.0 90
Managing Web Infrastructure Systems With Windows Power Shell™ 2.0 90Microsoft TechNet
 
System Center 2012 for VMware Infrastructure
System Center 2012 for VMware InfrastructureSystem Center 2012 for VMware Infrastructure
System Center 2012 for VMware InfrastructureBryan Dady
 
CloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 Preview
CloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 PreviewCloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 Preview
CloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 PreviewChip Childers
 
Building Private Iaas Cloud
Building Private Iaas CloudBuilding Private Iaas Cloud
Building Private Iaas CloudLai Yoong Seng
 
Scvmm Technical Overview.Son Vu
Scvmm Technical Overview.Son VuScvmm Technical Overview.Son Vu
Scvmm Technical Overview.Son Vuvncson
 
SIM204-What's Coming in Virtual Machine Manager 2012?
SIM204-What's Coming in Virtual Machine Manager 2012?SIM204-What's Coming in Virtual Machine Manager 2012?
SIM204-What's Coming in Virtual Machine Manager 2012?Lai Yoong Seng
 
Managing Hyper-V With PowerShell
Managing Hyper-V With PowerShellManaging Hyper-V With PowerShell
Managing Hyper-V With PowerShellRavikanth Chaganti
 
Deploying Microsoft System Center in Days
Deploying Microsoft System Center in DaysDeploying Microsoft System Center in Days
Deploying Microsoft System Center in DaysPowerONPlatforms
 
Vs2010 Apiit Mix On Campus_Ngan Seok Chern
Vs2010 Apiit Mix On Campus_Ngan Seok ChernVs2010 Apiit Mix On Campus_Ngan Seok Chern
Vs2010 Apiit Mix On Campus_Ngan Seok ChernQuek Lilian
 
How to Deploy WSO2 Enterprise Integrator in Containers
How to Deploy WSO2 Enterprise Integrator in ContainersHow to Deploy WSO2 Enterprise Integrator in Containers
How to Deploy WSO2 Enterprise Integrator in ContainersWSO2
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"Volker Linz
 
Microsoft private cloud
Microsoft private cloudMicrosoft private cloud
Microsoft private cloudebuc
 
Techdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosTechdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosMike Martin
 
Ws08 R2 Itpro Session 1 Technical Overview Part1
Ws08 R2 Itpro Session 1 Technical Overview Part1Ws08 R2 Itpro Session 1 Technical Overview Part1
Ws08 R2 Itpro Session 1 Technical Overview Part1chenley
 
A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0Sarah Dutkiewicz
 

Similar a Automating Windows Server 2008 R2 Administration with Windows PowerShell (20)

CIT-2697 - Customer Success Stories with IBM PureApplication System
CIT-2697 - Customer Success Stories with IBM PureApplication SystemCIT-2697 - Customer Success Stories with IBM PureApplication System
CIT-2697 - Customer Success Stories with IBM PureApplication System
 
Introduction To Windows Power Shell
Introduction To Windows Power ShellIntroduction To Windows Power Shell
Introduction To Windows Power Shell
 
Managing Web Infrastructure Systems With Windows Power Shell™ 2.0 90
Managing Web Infrastructure Systems With Windows Power Shell™ 2.0 90Managing Web Infrastructure Systems With Windows Power Shell™ 2.0 90
Managing Web Infrastructure Systems With Windows Power Shell™ 2.0 90
 
System Center 2012 for VMware Infrastructure
System Center 2012 for VMware InfrastructureSystem Center 2012 for VMware Infrastructure
System Center 2012 for VMware Infrastructure
 
CloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 Preview
CloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 PreviewCloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 Preview
CloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 Preview
 
Building Private Iaas Cloud
Building Private Iaas CloudBuilding Private Iaas Cloud
Building Private Iaas Cloud
 
Scvmm Technical Overview.Son Vu
Scvmm Technical Overview.Son VuScvmm Technical Overview.Son Vu
Scvmm Technical Overview.Son Vu
 
SIM204-What's Coming in Virtual Machine Manager 2012?
SIM204-What's Coming in Virtual Machine Manager 2012?SIM204-What's Coming in Virtual Machine Manager 2012?
SIM204-What's Coming in Virtual Machine Manager 2012?
 
Managing Hyper-V With PowerShell
Managing Hyper-V With PowerShellManaging Hyper-V With PowerShell
Managing Hyper-V With PowerShell
 
Deploying Microsoft System Center in Days
Deploying Microsoft System Center in DaysDeploying Microsoft System Center in Days
Deploying Microsoft System Center in Days
 
10215 A 04
10215 A 0410215 A 04
10215 A 04
 
Vs2010 Apiit Mix On Campus_Ngan Seok Chern
Vs2010 Apiit Mix On Campus_Ngan Seok ChernVs2010 Apiit Mix On Campus_Ngan Seok Chern
Vs2010 Apiit Mix On Campus_Ngan Seok Chern
 
How to Deploy WSO2 Enterprise Integrator in Containers
How to Deploy WSO2 Enterprise Integrator in ContainersHow to Deploy WSO2 Enterprise Integrator in Containers
How to Deploy WSO2 Enterprise Integrator in Containers
 
Lets vRealize level -100 Presentation
Lets vRealize level -100 PresentationLets vRealize level -100 Presentation
Lets vRealize level -100 Presentation
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"
 
Microsoft private cloud
Microsoft private cloudMicrosoft private cloud
Microsoft private cloud
 
DeltaV Virtualization
DeltaV VirtualizationDeltaV Virtualization
DeltaV Virtualization
 
Techdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosTechdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err Microcosmos
 
Ws08 R2 Itpro Session 1 Technical Overview Part1
Ws08 R2 Itpro Session 1 Technical Overview Part1Ws08 R2 Itpro Session 1 Technical Overview Part1
Ws08 R2 Itpro Session 1 Technical Overview Part1
 
A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0
 

Último

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Último (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Automating Windows Server 2008 R2 Administration with Windows PowerShell

  • 1. Automating Windows Server 2008 R2 Administration with Windows PowerShell Aleksandar Nikolić, PowerShell MVP Twitter: @alexandair October 20, 2011
  • 2. What is Windows PowerShell? • Not just a command-line shell • Not just a scripting language • An automation engine, an automation platform • Designed especially for system administration • Cmdlets – built-in PowerShell commands
  • 3. Why Windows PowerShell? (1) • To automate administrative tasks • Manage the computers from the command-line • Access to file system, Registry, certificate store… • The Admin Development Model – An interactive shell -> quick and dirty scripting -> a formal production scripting • Based on the .NET Framework
  • 4. Why Windows PowerShell? (2) • Consistency and discoverability • Standards-based management (WMI/CIM and WSMan) • Extensible (PowerShell modules/snap-ins) • Great help system • PowerShell vs. GUI PowerShell and GUI
  • 5. How to get it? • Windows PowerShell v2 • Windows 7 and Server 2008 R2 – A part of the operating system – Server Core! (optional feature) • XP SP3, Vista SP2, Server 2003 SP2, and 2008 SP2 – Windows Management Framework (KB968929) – Windows Update and WSUS
  • 6. Windows PowerShell in a Nutshell • Cmdlets (Verb-Noun) • PSProviders and PSDrives • Get-Help, Get-Command, Get-Member, Get-PSDrive • Pipeline • Sends objects down the pipeline • -WhatIf and –Confirm parameters
  • 8. Automating Management Tasks • Standards-based management (WMI/CIM and WSMan) • Local and remote • PowerShell jobs • Task scheduling
  • 9. Management Stack in PowerShell v2 Management DCOM DCOM WMI DCOM Providers Application Client Service Engine Providers WMI Server Default PowerShell WinRM WinRM PowerShell Manager WS-Management Endpoint PowerShell Remoting Client Service Console Custom PowerShell Endpoint
  • 10. Standards-Based Management ion Communicat Pathway 0) rt 8 po p( htt Internet wsman.msft.net Managed Source Managed Source Management Station Management Station • Protocol: DMTF Standard Protocol: Web Services Management (WSMan) • Agent: The WinRM service in Windows implements the server role of the WSMan protocol. WMI implements the CIMOM. • Tool: WSMan cmdlets allow access to any device that complies with CIM and WSMan standards • Extensions: Microsoft extensions to WSMan enable PowerShell remoting (1-1, 1-many, many-1)
  • 12. Extending Windows PowerShell • Think about MMC snap-ins • A set of related PowerShell functionalities • To package and deploy PowerShell functionalities • PSSnapins (v1+) – Get-PSSnapin –Registered – Quest AD cmdlets and VMware vSphere PowerCLI cmdlets • Modules (v2+) – Get-Module –ListAvailable – include cmdlets, providers, functions, variables, aliases
  • 13. Built-in Modules Name Command to import module or add snap-in Active Directory Rights Management Services Import-Module ADRMS module for Windows PowerShell Application ID Policy Management module for Import-Module AppLocker Windows PowerShell Best Practice Analyzer module for Windows Import-Module BestPractices PowerShell Background Intelligent Transfer Service (BITS) Import-Module BITSTransfer module for Windows PowerShell Server Manager module for Windows PowerShell Import-Module ServerManager Troubleshooting pack support Import-Module TroubleshootingPack
  • 14. Name Required installed role or feature Command to import module or add snap-in Active Directory module for Windows PowerShell Requires installation of the Active Directory Domain Import-Module ActiveDirectory Services role Active Directory Rights Management Services Requires installation of the AD RMS role. Import-Module ADRMSAdmin administration module for Windows PowerShell Failover Clusters module for Windows PowerShell Requires installation of the Failover Clustering Import-Module FailoverClusters feature. Group Policy module for Windows PowerShell Requires installation of the Group Policy Import-Module GroupPolicy Management feature. Network Load Balancing Clusters module for Requires installation of the Network Load Balancing Import-Module NetworkLoadBalancingClusters Windows PowerShell feature. Remote Desktop Services module for Windows Requires installation of the Remote Desktop Import-Module RemoteDesktopServices PowerShell Services role. Server Migration module for Windows PowerShell Requires installation of the Windows Server Add-PSSnapin Migration Tools feature Microsoft.Windows.ServerManager.Migration Windows Backup snap-in for Windows PowerShell Requires installation of the Windows Server Backup Add-PSSnapin Windows.ServerBackup Features: Windows Server Backup and Command- line Tools. Internet Information Services (IIS) module for Requires installation of the Web Server (IIS) role Import-Module WebAdministration Windows PowerShell Web Services for Management (WS-Management) Requires installation of Web Services for Add-PSSnapin Microsoft.WSMan.Management Management (WS-Management) role
  • 16. Further Reading Windows PowerShell in Action, Second Edition Bruce Payette http://www.manning.com/payette2/ Windows PowerShell Cookbook, Second Edition Lee Holmes http://oreilly.com/catalog/9780596801519 Administrator's Guide to Windows PowerShell Remoting Dr. Tobias Weltner, Aleksandar Nikolic, Richard Giles http://powershell.com/cs/media/p/4908.aspx
  • 17. Requirements • Windows PowerShell requires Microsoft .NET Framework 2.0 SP1 • PowerShell ISE requires Microsoft .NET Framework 3.5 SP1 • Out-GridView requires Microsoft .NET Framework 3.5 SP1 • Get-WinEvent requires Vista or newer and Microsoft .NET Framework 3.5 • Get-Counter and Import-Counter require Vista or newer • Export-Counter requires Windows 7
  • 18. Microsoft Resources • Microsoft Windows PowerShell – http://www.microsoft.com/powershell • Windows PowerShell Team Blog – http://blogs.msdn.com/PowerShell • MS TechNet Script Center – http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx • PowerShell Forum – http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/ • Windows PowerShell Survival Guide – http://social.technet.microsoft.com/wiki/contents/articles/windows- powershell-survival-guide.aspx
  • 19. Community Resources • PowerShell Community – http://powershellcommunity.org • PowerShell Code Repository – http://poshcode.org • PowerShell.com Community – http://powershell.com • PowerGUI.org Community – http://powergui.org • PowerShell Magazine – http://powershellmagazine.com • irc.freenode.net #PowerShell
  • 20. Thank you for your attention.
  • 21. Openness and Interoperability @Microsoft Microsoft and Port25 Codeplex Open Source blogs from the platform resources for gateway for deeper community and the developers and exploration of open OSS Lab teams consumers of open source engagements http://Port25.technet.com source projects http://www.microsoft.com/ http://www.codeplex.com openness Interoperability Open Up Shared Source Bridges cross-Industry portal for technical collaborative Interoperability and programmatically works Standards activities sharing code http://www.interoperability http://www.microsoft.com/ http://www.microsoft.com/ bridges.com interop/openup sharedsource OData Open Spec BizSpark open source starter kit protocols, file formats, Program for Start-Up for Internet publishing of standards, technical companies from both Government datasets specifications commercial and open using the Open Data http://www.microsoft.com/ source backgrounds http://ogdisdk.cloudapp.net openspecifications http://www.microsoft.com/ bizspark How can I receive up-to-date Openness announcements from Microsoft? In addition to the websites above, you can receive regular updates to Microsoft’s openness, interoperability and standards efforts via the following channels: • http://blogs.technet.com/b/openness/ • http://blogs.msdn.com/b/interoperability/ • http://twitter.com/OpenAtMicrosoft • http://port25.technet.com • http://channel9.msdn.com/Blogs/Interoperability
  • 22. Please rate this lecture and WIN HTC MOZART! Help us choose the best Sinergija lecturer! Telekom Srbija and Microsoft will award you – at the conference end, we’ll give one HTC Mozart WP7 phone to someone from the audience – randomly. Go to www.mssinergija.net, log in and cast your votes. You can rate only lectures that you were present at, just once. More lectures you rate, more chances you have. Please use computers at the front of this room, or rate lecture from your phone or home computer, at Sinergija portal. This prize contest will end at Thursday, October 20th at 9 PM. Winner will be announced at the official Sinergija web portal, www.mssinergija.net is a friend of Sinergija 2011 Conference and Imagine Cup student competition in Serbia.

Notas del editor

  1. Providers, PS drives
  2. Providers, PS drives