-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
Current implementation
Currently, New-AzManagementGroupSubscription accepts a parameter called GroupName, depicted as "Management Group Id". This is quite confusing (at least, to me, when I read the docs).
GroupName is confusing because, on the Azure Portal, we have Group Name and Group ID. Group Name is allowed to have spaces. When we see the param's name of the PS command, we naturally pass in the Group Name from Azure Portal.
PS /home/user > New-AzManagementGroupSubscription -GroupName 'A B C D' -SubscriptionId $subscriptionId
New-AzManagementGroupSubscription: The provided management group name 'A B C D' has these invalid characters: ' , '. The name can only be an ASCII letter, digit, -, _, (, ), .
It's even more confusing when I read the error. It clearly says "the provided management group name".
However, in the end, the command works when I pass the ID of the management group.
Description of the new feature
The parameter should be named accordingly to its meaning.
Proposed implementation details
Is it this source file here? Sorry, I am not familiar with the source code structure of this repo.
If so, rename the property GroupName to the name GroupId or ManagementGroupId.