Feb 2010 Intro To Remoteing Part1

1,423 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,423
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
17
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Feb 2010 Intro To Remoteing Part1

  1. 1. Introduction to PowerShell Remoting, Part 1<br />Matt Johnson, GSEC, MCSE<br />matt@michiganpowershell.com<br />
  2. 2. What we are going to cover?<br />An simple intro to remoting<br />Remoting Prerequisites<br />Basic Remoting using –ComputerName<br />Setting up Remoting<br />
  3. 3. A simple intro to remoting<br />
  4. 4. In Version 1.0<br />In version 1.0, the only command available with –ComputerName was Get-WMIObject<br />This made managing a remote PC complicated.<br />
  5. 5. New in V2!<br />Some cmdlets were updated with the –ComputerName parameter.<br />Get-Process<br />Get-Service<br />GetWinEvent<br />GetEventLog<br />Restart-Computer<br />Stop-Computer<br />Test-Connection<br />
  6. 6. New in V2! Cont….<br />Remote console via PS Sessions.<br />Kinda like SSH but much cooler (since it is PowerShell)<br />You can run ANY command on the remote PC.<br />Can run interactively or via jobs<br />
  7. 7. Remoting Prerequisites<br />
  8. 8. What you need<br />Windows 7 and Windows Server 2008 R2 has the necessary bits<br />Windows Vista, XP, Server 2003 and Server 2008 you will need the Windows Management Framework<br />Windows PowerShell 2.0, Windows Remote Management (WinRM) 2.0, and Background Intelligent Transfer Service (BITS) 4.0<br />
  9. 9. What version am I using?<br />To check your PowerShell version, use the variable $PSVersionTable<br />
  10. 10. Things to remember beforehand<br />You MUST be in the Administrators group on the remote PC.<br />Both the remote and local computers must be configured to use remoting. <br />You must have PowerShell and the related bits installed on all machines<br />
  11. 11. Things to remember Cont…<br />On current versions of windows. The network type must be work or home. Public will not work. <br />Any policies, ie group policies, on the remote pc are in effect in remote PowerShell sessions. Keep that in mind if something isn’t working as expected.<br />
  12. 12. Basic Remoting using –ComputerName<br />
  13. 13. Commands with -ComputerName<br />Get-Process<br />Get-Service<br />GetWinEvent<br />GetEventLog<br />Restart-Computer<br />Stop-Computer<br />Test-Connection<br />
  14. 14. Demo Time!<br />Get-EventLog<br />Get-Process<br />
  15. 15. Setting Up Remoting<br />
  16. 16. Enabling PowerShell Remoting<br />Remember to be an Administrator!<br />Open a PowerShell Prompt on the machine and type Enable-PSRemoting.<br />
  17. 17. What is it doing?<br />Runs the Set-WSManQuickConfigcmdlet, which performs the following tasks: <br />Starts the WinRM service. <br />Sets the startup type on the WinRM service to Automatic. <br />Creates a listener to accept requests on any IP address. <br />Enables a firewall exception for WS-Management communications. <br />Enables all registered Windows PowerShell session configurations to receive instructions from a remote computer. <br />Registers the &quot;Microsoft.PowerShell&quot; session configuration, if it is not already registered. <br />Registers the &quot;Microsoft.PowerShell32&quot; session configuration on 64-bit computers, if it is not already registered. <br />Removes the &quot;Deny Everyone&quot; setting from the security descriptor for all the registered session configurations. <br />Restarts the WinRM service to make the preceding changes effective. <br />
  18. 18. Running x64?<br />On x64 hardware, a 32-bit listener is installed. <br />
  19. 19. Firewall Exception<br />
  20. 20. Remoting is now enabled!<br />What do you do next?<br />Configure PSRemoting<br />Run Scripts / Commands Remotely<br />
  21. 21. In Two Months!<br />Running Interactively with PS Remoting<br />Running Jobs with PS Remoting<br />WS-MAN Configuration<br />
  22. 22. Questions?<br />
  23. 23. Contact Info<br />Matt Johnson<br />Phone: +1 (734) 931-0323<br />Web: http://www.mwjcomputing.com/<br />Blog: http://www.mwjcomputing.com/blog/<br />Twitter: http://twitter.com/mwjcomputing<br />Email: matt@michiganpowershell.com<br />
  24. 24. Thanks!<br />

×