Missing Argument for 'Wait' Parameter Defined in JEA Roles Capabilities File

85 views Asked by At

I'm building a JEA profile and defining the VisibleCmdlets allowed in the Role Capabilities File.

...
VisibleCmdlets = ...
  @{
    Name = 'Get-Content'
    Parameters =
      @{ Name = 'Tail' },
      @{ Name = 'Wait' },
      @{ Name = 'Path'; ValidatePattern = '.*<keyword>.*' }
  },
...

This is to be used to restrict the user's etsn session to get-content for files under a directory path containing the specified 'keyword'.

Example:

get-content -tail 10 -wait <keyword path>.log

I've never had issues with this command when running it on the server, but when testing over etsn with the JEA profile loaded I'm getting this error:

Missing an argument for parameter 'Wait'. Specify a parameter of type 'System.Object' and try again.

Initially I thought it was because the '-wait' parameter was a "SwitchParameter Struct" type, but I switched it out with '-force' which is the same parameter type in the roles capabilities file, and the command completes successfully.

I've also tried setting the value of Wait to null after some googling, but got similar results.

@{ Name = 'Wait'; Value = '' },

Any guidance would be greatly appreciated.

0

There are 0 answers