< Back

Get-AzureRmApiManagementGroup

Tue Jan 29, 2019 9:29 pm

NAME Get-AzureRmApiManagementGroup



SYNOPSIS

Gets all or specific API management groups.





SYNTAX

Get-AzureRmApiManagementGroup -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>] [-GroupId <String>] [-Name <String>]

[<CommonParameters>]



Get-AzureRmApiManagementGroup -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>] [-Name <String>] [-ProductId <String>]

[<CommonParameters>]



Get-AzureRmApiManagementGroup -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>] [-Name <String>] [-UserId <String>]

[<CommonParameters>]





DESCRIPTION

The Get-AzureRmApiManagementGroup cmdlet gets all or specific API management groups.





PARAMETERS

-Context <PsApiManagementContext>

Specifies an instance of PsApiManagementContext.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-GroupId <String>

Specifies the group ID. If specified, the cmdlet attempts to find the group by the identifier.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Name <String>

Specifies the name of the management group.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ProductId <String>

Identifier of existing product. If specified will return all groups the product assigned to. This parameter is optional.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-UserId <String>

Specifies the identifier of existing product. If specified the cmdlet will return all groups the product assigned to.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementGroup

The details of the Group configured in API Management service.



IList<Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementGroup>

The list of Groups configured in API Management service.





NOTES









Example 1: Get all groups



PS C:\\>$apimContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"

PS C:\\>Get-AzureRmApiManagementGroup -Context $apimContext



This command gets all groups.





Example 2: Get a group by ID



PS C:\\>$apimContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"

PS C:\\>Get-AzureRmApiManagementGroup -Context $apimContext -GroupId "0123456789"



This command gets the group ID named 0123456789.





Example 3: Get a group by name



PS C:\\>$apimContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"

PS C:\\>Get-AzureRmApiManagementGroup -Context $apimContext -Name "Group0002"



This command gets the group named Group0002.





Example 4: Get all user groups



PS C:\\>$apimContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"

PS C:\\>Get-AzureRmApiManagementGroup -Context $apimContext -UserId "0123456789"



This command gets all user groups with the user ID named 0123456789.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ementgroup

New-AzureRmApiManagementGroup

Remove-AzureRmApiManagementGroup

Set-AzureRmApiManagementGroup