{"id":2764,"date":"2013-10-05T11:59:00","date_gmt":"2013-10-05T11:59:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2013\/10\/05\/powertip-connect-to-pssession-if-availability-is-none\/"},"modified":"2013-10-05T11:59:00","modified_gmt":"2013-10-05T11:59:00","slug":"powertip-connect-to-pssession-if-availability-is-none","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-connect-to-pssession-if-availability-is-none\/","title":{"rendered":"PowerTip: Connect to PSSession if Availability is &#8220;None&#8221;"},"content":{"rendered":"<p><strong>Summary<\/strong>: Learn how to connect to a PSSession if its Availability is&nbsp;<strong>None<\/strong>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\">&nbsp;Can I connect to a PSSession if its Availability is&nbsp;<strong>None<\/strong>?<\/p>\n<p style=\"padding-left: 30px\"><strong><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\">&nbsp;None<\/strong>&nbsp;means that no other session is connected to the PSSession, <br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; so if the State is&nbsp;<strong>Disconnected<\/strong>&nbsp;and the Availability is&nbsp;<strong>None<\/strong>, use the&nbsp;<strong>Connect-PSSession<\/strong>&nbsp;cmdlet to connect to it:<\/p>\n<p class=\"Code\" style=\"padding-left: 120px\">PS C:&gt; Get-PSSession -ComputerName Server01 -Name Diag<\/p>\n<p class=\"Code\" style=\"padding-left: 120px\">Id Name&nbsp;&nbsp;&nbsp;&nbsp; ComputerName&nbsp;&nbsp;&nbsp; State&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ConfigurationName&nbsp;&nbsp;&nbsp;&nbsp; Availability<\/p>\n<p class=\"Code\" style=\"padding-left: 120px\">&#8212; &#8212;-&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8212;&nbsp;&nbsp;&nbsp; &#8212;&#8211;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8212;<\/p>\n<p class=\"Code\" style=\"padding-left: 120px\">&nbsp; 1 Diag&nbsp;&nbsp;&nbsp; Server01&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Disconnected&nbsp; Microsoft.PowerShell&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; None<\/p>\n<p class=\"Code\" style=\"padding-left: 120px\">&nbsp;<\/p>\n<p class=\"Code\" style=\"padding-left: 120px\">PS C:&gt; Connect-PSSession | Get-PSSession -ComputerName Server01 -Name Diag<\/p>\n<p class=\"Code\" style=\"padding-left: 120px\">Id Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ComputerName&nbsp;&nbsp;&nbsp; State&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ConfigurationName&nbsp;&nbsp;&nbsp;&nbsp; Availability<\/p>\n<p class=\"Code\" style=\"padding-left: 120px\">&#8212; &#8212;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8212;&nbsp;&nbsp;&nbsp; &#8212;&#8211;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8212;<\/p>\n<p class=\"Code\" style=\"padding-left: 120px\">9 Diag&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Server01&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Opened&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Microsoft.PowerShell&nbsp;&nbsp;&nbsp;&nbsp; Available<\/p>\n<div>\n<p>&nbsp;<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Learn how to connect to a PSSession if its Availability is&nbsp;None. &nbsp;Can I connect to a PSSession if its Availability is&nbsp;None? &nbsp;None&nbsp;means that no other session is connected to the PSSession, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; so if the State is&nbsp;Disconnected&nbsp;and the Availability is&nbsp;None, use the&nbsp;Connect-PSSession&nbsp;cmdlet to connect to it: PS C:&gt; Get-PSSession -ComputerName [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[56,370,356,3,45],"class_list":["post-2764","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-guest-blogger","tag-june-blender","tag-powertip","tag-scripting-guy","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Learn how to connect to a PSSession if its Availability is&nbsp;None. &nbsp;Can I connect to a PSSession if its Availability is&nbsp;None? &nbsp;None&nbsp;means that no other session is connected to the PSSession, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; so if the State is&nbsp;Disconnected&nbsp;and the Availability is&nbsp;None, use the&nbsp;Connect-PSSession&nbsp;cmdlet to connect to it: PS C:&gt; Get-PSSession -ComputerName [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2764","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=2764"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2764\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=2764"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=2764"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=2764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}