# Unable to invoke or Enter PSsession

**URL:** <https://forums.powershell.org/t/unable-to-invoke-or-enter-pssession/10090>\
**Category:** PowerShell Help\
**Created:** [February 7, 2018, 1:08pm UTC](https://forums.powershell.org/t/unable-to-invoke-or-enter-pssession/10090 "2018-02-07T13:08:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![powershellnoob](https://avatars.discourse-cdn.com/v4/letter/p/e56c9b/32.png) [@powershellnoob](https://forums.powershell.org/u/powershellnoob)\
**Post date:** [February 7, 2018, 1:08pm UTC](https://forums.powershell.org/t/unable-to-invoke-or-enter-pssession/10090/1 "2018-02-07T13:08:15Z")

</div>

Hello there everyone,

I have a test computer that I’ve been using to test powershell on for a while now. No configurations have been made to any of the powershell files. Just now for some reason I have found myself unable to enter a pssession into it or invoke commands. I have been able to do this just fine but now I am unable to do so. When I try to invoke this is what is returned.

**PS C:\WINDOWS\system32\> Invoke-Command -ComputerName ws1095 -ScriptBlock {Get-Service}  
The term ‘Get-Service’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,  
verify that the path is correct and try again.  
+ CategoryInfo : ObjectNotFound: (Get-Service:String) , CommandNotFoundException  
+ FullyQualifiedErrorId : CommandNotFoundException  
+ PSComputerName : ws1095**

 

**writeErrorStream : True  
PSMessageDetails :  
OriginInfo : ws1095  
Exception : System.Management.Automation.RemoteException: The term ‘Get-Service’ is not recognized as the name of a cmdlet, function, script file, or operable  
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.  
TargetObject : Get-Service  
CategoryInfo : ObjectNotFound: (Get-Service:String) , CommandNotFoundException  
FullyQualifiedErrorId : CommandNotFoundException**

When I try to enter a pssession this is what is returned:

**PS C:\WINDOWS\system32\> Enter-PSSession -ComputerName ws1095  
Enter-PSSession : The term ‘Measure-Object’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a  
path was included, verify that the path is correct and try again.  
At line:1 char:1**

 
**- Enter-PSSession -ComputerName ws1095
-** 

**```auto
  + CategoryInfo : ObjectNotFound: (Measure-Object:String) [Enter-PSSession], CommandNotFoundException
  + FullyQualifiedErrorId : CommandNotFoundException</strong>**

**```**

 

**Any suggestions? I am able to do this fine to other client on the network except now for this one.  
My env:psmodule path is still set to default.**

 

**Thank you in advance for the help!**

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [February 7, 2018, 1:25pm UTC](https://forums.powershell.org/t/unable-to-invoke-or-enter-pssession/10090/2 "2018-02-07T13:25:44Z")

</div>

It’s likely that machine’s default Remoting endpoint has been locked down. A “constrained endpoint” can contain as few cmdlets as its creator desires. See “Secrets of PowerShell Remoting” for a discussion of constrained endpoints.

---

<div class="post-metadata">

**Author:** ![powershellnoob](https://avatars.discourse-cdn.com/v4/letter/p/e56c9b/32.png) [@powershellnoob](https://forums.powershell.org/u/powershellnoob)\
**Post date:** [February 7, 2018, 2:06pm UTC](https://forums.powershell.org/t/unable-to-invoke-or-enter-pssession/10090/3 "2018-02-07T14:06:32Z")

</div>

Not certain how this client became a constrained endpoint since these configurations were not changed. The when I ran get-PSSessionConfiguration, the permissions on target client were only allowing built in admin to do any remote management. Due to time constraint, I am unable to read a book just to figure out how to set these to default. And looking this up was only providing with links on how to set up constrained endpoint, not how to undo them if they randomly became constrained. Was left with reimaging the computer and setting it up from scratch.  
Thanks for the help Don.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:36pm UTC](https://forums.powershell.org/t/unable-to-invoke-or-enter-pssession/10090/4 "2024-05-16T20:36:27Z")

</div>

Closed on May 16, 2024, 8:36pm UTC


