powershell remoting and jobs (techmentor fall 2011)

11
Windows PowerShell Windows PowerShell Remoting and Remoting and Background Jobs Background Jobs Don Jones Don Jones ConcentratedTech.com Learn Windows PowerShell in 2 Days / Part 3

Upload: concentrated-technology

Post on 24-May-2015

928 views

Category:

Business


0 download

TRANSCRIPT

Page 1: PowerShell Remoting and Jobs (TechMentor Fall 2011)

Windows PowerShell Windows PowerShell Remoting and Remoting and Background JobsBackground JobsDon JonesDon JonesConcentratedTech.com

Learn Windows PowerShell in 2 Days / Part 3

Page 2: PowerShell Remoting and Jobs (TechMentor Fall 2011)

Welcome!Welcome!

This is one of four sessions designed to teach specific Windows PowerShell skills

Don Jones– Windows PowerShell MVP Award Recipient– PowerShell Columnist for Microsoft TechNet

Magazine– “Decision Maker” Columnist for Redmond Magazine– Author, Learn Windows PowerShell in a Month of

Lunches– Co-Author, Windows PowerShell v2.0: TFM– Creator of numerous self-paced PowerShell training

videos for CBTNuggets.com.

Page 3: PowerShell Remoting and Jobs (TechMentor Fall 2011)

AgendaAgenda

Remoting Technology Backgrounder Security and Configuration Concerns 1:1 and 1:n Remoting Implicit Remoting Background Jobs

Page 4: PowerShell Remoting and Jobs (TechMentor Fall 2011)

Caution: Demos Ahead!Caution: Demos Ahead!

Please note: This session is built primarily around demonstrations, and answering your questions. You won’t see many slides.

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

Key commands are on the following “reference” slides so you don’t forget ‘em

Page 5: PowerShell Remoting and Jobs (TechMentor Fall 2011)

BonusBonus

I’ll post any scripts, as well as these slides.

Download location will be listed at the end of this session.

Don’t bother copying down commands – you’ll be able to download the whole session!

Page 6: PowerShell Remoting and Jobs (TechMentor Fall 2011)

Reference: RemotingReference: Remoting

Enable-PSRemoting (Never Set-WSManQuickConfig)

Invoke-Command (for 1:n Remoting) Enter-PSSession and Exit-PSSession

(for 1:1 Remoting) Import-PSSession (for Implicit

Remoting) WSMAN: Drive (for configuration) WinRM is the service, WS-MAN is the

protocol

Page 7: PowerShell Remoting and Jobs (TechMentor Fall 2011)

Reference: JobsReference: Jobs

Get-WmiObject –AsJobStarts a WMI job (doesn’t need remoting)

Start-JobStarts a local job (which is allowed to access remote resources)

Invoke-Command –AsJobStarts a job which sends command(s) to remote computer(s)

Page 8: PowerShell Remoting and Jobs (TechMentor Fall 2011)

Reference: Implicit RemotingReference: Implicit Remoting

Create a persistent sessionNew-PSSession

Tell the session to load a moduleInvoke-Command –session (Get-PSSession –computername whatever)

Import that module’s commandsImport-PSSession –session (Get-PSSession –computername whatever) –module whatever

Page 9: PowerShell Remoting and Jobs (TechMentor Fall 2011)

Thank You!Thank You!

Please feel free to hit me up with any remaining questions between sessions

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!

Resources and URLs on the next slide…

Page 10: PowerShell Remoting and Jobs (TechMentor Fall 2011)

Remember!Remember!

Slides, and scripts will be posted within a few days.

You’re welcome to download whatever you like; please don’t re-post anything elsewhere on the Internet.

For the download URL, see my Twitter feed:– @concentrateddon– Twitter.com/concentrateddon

Page 11: PowerShell Remoting and Jobs (TechMentor Fall 2011)

More PowerShell ResourcesMore PowerShell Resources

Web Sites ShellHub.com Bit.ly/DonJones YouTube.com/

ConcentratedDon ITPro.ConcentratedTech.

com

Thank you again for attending!

Available Here!