New-DSRole
Synopsis
Create a new role.
Syntax
__AllParameterSets
New-DSRole -Name <string> [-AuthenticationType <ServerUserType>] [-Description <string>]
[-IsAdministrator] [-AllowDragAndDrop] [-CanAdd] [-CanEdit] [-CanDelete]
[-OfflineMode <OfflineMode>] [-DomainName <string>] [-AsLegacyResponse] [<CommonParameters>]Description
Create a new role and pre-validate offlineMode value, if supplied.
Examples
PS C:\> New-DSRole -AuthenticationType Builtin -Name NoDeleteNoOffline -Description "Role where the user can not delete and offline mode is disabled." -CanAdd -CanEdit -AllowDragAndDrop -OfflineMode DisabledCreate a role where the user is allowed to add and edit entries. Deleting entries is not allowed.
Parameters
-AllowDragAndDrop
Allow the drag and drop option
-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.
-AuthenticationType
Authentication type. Builtin by default.
-CanAdd
Allow the user to add
-CanDelete
Allow the user to delete
-CanEdit
Allow the user to edit
-Description
Role's description
-DomainName
Domain name
-IsAdministrator
Give the administrative rights
-Name
Role's name
-OfflineMode
Offline access permissions. Disabled < Read Only < Read/Write
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 New-DSRole -detailed". For technical information, type "Get-Help New-DSRole -full".
Last updated
Was this helpful?