{"id":16102,"date":"2018-09-24T06:00:44","date_gmt":"2018-09-24T13:00:44","guid":{"rendered":"https:\/\/www.sapien.com\/blog\/?p=16102"},"modified":"2018-09-28T11:03:49","modified_gmt":"2018-09-28T18:03:49","slug":"powershell-studio-working-with-remote-systems-part-2","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2018\/09\/24\/powershell-studio-working-with-remote-systems-part-2\/","title":{"rendered":"PowerShell Studio: Working with Remote Systems (Part 2)"},"content":{"rendered":"<p>This is the second post in a blog series about working with remote systems using PowerShell Studio.<\/p>\n<p>The following topics are covered:<br \/>\nPart 1 &#8211;\u00a0<a href=\"http:\/\/Caching Remote Systems PowerShell Modules\" target=\"_blank\" rel=\"noopener\">Caching Remote Systems PowerShell Modules<\/a><br \/>\nPart 2 &#8211; PowerShell remoting<\/p>\n<p>In the <a href=\"https:\/\/www.sapien.com\/blog\/2018\/09\/20\/powershell-studio-working-with-remote-systems-part-1\/\">previous blog post<\/a>\u00a0I covered how to use the <strong>Cache Export<\/strong>\u00a0tool to cache module information from a remote system using the <em>Import Remote Cache<\/em>\u00a0button, which makes the modules available in the PowerShell Studio Object Browser.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/RunCache_07a_2018-09-07_16-19-56.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16093\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/RunCache_07a_2018-09-07_16-19-56-300x167.jpg\" alt=\"\" width=\"365\" height=\"203\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/RunCache_07a_2018-09-07_16-19-56-300x167.jpg 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/RunCache_07a_2018-09-07_16-19-56.jpg 508w\" sizes=\"auto, (max-width: 365px) 100vw, 365px\" \/>\u00a0<\/a><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/RunCache_08_2018-09-07_16-19-56.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16083\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/RunCache_08_2018-09-07_16-19-56.jpg\" alt=\"\" width=\"185\" height=\"98\" \/>\u00a0<\/a><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/RemObjectBorwser_01_2018-09-19_17-49-23.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-16246\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/RemObjectBorwser_01_2018-09-19_17-49-23-182x300.jpg\" alt=\"\" width=\"182\" height=\"300\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/RemObjectBorwser_01_2018-09-19_17-49-23-182x300.jpg 182w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/RemObjectBorwser_01_2018-09-19_17-49-23.jpg 216w\" sizes=\"auto, (max-width: 182px) 100vw, 182px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Part 2 &#8211; PowerShell remoting<\/h3>\n<p>In this blog post I will show you how to use Windows PowerShell Remoting for remote scripting using PowerShell Studio.<\/p>\n<p>The following topics will be covered:<\/p>\n<ul>\n<li>Prerequisite for PowerShell Remoting<\/li>\n<li>Adding Functionality using PowerShell Profile<\/li>\n<li>PSSession Configuration setup<\/li>\n<li>PSSession Configuration name<\/li>\n<li>PowerShell Studio &#8220;Remote Console&#8221;<\/li>\n<li>Creating a PSSession Console Host<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4>Prerequisite for PowerShell Remoting<\/h4>\n<p>Before we start we need to configure our system to support Windows PowerShell Remote with PowerShell Studio.<\/p>\n<p>First, verify that PowerShell is enabled for Remoting by executing the following one-liner:<\/p>\n<pre>Enable-PSRemoting -Force<\/pre>\n<blockquote><p><em>Note: This command enables the computer to receive remote commands via the WS-Management service<\/em>.<\/p><\/blockquote>\n<p>Next, verify that the WS_Management service is running (see image below).\u00a0 By default, this service will remain in <em>Stopped<\/em>\u00a0status with the <em>Startup Type<\/em>\u00a0set to <em>Manual<\/em>.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/WSMANService_01_2018-09-20_9-05-19.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16291\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/WSMANService_01_2018-09-20_9-05-19-300x200.jpg\" alt=\"\" width=\"452\" height=\"301\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/WSMANService_01_2018-09-20_9-05-19-300x200.jpg 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/WSMANService_01_2018-09-20_9-05-19-768x512.jpg 768w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/WSMANService_01_2018-09-20_9-05-19-1024x682.jpg 1024w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/WSMANService_01_2018-09-20_9-05-19-848x565.jpg 848w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/WSMANService_01_2018-09-20_9-05-19.jpg 1375w\" sizes=\"auto, (max-width: 452px) 100vw, 452px\" \/><\/a><\/p>\n<p>For more information on how to setup PowerShell Remoting, see these PowerShell Help topics:<\/p>\n<ul>\n<li>about_Remote<\/li>\n<li>about_Remote_Troubleshooting<\/li>\n<\/ul>\n<pre>## - Display PowerShell Help Topics:\r\nGet-Help about_Remote -Detailed\r\nGet-Help about_Remote_Troubleshooting\r\n<\/pre>\n<blockquote><p><em>Note: Remember that PowerShell help information is available in your system. Execute the &#8220;Update-Help -force&#8221; command to download PowerShell help topics and cmdlets documentation.<\/em><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<h4>Adding Functionality using PowerShell Profile<\/h4>\n<p>Although it is not mandatory to create a PowerShell Profile, it is beneficial when adding your own set of custom functions and also when adding PSSnapin&#8217;s because they are made available when the PowerShell console is active.<\/p>\n<p>Keep in mind, PowerShell Snap-ins are not modules and are not loaded automatically.\u00a0 If you are considering using a PowerShell Profile, it will be useful to add PowerShell Snap-ins during the PowerShell Remoting sessions in either\u00a0Windows PowerShell and PowerShell Studio console.<\/p>\n<p>For more information about how to create a Windows PowerShell Profile and .NET Snap-ins, see these PowerShell Help topics:<\/p>\n<ul>\n<li>about_Profiles<\/li>\n<li>about_PsSnapins<\/li>\n<\/ul>\n<pre>## - Display PowerShell Help Topics:\r\nGet-Help about_Profiles -Detailed\r\nGet-Help about_PsSnapins<\/pre>\n<p>&nbsp;<\/p>\n<h4>PSSession Configuration setup<\/h4>\n<p>These steps will need to take place on the <strong>remote system<\/strong>\u00a0that will be accessed from Windows PowerShell, or from PowerShell Studio Consoles.<\/p>\n<ol>\n<li>Create a simple PowerShell Profile<\/li>\n<li>PSSession Startup Script<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h5>Create a simple PowerShell Profile<\/h5>\n<p>The following steps will create a new Windows PowerShell Profile used for <em>All Users and All Hosts<\/em>. Just make sure to open the Windows PowerShell Console using <em>Run as Administrator<\/em>:<\/p>\n<pre>'function myProfile{ \"My System $Env:COMPUTERNAME profile has been loaded!`r`n\"+\"$($PSVersionTable.PSVersion)\"}; MyProfile;' | Out-File $PsHome\\Profile.ps1;<\/pre>\n<p>&nbsp;<\/p>\n<h5>PSSession Startup Script<\/h5>\n<p>Now, in order for the Windows PowerShell Remote session to automatically load the profile, we need to use the <strong><em>Register-PSSessionConfiguration<\/em><\/strong>\u00a0cmdlet with the &#8216;<em>-StartupScript<\/em>&#8216;\u00a0 parameter to include the location of the profile that we just created:<\/p>\n<pre>Register-PSSessionConfiguration -Name MyPSSessionProfile -StartupScript $PsHome\\Profile.ps1<\/pre>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWnServer_2018-09-12_15-49-55.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16162\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWnServer_2018-09-12_15-49-55-300x188.jpg\" alt=\"\" width=\"651\" height=\"408\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWnServer_2018-09-12_15-49-55-300x188.jpg 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWnServer_2018-09-12_15-49-55-768x480.jpg 768w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWnServer_2018-09-12_15-49-55-1024x640.jpg 1024w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWnServer_2018-09-12_15-49-55-848x530.jpg 848w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWnServer_2018-09-12_15-49-55.jpg 1430w\" sizes=\"auto, (max-width: 651px) 100vw, 651px\" \/><\/a><\/p>\n<p>For more information about how to create a PSSession configuration, see these PowerShell Help topics:<\/p>\n<ul>\n<li>Register-PSSessionConfiguration<\/li>\n<\/ul>\n<pre>## - Display PowerShell Help Topics: \r\nGet-Help\u00a0Register-PSSessionConfiguration<\/pre>\n<p>&nbsp;<\/p>\n<h4>PSSession Configuration name<\/h4>\n<p>Finally, using either the Windows PowerShell Console or the PowerShell Studio PowerShell Console, we proceed to create a PowerShell Remote session from our local machine to the remote system. Using the <strong>Enter-PSSession<\/strong> cmdlet with the parameter &#8216;<em>-ConfigurationName&#8217;<\/em>\u00a0followed by the name we registered in the PSSession configuraiton command.\u00a0 This will load the PowerShell Profile during the remote session.<\/p>\n<p>Use the the following one-liner with the correct system name and credentials in either of the Windows PowerShell or the PowerShell Studio console:<\/p>\n<pre>Enter-PSSession -ComputerName W2k16SHP01 -Credential trinity\\maxt -ConfigurationName MyPSSessionProfile<\/pre>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWinConsole_00_2018-09-12_16-05-26.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16116\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWinConsole_00_2018-09-12_16-05-26-300x169.jpg\" alt=\"\" width=\"356\" height=\"200\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWinConsole_00_2018-09-12_16-05-26-300x169.jpg 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWinConsole_00_2018-09-12_16-05-26-768x434.jpg 768w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWinConsole_00_2018-09-12_16-05-26-848x479.jpg 848w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWinConsole_00_2018-09-12_16-05-26.jpg 864w\" sizes=\"auto, (max-width: 356px) 100vw, 356px\" \/><\/a>\u00a0 \u00a0<a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWinConsole_01_2018-09-12_16-05-26.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16117\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWinConsole_01_2018-09-12_16-05-26-300x131.jpg\" alt=\"\" width=\"453\" height=\"197\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWinConsole_01_2018-09-12_16-05-26-300x131.jpg 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWinConsole_01_2018-09-12_16-05-26-768x335.jpg 768w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWinConsole_01_2018-09-12_16-05-26-848x369.jpg 848w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSWinConsole_01_2018-09-12_16-05-26.jpg 955w\" sizes=\"auto, (max-width: 453px) 100vw, 453px\" \/><\/a><\/p>\n<p>This will verify that we have a successful remote connection to another system via PowerShell Remoting.<\/p>\n<p>&nbsp;<\/p>\n<h4>PowerShell Studio &#8220;Remote Console&#8221;<\/h4>\n<p>If you don&#8217;t need to use the PowerShell Profile, PowerShell Studio gives you the ability to do remote scripting thru the <em>Remote Console<\/em>\u00a0button found under the <em>Platform<\/em>\u00a0ribbon menu.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/RunCache_07a_2018-09-07_16-19-56.jpg\">\u00a0<\/a><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PS_RemoteConsole_2018-09-12_10-37-12.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16104\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PS_RemoteConsole_2018-09-12_10-37-12-300x94.jpg\" alt=\"\" width=\"483\" height=\"151\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PS_RemoteConsole_2018-09-12_10-37-12-300x94.jpg 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PS_RemoteConsole_2018-09-12_10-37-12-768x240.jpg 768w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PS_RemoteConsole_2018-09-12_10-37-12.jpg 846w\" sizes=\"auto, (max-width: 483px) 100vw, 483px\" \/>\u00a0<\/a><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSStudioRemoteConsole_01_2018-09-20_10-07-27.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16293\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSStudioRemoteConsole_01_2018-09-20_10-07-27-300x136.jpg\" alt=\"\" width=\"333\" height=\"151\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSStudioRemoteConsole_01_2018-09-20_10-07-27-300x136.jpg 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSStudioRemoteConsole_01_2018-09-20_10-07-27.jpg 467w\" sizes=\"auto, (max-width: 333px) 100vw, 333px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSStudioRemoteConsole_00_2018-09-19_17-50-50.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16247\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSStudioRemoteConsole_00_2018-09-19_17-50-50-300x63.jpg\" alt=\"\" width=\"605\" height=\"127\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSStudioRemoteConsole_00_2018-09-19_17-50-50-300x63.jpg 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSStudioRemoteConsole_00_2018-09-19_17-50-50-768x161.jpg 768w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSStudioRemoteConsole_00_2018-09-19_17-50-50-848x177.jpg 848w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSStudioRemoteConsole_00_2018-09-19_17-50-50.jpg 947w\" sizes=\"auto, (max-width: 605px) 100vw, 605px\" \/><\/a><\/p>\n<p>The <em>Remote Console<\/em> is good for basic system-to-system remoting without the need to create a PSSession configuration name.<\/p>\n<p>&nbsp;<\/p>\n<h4>Creating a PSSession Console Host<\/h4>\n<p>If you&#8217;re constantly managing multiple systems, it would tedious to perform these steps every time:<\/p>\n<ol>\n<li>Open a script.<\/li>\n<li>Type, or highlight the <strong><em>Enter-PSSession<\/em><\/strong> one-liner.<\/li>\n<li>Then, run in console to connect to the remote system.<\/li>\n<li>Repeat the steps for another system.<\/li>\n<\/ol>\n<p>PowerShell Studio allows for creating additional Console hosts, and we can create remote connections to individual systems. This can be done using the <em>Options<\/em>\u00a0button in\u00a0the <em>Windows<\/em>\u00a0ribbon menu. You can add custom consoles in the\u00a0<em>Console<\/em>\u00a0section.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_00a_2018-09-12_11-18-54.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16294\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_00a_2018-09-12_11-18-54-300x103.jpg\" alt=\"\" width=\"568\" height=\"195\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_00a_2018-09-12_11-18-54-300x103.jpg 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_00a_2018-09-12_11-18-54-768x265.jpg 768w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_00a_2018-09-12_11-18-54-1024x353.jpg 1024w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_00a_2018-09-12_11-18-54-848x292.jpg 848w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_00a_2018-09-12_11-18-54.jpg 1438w\" sizes=\"auto, (max-width: 568px) 100vw, 568px\" \/><\/a><\/p>\n<p>The following sample will be used to create a new console host to remote connect to another system. This will require the name for the Console host, and the command line to execute:<\/p>\n<p>Name: <strong>PSSessionToRemoteSystem1<\/strong><\/p>\n<p>Command line:\u00a0<strong>C:\\WINDOWS\\system32\\windowspowershell\\v1.0\\powershell.exe -noexit -Command &#8220;Enter-PSSession -ComputerName SystemName -Credential Domain\\UserName -ConfigurationName MyPSSessionName&#8221;;<\/strong><\/p>\n<blockquote><p><em>Note: Please notice that the one-liner has the system name and credentials hard coded.\u00a0Also, the parameter &#8216;-ConfigurationName&#8217; is optional.<\/em><\/p><\/blockquote>\n<p>When you have added the new console host command line, exit the <em>Option<\/em>\u00a0panel and restart PowerShell Studio.<\/p>\n<p>The next time you click on the <em>Console<\/em>\u00a0panel, the newly added PSSession Console is available in the console drop-down list:<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_01_2018-09-12_11-18-54.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16112\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_01_2018-09-12_11-18-54-300x180.jpg\" alt=\"\" width=\"568\" height=\"341\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_01_2018-09-12_11-18-54-300x180.jpg 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_01_2018-09-12_11-18-54-768x461.jpg 768w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_01_2018-09-12_11-18-54-1024x615.jpg 1024w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_01_2018-09-12_11-18-54-848x510.jpg 848w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_01_2018-09-12_11-18-54.jpg 1438w\" sizes=\"auto, (max-width: 568px) 100vw, 568px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_02_2018-09-12_11-18-54.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16113\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_02_2018-09-12_11-18-54-300x118.jpg\" alt=\"\" width=\"539\" height=\"212\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_02_2018-09-12_11-18-54-300x118.jpg 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_02_2018-09-12_11-18-54-768x302.jpg 768w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_02_2018-09-12_11-18-54-848x334.jpg 848w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_02_2018-09-12_11-18-54.jpg 953w\" sizes=\"auto, (max-width: 539px) 100vw, 539px\" \/><\/a><\/p>\n<p>Select the newly added console &#8220;MyPSSessionXXX&#8221;, and this will remote connect to the other system.<\/p>\n<p><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_03_2018-09-12_11-18-54.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16114\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_03_2018-09-12_11-18-54-300x125.jpg\" alt=\"\" width=\"540\" height=\"225\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_03_2018-09-12_11-18-54-300x125.jpg 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_03_2018-09-12_11-18-54-768x319.jpg 768w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_03_2018-09-12_11-18-54-848x353.jpg 848w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2018\/09\/PSSession_03_2018-09-12_11-18-54.jpg 950w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Conclusion<\/h3>\n<p>You need to properly configure and test your Windows PowerShell environment to support PSRemoting before you start working with PowerShell Studio against remote systems. Taking advantage of the PowerShell Help documentation and PowerShell Studio features will assist in extending both your local and remote scripting to work interactively with PowerShell on any system.<\/p>\n<blockquote><p><em>Note: The overall concept explained in this blog post can be applied to our <a href=\"https:\/\/store.sapien.com\/p-365-primalscript-2018.aspx\" target=\"_blank\" rel=\"noopener\">PrimalScript<\/a> editor.<\/em><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<h3>Related Articles<\/h3>\n<p>1. <a href=\"https:\/\/www.sapien.com\/blog\/2012\/10\/16\/developing-powershell-scripts-for-other-machines-part-2\/\">Developing PowerShell scripts for other machines (Part 2)<\/a>.<br \/>\n2. <a href=\"https:\/\/www.sapien.com\/blog\/2013\/05\/16\/but-it-works-on-my-machine\/\">But it works on my machine\u2026<\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Feedback<\/h3>\n<p>As always, if you have any ideas, comments, or feedback, please\u00a0<a href=\"https:\/\/www.sapien.com\/forums\/viewforum.php?f=23\" target=\"_blank\" rel=\"noopener\">visit our feedback forum<\/a>\u00a0and reference this post.<\/p>\n<p>&nbsp;<\/p>\n<p><em>Max Trinidad is a Technology Evangelist at SAPIEN Technologies Inc., and a Microsoft PowerShell MVP. You can reach him at\u00a0<a href=\"mailto:maxt@sapien.com\">maxt@sapien.com<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the second post in a blog series about working with remote systems using PowerShell Studio. The following topics are covered: Part 1 &#8211;\u00a0Caching Remote Systems PowerShell Modules Part 2 &#8211; PowerShell remoting In the previous blog post\u00a0I covered how to use the Cache Export\u00a0tool to cache module information from a remote system using [&hellip;]<\/p>\n","protected":false},"author":47,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1143,941,703,410,25],"tags":[28,961,1016,37,997],"class_list":["post-16102","post","type-post","status-publish","format-standard","hentry","category-powershell","category-powershell-5-0","category-powershell-studio","category-primalscript-software-news","category-windows-powershell","tag-powershell","tag-powershell-5-0","tag-powershell-studio","tag-primalscript","tag-windows-powershell"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/16102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=16102"}],"version-history":[{"count":50,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/16102\/revisions"}],"predecessor-version":[{"id":16373,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/16102\/revisions\/16373"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=16102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=16102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=16102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}