Skip to content
This repository was archived by the owner on Jan 29, 2022. It is now read-only.

Latest commit

 

History

History
168 lines (125 loc) · 3.38 KB

Get-CrmRole.md

File metadata and controls

168 lines (125 loc) · 3.38 KB
external help file Module Name online version schema
AMSoftware.Crm.PowerShell.Commands.dll-Help.xml
AMSoftware.Crm
2.0.0

Get-CrmRole

SYNOPSIS

Get role from the connected organization.

SYNTAX

GetAllRoles (Default)

Get-CrmRole [[-Name] <String>] [-Exclude <String>] [-BusinessUnit <Guid>] [-IncludeTotalCount] [-Skip <UInt64>]
 [-First <UInt64>] [<CommonParameters>]

GetRoleById

Get-CrmRole [-Id] <Guid[]> [-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

DESCRIPTION

Get role from the connected organization.

EXAMPLES

Example 1

PS C:\> Get-CrmBusinessUnit -Include 'amsoftwarecrm' | Get-CrmRole

Get all roles for the business unit 'amsoftwarecrm'.

PARAMETERS

-BusinessUnit

The id of a business unit to retrieve the related roles for.

Type: System.Guid
Parameter Sets: GetAllRoles
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Exclude

Exclude roles whose name matches the provided pattern.

Type: System.String
Parameter Sets: GetAllRoles
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-Id

The id of the role to retrieve.

Type: System.Guid[]
Parameter Sets: GetRoleById
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name

Include roles whose name matches the provided pattern.

Type: System.String
Parameter Sets: GetAllRoles
Aliases: Include

Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-IncludeTotalCount

Return the total count (and accuracy) of the number of records before returning the result.

Because of the limitations of Dynamics CRM, the total count is only returned accurate when the result is limited to 5000 items.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Skip

Skips (does not return) the specified number of records.

Type: System.UInt64
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-First

Specifies the number of records to retrieve from the beginning.

Type: System.UInt64
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.Guid[]

OUTPUTS

Microsoft.Xrm.Sdk.Entity

NOTES

RELATED LINKS

New-CrmRole

Get-CrmRolePrincipals

Get-CrmPrincipalRoles

Entity Class