Forum Discussion
cmcknz77
Feb 19, 2024Copper Contributor
New-PSRoleCapabilityFile : The member 'FunctionDefinitions' must contain the required key 'Name'.
PS C:\> $params | FL *
Name : Description
Key : Description
Value : Role capabilities for Role1, including restricted DHCP scope management
Name : VisibleAliases
Key : VisibleAliases
Value :...
- Feb 19, 2024
Looking at the documentation, it appears the -FunctionDefinitions parameter requires an array of HashTable elements, where on lines 45 to 48, you're providing a HashTable that in turn contains two more HashTables.
Try this instead (in lieu of your current lines 45 to 48):
$FunctionDefinitions = @( $FunctionOne , $FunctionTwo )Cheers,
Lain
LainRobertson
Feb 19, 2024Silver Contributor
Looking at the documentation, it appears the -FunctionDefinitions parameter requires an array of HashTable elements, where on lines 45 to 48, you're providing a HashTable that in turn contains two more HashTables.
Try this instead (in lieu of your current lines 45 to 48):
$FunctionDefinitions = @(
$FunctionOne
, $FunctionTwo
)
Cheers,
Lain