Forum Discussion
Manage security groups with MS Graph
Hi everyone,
I'm facing an issue related to managing EntraID groups via powershell using MS Graph. Specifically I want to use the CMDLET Remove-MgGroupOwnerByRef. According to MS Help (https://learn.microsoft.com/powershell/module/microsoft.graph.groups/remove-mggroupownerbyref) the syntax of this would be Remove-MgGroupOwnerByRef -GroupId $groupId -DirectoryObjectId $directoryObjectId. But for me it seems, that the parameter -DirectoryObjectId is not recognized by the CMDLET. I am receiving an error, when trying to execute with some example values:
+ CategoryInfo : InvalidArgument: (:) [Remove-MgGroupOwnerByRef], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Remove-MgGroupOwnerByRef
Is this a known bug or does anybody have an idea?
Thanks
- Works fine here. Which version of the module are you using?
- DavidM2202Copper Contributor
Hi VasilMichev,
I'm using version 2.17.0 (by running Get-InstalledModule Microsoft.Graph)