Get-DSRole
2024-11-18
Get-DSRole
SYNOPSIS
Fetch one or more existing roles.
SYNTAX
GetPage (Default)
Get-DSRole [-PageNumber <int>] [-PageSize <int>] [-AsLegacyResponse] [<CommonParameters>]
GetAll
Get-DSRole -All [-AsLegacyResponse] [<CommonParameters>]
GetByID
Get-DSRole -RoleID <guid> [-AsLegacyResponse] [<CommonParameters>]
ALIASES
This cmdlet has the following aliases,
DESCRIPTION
Fetch one or more existing roles. Three alternative methods are possible: all roles, a single one or a page of roles.
EXAMPLES
EXAMPLE 1
PS C:> Get-DSRole -All
Get all the roles
EXAMPLE 2
PS C:> Get-DSRole -RoleID $roleID
Get a specific role
EXAMPLE 3
PS C:> Get-DSRole -PageNumber 1 -PageSize 10
Get the first page containing 10 roles
PARAMETERS
-All
All roles will be fetched.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases:
- GetAll
ParameterSets:
- Name: GetAll
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-AsLegacyResponse
In versions prior to 2024.2, many DS cmdlets returned a ServerResponse object. Enabling this backward compatibility switch allows scripts developed for earlier versions to function correctly.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-PageNumber
Specify the page of roles fetched. First page is fetched by default.
Type: System.Int32
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: GetPage
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-PageSize
Number of roles per page. 10 roles per page by default.
Type: System.Int32
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: GetPage
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-RoleID
Type: System.Guid
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases:
- Id
ParameterSets:
- Name: GetByID
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
NOTES
For more information, type "Get-Help Get-DSRole -detailed". For technical information, type "Get-Help Get-DSRole -full".