IIS 7 and Above
JEA - get-service output command
Last post Nov 15, 2019 05:42 AM by Jalpa Panchal
Nov 13, 2019 12:10 PM|JoeRGlasgow|LINK
I have setup JEA and got it working fine. Now I need to tweak it for the output.
I can get this to work fine
Get-Service -ComputerName Server service
this works also works fine
Get-Service -ComputerName Server service | select Name
But it falls over If I do this
Get-Service -ComputerName Server service | select Status
Cannot validate argument on parameter 'Property'. The argument "status" does not belong to the set
"ModuleName,Namespace,OutputType,Count,HelpUri,Name,CommandType,ResolvedCommandName,DefaultParameterSet,CmdletBinding,Parameters" specified by the ValidateSet attrib
ute. Supply an argument
How do i get it to be able to output all the switches. Ideally I would like to be able to do this via JEA
Get-Service -ComputerName server service | select -property MachineName, Name, DisplayName, starttype, Status | Format-Table
but Cant figure out how to get the above.
Nov 14, 2019 07:22 AM|Jalpa Panchal|LINK
It looks like the JEA issue.this is the expected behavior for custom functions.
You could refer to this GitHub issue:
You could create a custom function by using the FunctionDefinitions field.
Nov 14, 2019 02:54 PM|JoeRGlasgow|LINK
Hi, thanks for that. Not too clued up on functions. I have the following added to the JEA sessions but it doesnt seem to work. It shows the function as avilable when I do get-command
get-service -Computername $srv -Name $svc | select Name, Status, StartType
Nov 15, 2019 05:42 AM|Jalpa Panchal|LINK
this is not iis issue so I suggest you to post on JEA GitHub.