Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

PowerShell Remoting and Jobs (TechMentor Fall 2011)


Published on

Published in: Business, Technology
  • Be the first to comment

  • Be the first to like this

PowerShell Remoting and Jobs (TechMentor Fall 2011)

  1. 1. Windows PowerShell Remoting and Background Jobs Don Jones Learn Windows PowerShell in 2 Days / Part 3
  2. 2. Welcome! <ul><li>This is one of four sessions designed to teach specific Windows PowerShell skills </li></ul><ul><li>Don Jones </li></ul><ul><ul><li>Windows PowerShell MVP Award Recipient </li></ul></ul><ul><ul><li>PowerShell Columnist for Microsoft TechNet Magazine </li></ul></ul><ul><ul><li>“ Decision Maker” Columnist for Redmond Magazine </li></ul></ul><ul><ul><li>Author, Learn Windows PowerShell in a Month of Lunches </li></ul></ul><ul><ul><li>Co-Author, Windows PowerShell v2.0: TFM </li></ul></ul><ul><ul><li>Creator of numerous self-paced PowerShell training videos for </li></ul></ul>
  3. 3. Agenda <ul><li>Remoting Technology Backgrounder </li></ul><ul><li>Security and Configuration Concerns </li></ul><ul><li>1:1 and 1:n Remoting </li></ul><ul><li>Implicit Remoting </li></ul><ul><li>Background Jobs </li></ul>
  4. 4. Caution: Demos Ahead! <ul><li>Please note: This session is built primarily around demonstrations, and answering your questions. You won’t see many slides. </li></ul><ul><li>If you’re looking for additional written resources, there are lots to choose from (including many free ones) – the closing slide will list some key URLs </li></ul><ul><li>Key commands are on the following “reference” slides so you don’t forget ‘ em </li></ul>
  5. 5. Bonus <ul><li>I’ll post any scripts, as well as these slides. </li></ul><ul><li>Download location will be listed at the end of this session. </li></ul><ul><li>Don’t bother copying down commands – you’ll be able to download the whole session! </li></ul>
  6. 6. Reference: Remoting <ul><li>Enable-PSRemoting (Never Set-WSManQuickConfig) </li></ul><ul><li>Invoke-Command (for 1:n Remoting) </li></ul><ul><li>Enter-PSSession and Exit-PSSession (for 1:1 Remoting) </li></ul><ul><li>Import-PSSession (for Implicit Remoting) </li></ul><ul><li>WSMAN: Drive (for configuration) </li></ul><ul><li>WinRM is the service, WS-MAN is the protocol </li></ul>
  7. 7. Reference: Jobs <ul><li>Get-WmiObject –AsJob Starts a WMI job (doesn’t need remoting) </li></ul><ul><li>Start-Job Starts a local job (which is allowed to access remote resources) </li></ul><ul><li>Invoke-Command –AsJob Starts a job which sends command(s) to remote computer(s) </li></ul>
  8. 8. Reference: Implicit Remoting <ul><li>Create a persistent session New-PSSession </li></ul><ul><li>Tell the session to load a module Invoke-Command –session (Get-PSSession –computername whatever ) </li></ul><ul><li>Import that module’s commands Import-PSSession –session (Get-PSSession –computername whatever ) –module whatever </li></ul>
  9. 9. Thank You! <ul><li>Please feel free to hit me up with any remaining questions between sessions </li></ul><ul><li>Please submit a session evaluation! These are an extremely important part of ensuring that the conference continues to provide you with the education you need! </li></ul><ul><li>Resources and URLs on the next slide… </li></ul>
  10. 10. Remember! <ul><li>Slides, and scripts will be posted within a few days. </li></ul><ul><li>You’re welcome to download whatever you like; please don’t re-post anything elsewhere on the Internet. </li></ul><ul><li>For the download URL, see my Twitter feed: </li></ul><ul><ul><li>@concentrateddon </li></ul></ul><ul><ul><li> </li></ul></ul>
  11. 11. More PowerShell Resources <ul><li>Web Sites </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li> ConcentratedDon </li></ul><ul><li>ITPro. </li></ul><ul><li>Thank you again for attending! </li></ul><ul><li>Available Here! </li></ul>