PowerShell / JEA

Just Enough Administration
http://aka.ms/JEAdocs
MIT License
257 stars 60 forks source link

New-PSRoleCapabilityFile opening up full Parameters #10

Closed alexaymonier closed 7 years ago

alexaymonier commented 7 years ago

Hey guys & Gals,

Setting up a new PSRoleCapabilityFile and want to allow access to a parameter with no validateset/pattern as in example from https://msdn.microsoft.com/powershell/jea/role-capabilities

VisibleCmdlets = @{ Name = 'Restart-Computer'; Parameters = @{ Name = 'Name'; ValidateSet = }}

but it keeps erroring out saying "Missing statement in '=' in hash literal."

Are we able to open up full Parameter use without restricting down what is required by the param in a JEA end point?

alexaymonier commented 7 years ago

Ok so worked it out that if you don't specify any sort of validateset/pattern as in VisibleCmdlets = @{ Name = 'Restart-Computer'; Parameters = @{ Name = 'Name' }} It works

rpsqrd commented 7 years ago

@alexaymonier Sorry for the late response, Alex! Glad you found the solution. We identified the copy/paste error in our docs shortly after posting them and have now updated the page with the correct information.