1 / 18

virtual techdays

INDIA │ 9-11 February 2011. virtual techdays. Monitoring and managing remote Windows 7 desktops with Windows PowerShell. Ravikanth C │ Dell Inc. About Me. Work at Dell Inc. Windows PowerShell MVP Author of: Free eBook: Layman’s guide to PowerShell 2.0 remoting

sela
Download Presentation

virtual techdays

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. INDIA │ 9-11 February 2011 virtual techdays Monitoring and managing remote Windows 7 desktops with Windows PowerShell Ravikanth C │ Dell Inc.

  2. About Me • Work at Dell Inc. • Windows PowerShell MVP • Author of: • Free eBook: Layman’s guide to PowerShell 2.0 remoting • Free eBook: WMI Query Language via PowerShell • Cheat Sheet: SharePoint 2010 PowerShell cmdlets • Blog at: http://www.ravichaganti.com/blog • Twitter: @Ravikanth

  3. Session Outline • Objectives • What is PowerShell? • Cmdlets to manage remote systems • PowerShell remoting for remote system management • PowerShell for WMI event monitoring • Software & hardware inventory • Takeaways • Learn how to use PowerShell cmdlets to manage remote systems • Learn how to use PowerShell remoting • Learn how to monitor remote systems using WMI

  4. What is PowerShell? • Object-based Shell • Interactive commands • Scripting language • Automate everything • Sharable and reusable • Comes built-in on Windows 7 & Windows Server 2008 R2 • Download available for Windows XP, Windows 2003, and Windows Vista

  5. Cmdlets to manage remote systems • 35 cmdlets with –ComputerName parameter • Get-Command-typecmdlet|Where{$_.Definition-like"*-ComputerName*"}

  6. Working with performance data • One cmdlet • Get-Counter • Gets live, real-time performance counter data • Sample interval and Maximum samples can be altered • Run as administrator to be able to read all counters

  7. INDIA │ 9-11 February 2011 virtual techdays DEMO: Working with Performance Data

  8. Working with processes • Five cmdlets • Get-Process • Debug-Process • Start-Process • Stop-Process • Wait-Process • Start-Process and Stop-Process have no –ComputerName Parameter

  9. INDIA │ 9-11 February 2011 virtual techdays DEMO: Working with processes

  10. PowerShell remoting • Not all remoting is the same • Get-Process, Get-Service, and others use .NET Framework methods • Not all cmdlets have –ComputerName parameter • Remoting requirements: • Windows PowerShell 2.0 • Microsoft .NET Framework 2.0 or later • Windows Remote Management 2.0 • To configure PowerShell remoting: • start PowerShell as admin • Use Enable-PSRemoting

  11. Remoting Methods • Supports both fan-in and fan-out remoting • Invoke-Command • Can be used for both 1-1 and 1-many remoting • Interactive remoting • Similar to a telnet session • Enter-PSSession • Implicit remoting • Import a remote session into local session • Import-PSSession

  12. INDIA │ 9-11 February 2011 virtual techdays DEMO: PowerShell remoting

  13. WMI Event monitoring • Events generated by operating system and several other components • Use Register-WMIEvent cmdlet • Create temporary consumer to trigger an action based on an event • Requires knowledge of WMI Query Language • Unregister-Event to delete the consumer

  14. INDIA │ 9-11 February 2011 virtual techdays DEMO: WMI Event monitoring

  15. Software Inventory • Use Get-WMIObject cmdlet • For remote systems use –ComputerName parameter • Query Win32_Product WMI class • For software installed via MSI • Install & Uninstall software remotely • Query Windows registry for a list of all other software

  16. INDIA │ 9-11 February 2011 virtual techdays DEMO: Software Inventory

  17. INDIA │ 9-11 February 2011 virtual techdays • PowerShell remoting ebooks • Layman’s guide to PowerShell remoting: http://www.ravichaganti.com/blog/?p=1780 • Administrator’s guide to PowerShell remoting: http://powershell.com/cs/media/p/4908.aspx • WMI Query Language • http://www.ravichaganti.com/blog/?p=1979 • Getting started with PowerShell • http://technet.microsoft.com/en-us/scriptcenter/dd742419 RESOURCES

  18. THANKS│9-11 February 2011 virtual techdays Ravikanth@Ravichaganti.com │ @Ravikanth (Twitter)

More Related