Automating Windows Server 2008 R2 Administration with Windows PowerShell
Upcoming SlideShare
Loading in...5
×
 

Automating Windows Server 2008 R2 Administration with Windows PowerShell

on

  • 4,006 views

This sessions is intended for anyone who has to manage Windows Server 2008 R2. Windows Server 2008 R2 provide the automation platform and set of solutions that empower the administrators to optimize ...

This sessions is intended for anyone who has to manage Windows Server 2008 R2. Windows Server 2008 R2 provide the automation platform and set of solutions that empower the administrators to optimize their server management experience. Windows PowerShell v2 and its built-in modules allow you to automate nearly any task for managing Windows Server. Be efficient, don't waste your time clicking through the GUIs, learn how to use Windows PowerShell, and move from repeated tasks to automated tasks.

Statistics

Views

Total Views
4,006
Views on SlideShare
4,005
Embed Views
1

Actions

Likes
1
Downloads
124
Comments
0

1 Embed 1

http://www.slashdocs.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Providers, PS drives
  • Providers, PS drives

Automating Windows Server 2008 R2 Administration with Windows PowerShell Automating Windows Server 2008 R2 Administration with Windows PowerShell Presentation Transcript

  • Automating Windows Server 2008 R2Administration with Windows PowerShellAleksandar Nikolić, PowerShell MVPTwitter: @alexandairOctober 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:basiccommands
  • 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 PowerShellManager WS-Management Endpoint PowerShell Remoting Client ServiceConsole 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:managementtasks
  • 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 ModulesName Command to import module or add snap-inActive Directory Rights Management Services Import-Module ADRMSmodule for Windows PowerShellApplication ID Policy Management module for Import-Module AppLockerWindows PowerShellBest Practice Analyzer module for Windows Import-Module BestPracticesPowerShellBackground Intelligent Transfer Service (BITS) Import-Module BITSTransfermodule for Windows PowerShellServer Manager module for Windows PowerShell Import-Module ServerManagerTroubleshooting pack support Import-Module TroubleshootingPack
  • Name Required installed role or feature Command to import module or add snap-inActive Directory module for Windows PowerShell Requires installation of the Active Directory Domain Import-Module ActiveDirectory Services roleActive Directory Rights Management Services Requires installation of the AD RMS role. Import-Module ADRMSAdminadministration module for Windows PowerShellFailover 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 NetworkLoadBalancingClustersWindows PowerShell feature.Remote Desktop Services module for Windows Requires installation of the Remote Desktop Import-Module RemoteDesktopServicesPowerShell Services role.Server Migration module for Windows PowerShell Requires installation of the Windows Server Add-PSSnapin Migration Tools feature Microsoft.Windows.ServerManager.MigrationWindows 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 WebAdministrationWindows PowerShellWeb Services for Management (WS-Management) Requires installation of Web Services for Add-PSSnapin Microsoft.WSMan.Management Management (WS-Management) role
  • DEMO:built-inmodules
  • Further ReadingWindows PowerShell in Action, Second EditionBruce Payettehttp://www.manning.com/payette2/Windows PowerShell Cookbook, Second EditionLee Holmeshttp://oreilly.com/catalog/9780596801519Administrators Guide to Windows PowerShell RemotingDr. Tobias Weltner, Aleksandar Nikolic, Richard Gileshttp://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-Upfor Internet publishing of standards, technical companies from both Government datasets specifications commercial and open using the Open Data http://www.microsoft.com/ source backgroundshttp://ogdisdk.cloudapp.net openspecifications http://www.microsoft.com/ bizsparkHow can I receive up-to-date Openness announcements from Microsoft?In addition to the websites above, you can receive regular updates to Microsoft’sopenness, 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.