Hello there,
Might be a permission or role issue within the scipt.
When creating a JEA endpoint, you need to define one or more role capabilities that describe what someone can do in a JEA session. A role capability is a PowerShell data file with the . psrc extension that lists all the cmdlets, functions, providers, and external programs that are made available to connecting users.
Registering JEA Configurations https://learn.microsoft.com/en-us/powershell/scripting/learn/remoting/jea/register-jea?view=powershell-7.3
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer–