# Session (endpoint) Configuration

**URL:** <https://forums.powershell.org/t/session-endpoint-configuration/14249>\
**Category:** PowerShell Help\
**Created:** [April 25, 2020, 6:55am UTC](https://forums.powershell.org/t/session-endpoint-configuration/14249 "2020-04-25T06:55:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian-clanton](https://avatars.discourse-cdn.com/v4/letter/b/ebca7d/32.png) [@brian-clanton](https://forums.powershell.org/u/brian-clanton)\
**Post date:** [April 25, 2020, 6:55am UTC](https://forums.powershell.org/t/session-endpoint-configuration/14249/1 "2020-04-25T06:55:08Z")

</div>

My Goal is to create an endpoint to allow non-administrative users to invoke a remote session to a server but only allow them specific cmdlets to execute.

As a test, on my laptop, I created the ‘LockDown’ Session and only allowed the cmdlet ‘Get-Date’ to execute and gave the local account ‘BC’ Execute and Read Rights for the session.

```
Name : LockDown
PSVersion : 5.1
RunAsUser :
Permission : NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrators AccessAllowed, BUILTIN\Remote
Management Users AccessAllowed, W10-BCLPT\BC AccessAllowed
VisibleCmdlets : Get-Date
```

As local administration, I test the session and it works.

```
PS C:\Windows\system32> $s = New-PSSession -ComputerName localhost -ConfigurationName LockDown PS C:\Windows\system32> Invoke-Command -Session $s -ScriptBlock {get-date}
Saturday, April 25, 2020 7:20:25 AM
```

When I try as the user ‘BC’, the command fails.

```
PS C:\Users\BC> $s = New-PSSession -ComputerName localhost -ConfigurationName LockDown
New-PSSession : [localhost] Connecting to remote server localhost failed with the following error message : The WSMan
service could not launch a host process to process the given request. Make sure the WSMan provider host server and
proxy are properly registered. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:6
+ $s = New-PSSession -ComputerName localhost -ConfigurationName LockDow ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
gTransportException
+ FullyQualifiedErrorId : -2146959355,PSSessionOpenFailed
```

I have changed the rights for BC from Read and Execute to ‘Full’ and get the same error. I have also recreated the local ‘BC’ account and still receive the same issue. I’ve checked about\_Remote\_Troubleshooting and set my Trusted Hosts Value to ‘\*’ (for troubleshooting purposes) and I still can’t get a non-admin to invoke a command.

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![krzydoug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/krzydoug/32/1008_2.png) [@krzydoug](https://forums.powershell.org/u/krzydoug)\
**Post date:** [April 28, 2020, 10:48pm UTC](https://forums.powershell.org/t/session-endpoint-configuration/14249/2 "2020-04-28T22:48:04Z")

</div>

Brian, see if this article helps you.

[https://helpcenter.gsx.com/hc/en-us/articles/202447926-How-to-Configure-Windows-Remote-PowerShell-Access-for-Non-Privileged-User-Accounts](https://helpcenter.gsx.com/hc/en-us/articles/202447926-How-to-Configure-Windows-Remote-PowerShell-Access-for-Non-Privileged-User-Accounts)

---

<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:29pm UTC](https://forums.powershell.org/t/session-endpoint-configuration/14249/3 "2024-05-16T20:29:47Z")

</div>

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


