SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Introduction to PowerShell Remoting, Part 2 Matt Johnson, GSEC, MCSE matt@michiganpowershell.com
What are we going to cover? Remote Commands Reusable  Sessions with PS Remoting Interactive Sessions with PS Remoting Temporary Sessions with PS Remoting
Remote Commands New-PSSession Get-PSSession Enter-PSSession Exit-PSSession Remove-PSSession Invoke-Command
PS Remoting Help Get-Help  about_Remoting about_PSSessions about_Remote_Requirements about_Remote_FAQ about_Remote_Troubleshooting
Reusable  Sessions with PS Remoting It is really easy to create  a new PS Session $dc = New-PSSession –computerName DC1 It is also really easy to enter that session Enter-PSSession –Session $dc More about that later!
Reusable  Sessions with PS Remoting Cont.. Less network / CPU cycles used when using Reusable sessions compared to running individual commands. You can run one off commands if you are using Reusable sessions Use Reusable sessions when you need to run more than one command against a computer.
Demo
Running Commands against muliple machines $sessions = New-PSSession pc1, pc2, pc3 Invoke-Command { Md HKLM:oftwarewjcomputing  } –Session $sessions
Passing Variables to Remote Hosts You can pass variables to the Invoke-Command cmdlet Your script block must use the param statement Use the –ArgumentList switch
Demo
Interactive Sessions Run at a console just like you are sitting there at the machine.  Run all normal PowerShell commands You can restrict the commands that can be run remotely.
Demo
Code to change what is allowed to run # Disable access to all applications $ExecutionContext.SessionState.Applications.Clear() # Disable access to scripts $ExecutionContext.SessionState.Scripts.Clear() # Define a list of allowed commands $RequiredCommands = "Exit-PSSession", "Get-Command", "Get-FormatData", "Get-Help", "Measure-Object", "Out-Default", "Select-Object" $Commands = $RequiredCommands + "Get-Process", "Get-Service", "Where-Object", "ForEach-Object" # Make everything except the allowed commands private (not visible) Get-Command | Where-Object {$Commands -notcontains $_.Name} | ForEach-Object {$_.Visibility="Private"} # Restrict the language elements to a very limited set. The possible values are FullLanguage,RestrictedLanguage, and NoLanguage $ExecutionContext.SessionState.LanguageMode="RestrictedLanguage"
Code to change what is allowed to run cont. Save as: %windir%ystem32indowsPowerShell1.0estricted.ps1
Running single commands Use Invoke-Command Results are returned as text, not as objects Adds some overhead by doing it this way
DEMo
Remoting Resources Two very useful resources! Get-Help PowerShell.com’s Administrators Guide to PowerShell Remoting
Contact Matt Johnson Phone: +1 (734) 931-0323 Web: http://www.mwjcomputing.com/ Blog: http://www.mwjcomputing.com/blog/ Twitter: http://twitter.com/mwjcomputing Email: matt@michiganpowershell.com
Thanks!

Weitere ähnliche Inhalte

Was ist angesagt?

NSClient++ Workshop: 06 Scripting
NSClient++ Workshop: 06 ScriptingNSClient++ Workshop: 06 Scripting
NSClient++ Workshop: 06 ScriptingMichael Medin
 
Replica Sets (NYC NoSQL Meetup)
Replica Sets (NYC NoSQL Meetup)Replica Sets (NYC NoSQL Meetup)
Replica Sets (NYC NoSQL Meetup)MongoDB
 
Configuration of BIND DNS Server On CentOS 8
Configuration of BIND DNS Server On CentOS 8Configuration of BIND DNS Server On CentOS 8
Configuration of BIND DNS Server On CentOS 8Kaan Aslandağ
 
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...VCP Muthukrishna
 
Configuration Firewalld On CentOS 8
Configuration Firewalld On CentOS 8Configuration Firewalld On CentOS 8
Configuration Firewalld On CentOS 8Kaan Aslandağ
 
How to Fix Duplicate Packages in YUM on CentOS 7
How to Fix Duplicate Packages in YUM on CentOS 7How to Fix Duplicate Packages in YUM on CentOS 7
How to Fix Duplicate Packages in YUM on CentOS 7VCP Muthukrishna
 
Talk about Ansible and Infrastructure as Code
Talk about Ansible and Infrastructure as CodeTalk about Ansible and Infrastructure as Code
Talk about Ansible and Infrastructure as CodeSATOSHI TAGOMORI
 
Deploying systemd at scale
Deploying systemd at scaleDeploying systemd at scale
Deploying systemd at scaleDavide Cavalca
 
How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7VCP Muthukrishna
 
How To Install and Configure Screen on CentOS 7
How To Install and Configure Screen on CentOS 7How To Install and Configure Screen on CentOS 7
How To Install and Configure Screen on CentOS 7VCP Muthukrishna
 
Configuration of NTP Server on CentOS 8
Configuration of NTP Server on CentOS 8Configuration of NTP Server on CentOS 8
Configuration of NTP Server on CentOS 8Kaan Aslandağ
 
Presentation Linux Server setup Advance Networking
Presentation   Linux Server setup Advance NetworkingPresentation   Linux Server setup Advance Networking
Presentation Linux Server setup Advance NetworkingTariqul Islam Shohag
 
OSDC 2014: Jan-Piet Mens - Configuration Management with Ansible
OSDC 2014: Jan-Piet Mens - Configuration Management with Ansible OSDC 2014: Jan-Piet Mens - Configuration Management with Ansible
OSDC 2014: Jan-Piet Mens - Configuration Management with Ansible NETWAYS
 
Advanced Replication
Advanced ReplicationAdvanced Replication
Advanced ReplicationMongoDB
 
Install and Configure RSyslog – CentOS 7 / RHEL 7
Install and Configure RSyslog – CentOS 7 / RHEL 7Install and Configure RSyslog – CentOS 7 / RHEL 7
Install and Configure RSyslog – CentOS 7 / RHEL 7VCP Muthukrishna
 
How To Manage Linux User on RHEL 7
How To Manage Linux User on RHEL 7How To Manage Linux User on RHEL 7
How To Manage Linux User on RHEL 7VCP Muthukrishna
 

Was ist angesagt? (20)

NSClient++ Workshop: 06 Scripting
NSClient++ Workshop: 06 ScriptingNSClient++ Workshop: 06 Scripting
NSClient++ Workshop: 06 Scripting
 
Replica Sets (NYC NoSQL Meetup)
Replica Sets (NYC NoSQL Meetup)Replica Sets (NYC NoSQL Meetup)
Replica Sets (NYC NoSQL Meetup)
 
Configuration of BIND DNS Server On CentOS 8
Configuration of BIND DNS Server On CentOS 8Configuration of BIND DNS Server On CentOS 8
Configuration of BIND DNS Server On CentOS 8
 
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
 
Configuration Firewalld On CentOS 8
Configuration Firewalld On CentOS 8Configuration Firewalld On CentOS 8
Configuration Firewalld On CentOS 8
 
Install PostgreSQL on CentOS
Install PostgreSQL on CentOSInstall PostgreSQL on CentOS
Install PostgreSQL on CentOS
 
Plesk CLI Wrapper
Plesk CLI WrapperPlesk CLI Wrapper
Plesk CLI Wrapper
 
How to Fix Duplicate Packages in YUM on CentOS 7
How to Fix Duplicate Packages in YUM on CentOS 7How to Fix Duplicate Packages in YUM on CentOS 7
How to Fix Duplicate Packages in YUM on CentOS 7
 
Talk about Ansible and Infrastructure as Code
Talk about Ansible and Infrastructure as CodeTalk about Ansible and Infrastructure as Code
Talk about Ansible and Infrastructure as Code
 
Deploying systemd at scale
Deploying systemd at scaleDeploying systemd at scale
Deploying systemd at scale
 
How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7
 
How To Install and Configure Screen on CentOS 7
How To Install and Configure Screen on CentOS 7How To Install and Configure Screen on CentOS 7
How To Install and Configure Screen on CentOS 7
 
Firewalld LAB
Firewalld LABFirewalld LAB
Firewalld LAB
 
Configuration of NTP Server on CentOS 8
Configuration of NTP Server on CentOS 8Configuration of NTP Server on CentOS 8
Configuration of NTP Server on CentOS 8
 
Presentation Linux Server setup Advance Networking
Presentation   Linux Server setup Advance NetworkingPresentation   Linux Server setup Advance Networking
Presentation Linux Server setup Advance Networking
 
OSDC 2014: Jan-Piet Mens - Configuration Management with Ansible
OSDC 2014: Jan-Piet Mens - Configuration Management with Ansible OSDC 2014: Jan-Piet Mens - Configuration Management with Ansible
OSDC 2014: Jan-Piet Mens - Configuration Management with Ansible
 
GCP Deployment Manager Demo
GCP Deployment Manager DemoGCP Deployment Manager Demo
GCP Deployment Manager Demo
 
Advanced Replication
Advanced ReplicationAdvanced Replication
Advanced Replication
 
Install and Configure RSyslog – CentOS 7 / RHEL 7
Install and Configure RSyslog – CentOS 7 / RHEL 7Install and Configure RSyslog – CentOS 7 / RHEL 7
Install and Configure RSyslog – CentOS 7 / RHEL 7
 
How To Manage Linux User on RHEL 7
How To Manage Linux User on RHEL 7How To Manage Linux User on RHEL 7
How To Manage Linux User on RHEL 7
 

Andere mochten auch

Edisi 31 Okt Aceh
Edisi 31 Okt AcehEdisi 31 Okt Aceh
Edisi 31 Okt Acehepaper
 
Edisi 9 Medan
Edisi 9 MedanEdisi 9 Medan
Edisi 9 Medanepaper
 
Bab 9 Pembangunan Sumber Manusia
Bab 9 Pembangunan Sumber ManusiaBab 9 Pembangunan Sumber Manusia
Bab 9 Pembangunan Sumber Manusiazafeen zafeen
 
Edisi 10 April Nas
Edisi 10 April NasEdisi 10 April Nas
Edisi 10 April Nasepaper
 
Meeting with Investors - May 2015
Meeting with Investors - May 2015Meeting with Investors - May 2015
Meeting with Investors - May 2015TIM RI
 
2010 Shift Happened Vujade
2010 Shift Happened Vujade2010 Shift Happened Vujade
2010 Shift Happened VujadeVujàdé
 
Wie snackt in foodservice meer mof v
Wie snackt in foodservice meer mof vWie snackt in foodservice meer mof v
Wie snackt in foodservice meer mof vRien De Koning
 
Ch 1 mexico city
Ch 1 mexico cityCh 1 mexico city
Ch 1 mexico citypotasz
 
7jun nas
7jun nas7jun nas
7jun nasepaper
 
14jun nas
14jun nas14jun nas
14jun nasepaper
 
Industrial Plan 2016 2018
Industrial Plan 2016 2018Industrial Plan 2016 2018
Industrial Plan 2016 2018TIM RI
 
What's so special about christmas
What's so special about christmasWhat's so special about christmas
What's so special about christmasEhab Roufail
 
Taqwim smk landas 2011
Taqwim smk landas 2011Taqwim smk landas 2011
Taqwim smk landas 2011zafeen zafeen
 
MVC 3-RAZOR Validation
MVC 3-RAZOR ValidationMVC 3-RAZOR Validation
MVC 3-RAZOR ValidationKrunal Trivedi
 

Andere mochten auch (20)

Edisi 31 Okt Aceh
Edisi 31 Okt AcehEdisi 31 Okt Aceh
Edisi 31 Okt Aceh
 
Edisi 9 Medan
Edisi 9 MedanEdisi 9 Medan
Edisi 9 Medan
 
Bab 9 Pembangunan Sumber Manusia
Bab 9 Pembangunan Sumber ManusiaBab 9 Pembangunan Sumber Manusia
Bab 9 Pembangunan Sumber Manusia
 
Edisi 10 April Nas
Edisi 10 April NasEdisi 10 April Nas
Edisi 10 April Nas
 
Meeting with Investors - May 2015
Meeting with Investors - May 2015Meeting with Investors - May 2015
Meeting with Investors - May 2015
 
2010 Shift Happened Vujade
2010 Shift Happened Vujade2010 Shift Happened Vujade
2010 Shift Happened Vujade
 
Tnt
TntTnt
Tnt
 
Wie snackt in foodservice meer mof v
Wie snackt in foodservice meer mof vWie snackt in foodservice meer mof v
Wie snackt in foodservice meer mof v
 
Ch 1 mexico city
Ch 1 mexico cityCh 1 mexico city
Ch 1 mexico city
 
Stand Out in a Crowd
Stand Out in a CrowdStand Out in a Crowd
Stand Out in a Crowd
 
Tata group presentation
Tata group presentationTata group presentation
Tata group presentation
 
7jun nas
7jun nas7jun nas
7jun nas
 
14jun nas
14jun nas14jun nas
14jun nas
 
Industrial Plan 2016 2018
Industrial Plan 2016 2018Industrial Plan 2016 2018
Industrial Plan 2016 2018
 
What's so special about christmas
What's so special about christmasWhat's so special about christmas
What's so special about christmas
 
Airport Noise Presentation 2009
Airport Noise Presentation 2009Airport Noise Presentation 2009
Airport Noise Presentation 2009
 
WED- Gift Basket
WED- Gift BasketWED- Gift Basket
WED- Gift Basket
 
Park Plantings
Park PlantingsPark Plantings
Park Plantings
 
Taqwim smk landas 2011
Taqwim smk landas 2011Taqwim smk landas 2011
Taqwim smk landas 2011
 
MVC 3-RAZOR Validation
MVC 3-RAZOR ValidationMVC 3-RAZOR Validation
MVC 3-RAZOR Validation
 

Ähnlich wie April 2010-intro-to-remoting-part2

Managing enterprise with PowerShell remoting
Managing enterprise with PowerShell remotingManaging enterprise with PowerShell remoting
Managing enterprise with PowerShell remotingConcentrated Technology
 
PowerShell for SharePoint Developers
PowerShell for SharePoint DevelopersPowerShell for SharePoint Developers
PowerShell for SharePoint DevelopersBoulos Dib
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShellBoulos Dib
 
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdfLearn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdfClapperboardCinemaPV
 
Get-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for EvilGet-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for Eviljaredhaight
 
Automating Active Directory mgmt in PowerShell
Automating Active Directory mgmt in PowerShellAutomating Active Directory mgmt in PowerShell
Automating Active Directory mgmt in PowerShellConcentrated Technology
 
Session Server - Maintaing State between several Servers
Session Server - Maintaing State between several ServersSession Server - Maintaing State between several Servers
Session Server - Maintaing State between several ServersStephan Schmidt
 
Power shell training
Power shell trainingPower shell training
Power shell trainingDavid Brabant
 
Basic commands for powershell : Configuring Windows PowerShell and working wi...
Basic commands for powershell : Configuring Windows PowerShell and working wi...Basic commands for powershell : Configuring Windows PowerShell and working wi...
Basic commands for powershell : Configuring Windows PowerShell and working wi...Hitesh Mohapatra
 
Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands Ahmed El-Arabawy
 
PM : code faster
PM : code fasterPM : code faster
PM : code fasterPHPPRO
 
Windows power shell basics
Windows power shell basicsWindows power shell basics
Windows power shell basicsDan Morrill
 
Power shell for sp admins
Power shell for sp adminsPower shell for sp admins
Power shell for sp adminsRick Taylor
 

Ähnlich wie April 2010-intro-to-remoting-part2 (20)

PowerShell Remoting
PowerShell RemotingPowerShell Remoting
PowerShell Remoting
 
PowerShell 2.0 remoting
PowerShell 2.0 remotingPowerShell 2.0 remoting
PowerShell 2.0 remoting
 
Managing enterprise with PowerShell remoting
Managing enterprise with PowerShell remotingManaging enterprise with PowerShell remoting
Managing enterprise with PowerShell remoting
 
PowerShell - PowerForensics
PowerShell - PowerForensicsPowerShell - PowerForensics
PowerShell - PowerForensics
 
PowerShell for SharePoint Developers
PowerShell for SharePoint DevelopersPowerShell for SharePoint Developers
PowerShell for SharePoint Developers
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
 
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdfLearn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
 
Get-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for EvilGet-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for Evil
 
Automating Active Directory mgmt in PowerShell
Automating Active Directory mgmt in PowerShellAutomating Active Directory mgmt in PowerShell
Automating Active Directory mgmt in PowerShell
 
The Power of PowerShell: Advanced
The Power of PowerShell: Advanced The Power of PowerShell: Advanced
The Power of PowerShell: Advanced
 
Windows PowerShell
Windows PowerShellWindows PowerShell
Windows PowerShell
 
Session Server - Maintaing State between several Servers
Session Server - Maintaing State between several ServersSession Server - Maintaing State between several Servers
Session Server - Maintaing State between several Servers
 
Power shell training
Power shell trainingPower shell training
Power shell training
 
Automazione quotidiana in php
Automazione quotidiana in phpAutomazione quotidiana in php
Automazione quotidiana in php
 
Basic commands for powershell : Configuring Windows PowerShell and working wi...
Basic commands for powershell : Configuring Windows PowerShell and working wi...Basic commands for powershell : Configuring Windows PowerShell and working wi...
Basic commands for powershell : Configuring Windows PowerShell and working wi...
 
Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands
 
Php101
Php101Php101
Php101
 
PM : code faster
PM : code fasterPM : code faster
PM : code faster
 
Windows power shell basics
Windows power shell basicsWindows power shell basics
Windows power shell basics
 
Power shell for sp admins
Power shell for sp adminsPower shell for sp admins
Power shell for sp admins
 

Kürzlich hochgeladen

Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Kürzlich hochgeladen (20)

Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

April 2010-intro-to-remoting-part2

  • 1. Introduction to PowerShell Remoting, Part 2 Matt Johnson, GSEC, MCSE matt@michiganpowershell.com
  • 2. What are we going to cover? Remote Commands Reusable Sessions with PS Remoting Interactive Sessions with PS Remoting Temporary Sessions with PS Remoting
  • 3. Remote Commands New-PSSession Get-PSSession Enter-PSSession Exit-PSSession Remove-PSSession Invoke-Command
  • 4. PS Remoting Help Get-Help about_Remoting about_PSSessions about_Remote_Requirements about_Remote_FAQ about_Remote_Troubleshooting
  • 5. Reusable Sessions with PS Remoting It is really easy to create a new PS Session $dc = New-PSSession –computerName DC1 It is also really easy to enter that session Enter-PSSession –Session $dc More about that later!
  • 6. Reusable Sessions with PS Remoting Cont.. Less network / CPU cycles used when using Reusable sessions compared to running individual commands. You can run one off commands if you are using Reusable sessions Use Reusable sessions when you need to run more than one command against a computer.
  • 8. Running Commands against muliple machines $sessions = New-PSSession pc1, pc2, pc3 Invoke-Command { Md HKLM:oftwarewjcomputing } –Session $sessions
  • 9. Passing Variables to Remote Hosts You can pass variables to the Invoke-Command cmdlet Your script block must use the param statement Use the –ArgumentList switch
  • 10. Demo
  • 11. Interactive Sessions Run at a console just like you are sitting there at the machine. Run all normal PowerShell commands You can restrict the commands that can be run remotely.
  • 12. Demo
  • 13. Code to change what is allowed to run # Disable access to all applications $ExecutionContext.SessionState.Applications.Clear() # Disable access to scripts $ExecutionContext.SessionState.Scripts.Clear() # Define a list of allowed commands $RequiredCommands = "Exit-PSSession", "Get-Command", "Get-FormatData", "Get-Help", "Measure-Object", "Out-Default", "Select-Object" $Commands = $RequiredCommands + "Get-Process", "Get-Service", "Where-Object", "ForEach-Object" # Make everything except the allowed commands private (not visible) Get-Command | Where-Object {$Commands -notcontains $_.Name} | ForEach-Object {$_.Visibility="Private"} # Restrict the language elements to a very limited set. The possible values are FullLanguage,RestrictedLanguage, and NoLanguage $ExecutionContext.SessionState.LanguageMode="RestrictedLanguage"
  • 14. Code to change what is allowed to run cont. Save as: %windir%ystem32indowsPowerShell1.0estricted.ps1
  • 15. Running single commands Use Invoke-Command Results are returned as text, not as objects Adds some overhead by doing it this way
  • 16. DEMo
  • 17. Remoting Resources Two very useful resources! Get-Help PowerShell.com’s Administrators Guide to PowerShell Remoting
  • 18. Contact Matt Johnson Phone: +1 (734) 931-0323 Web: http://www.mwjcomputing.com/ Blog: http://www.mwjcomputing.com/blog/ Twitter: http://twitter.com/mwjcomputing Email: matt@michiganpowershell.com