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>]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 -AllGet all the roles
Example 2
Get a specific role
Example 3
Get the first page containing 10 roles
Parameters
-All
All roles will be fetched.
-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.
-PageNumber
Specify the page of roles fetched. First page is fetched by default.
-PageSize
Number of roles per page. 10 roles per page by default.
-RoleID
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.
Notes
For more information, type "Get-Help Get-DSRole -detailed". For technical information, type "Get-Help Get-DSRole -full".
Last updated
Was this helpful?