New-CrmAdminModeSetting

Defines the object that can be passed to the Enable-CrmAdminMode and Disable-CrmAdminMode cmdlets to enable or disable administration mode for a Dataverse environment. When you place a Sandbox environment in administration mode only users with System Administrator or System Customizer security roles will be able to sign in to that environment. Administration mode is useful when you want to make operational changes and not have regular users affect your work, and not have your work affect regular users.

Syntax

New-CrmAdminModeSetting
   [-AllowBackgroundOperations <Boolean>]
   [-NotificationText <String>]
   [-OverrideUserAADObjectId <Guid>]

Description

The New-CrmAdminModeSetting cmdlet defines the object that can be passed to the Enable-CrmAdminMode and Enable-CrmAdminMode cmdlets to enable or disable administration mode for a Dataverse environment.

Examples

Example 1

PS C:\>$MyAdminModeSetting = New-CrmAdminModeSetting -AllowBackgroundOperations 1 -NotificationText Only administrators and customizers may access this environment while we complete operational changes  -OverrideUserAADObjectId <Guid>

Creates the object that can be used with Enable-CrmAdminMode to enable administration mode on an environment.

Parameters

-AllowBackgroundOperations

Optional parameter that determines whether the environment can run background operations. 1 or $true to allow background operations. 0 or $false to not allow background operations. Background operations are asynchronous operations, such as workflows and synchronization with Microsoft Exchange. When set to false, emails will not be sent and server-side synchronization for appointments, contacts, and tasks are disabled.

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

-NotificationText

Optional parameter that displays as a message when any user attempts to sign in to the environment.

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

-OverrideUserAADObjectId

Microsoft Entra ID object ID that can be used as the authentication identity instead of the user's credentials.

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

Inputs

System.Nullable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

System.String System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

Outputs

System.Object