Hi, I have an issue with JEA endpoint - repadmin /replsingleobj ... command works from standard PowerShell console (Invoke-Command) but not as same code under GUI tool:
I always get an error:
The syntax is not supported by this runspace. This can occur if the runspace is in no-language mode.
What can I do here?
SAPIEN PS Studio 2022 - issues with JEA endpoint
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
SAPIEN PS Studio 2022 - issues with JEA endpoint
The issue is similar to the double hop issue. The remote command session ends before the command finishes executing.\
Open a persistent session to the remote system then execute the command. Wait for completion and then close the remote session.
Also note that AD management commands are not d3esigned to be remoted, that is why the AD tools can be installed on any computer in the network.
Also most AD tools require a visble console and will often fail when run with no UI. I suspect that this command will not run with no UI. A runspace has no UI.
Go to full postOpen a persistent session to the remote system then execute the command. Wait for completion and then close the remote session.
Also note that AD management commands are not d3esigned to be remoted, that is why the AD tools can be installed on any computer in the network.
Also most AD tools require a visble console and will often fail when run with no UI. I suspect that this command will not run with no UI. A runspace has no UI.
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: SAPIEN PS Studio 2022 - issues with JEA endpoint
You need to contact the folks who created that endpoint. The error basically means you can use a command from a console but not from within a script or code block.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: SAPIEN PS Studio 2022 - issues with JEA endpoint
I created that endpoint and allowed repadmin as visible external command. From PS console Invoke-Command -ComputerName DCName -ConfigurationName ConfigName -ScriptBlock {repadmin /replsingleobj ...} works but same code in PS Studio throws this error having clicked on GUI command button.
What is the difference between Invoke-Command from standard built-in PS console and Invoke-Command as code in PS Studio executing on command button click? Endpoint they use is the same ... Session type I use for all endpoints is RestrictedRemoteServer as recommended.
What is the difference between Invoke-Command from standard built-in PS console and Invoke-Command as code in PS Studio executing on command button click? Endpoint they use is the same ... Session type I use for all endpoints is RestrictedRemoteServer as recommended.
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: SAPIEN PS Studio 2022 - issues with JEA endpoint
[Topic moved by moderator]
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: SAPIEN PS Studio 2022 - issues with JEA endpoint
The issue is similar to the double hop issue. The remote command session ends before the command finishes executing.\
Open a persistent session to the remote system then execute the command. Wait for completion and then close the remote session.
Also note that AD management commands are not d3esigned to be remoted, that is why the AD tools can be installed on any computer in the network.
Also most AD tools require a visble console and will often fail when run with no UI. I suspect that this command will not run with no UI. A runspace has no UI.
Open a persistent session to the remote system then execute the command. Wait for completion and then close the remote session.
Also note that AD management commands are not d3esigned to be remoted, that is why the AD tools can be installed on any computer in the network.
Also most AD tools require a visble console and will often fail when run with no UI. I suspect that this command will not run with no UI. A runspace has no UI.
Re: SAPIEN PS Studio 2022 - issues with JEA endpoint
Note also that PowerShell has CmdLets that manage replication administration.
https://www.microsoft.com/en-us/downloa ... x?id=28972
https://docs.microsoft.com/en-us/window ... level-200-
https://www.microsoft.com/en-us/downloa ... x?id=28972
https://docs.microsoft.com/en-us/window ... level-200-
Re: SAPIEN PS Studio 2022 - issues with JEA endpoint
Thank you very much, persistent session made all difference.
Last edited by Maltacwie on Tue Jan 25, 2022 12:11 am, edited 1 time in total.
Re: SAPIEN PS Studio 2022 - issues with JEA endpoint
Then you won't be able to do what you are trying to do. You have to run repadmin locally which requires installing RSAT tools but does not re3quire ADWS to be installed on AD.
If you have doubts, then I recommend posting in the AD admin forum on Microsoft and they will explain the limits and requirements for remote administration.
Either run with a full UI locally or enable AWS on at least one AD node.
In the end you are running up against security restrictions on AD and remoting as well as authentication issues. If this is required by your company then the AD admins will have to give you the access you need as a minimum requirement.
If you have doubts, then I recommend posting in the AD admin forum on Microsoft and they will explain the limits and requirements for remote administration.
Either run with a full UI locally or enable AWS on at least one AD node.
In the end you are running up against security restrictions on AD and remoting as well as authentication issues. If this is required by your company then the AD admins will have to give you the access you need as a minimum requirement.