< Back

Set-DAdministrator

Mon Jan 13, 2020 6:44 pm

NAME Set-DAdministrator



SYNOPSIS

Updates an existing administrator in Delegate365. This command is available starting with Delegate365 v8.2





SYNTAX

Set-DAdministrator -Identity <string> [-Active <bool>] [-D365Permission <string>] [-Domains <string[]>]

[-OrganizationalUnits <string[]>] [-Settings <AdministratorSettings>] [-UserPrincipalName <string>]

[<CommonParameters>]





DESCRIPTION

Set-DAdministrator modifies an existing administrator in Delegate365. Alias commands are: Set-DAdmin. The

administrator that shall be modified must be existing and must be set with the -Identity parameter. This command

allows to enable or disable an Administrator, to overwrite his OU and domain settings and to define other admin

settings. To remove any existing OU or domain assignments, or the permission policy, use an empty string ''.

Otherwise, use a string array to define new OU's or domains, as in the sample below. Optional, additional

properties can be handed over to the command, see the example. The output shows the updated admin object.





PARAMETERS

-Identity <string>

Find a specific item. Wildcards are not supported, use the UserPrincipalName.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-UserPrincipalName <string>

The UserPrincipalName can be used instead of the Identity parameter.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-OrganizationalUnits <string[]>

OrganizationalUnits can be a string array, that can be separated by comma, e.g. 'Paris', 'New York'. To remove

OU's, use ''.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Domains <string[]>

Domains can be a string array, that can be separated by comma, e.g. 'atwork-it.com', 'delegate365.com'. To

remove domains, use ''.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Settings <AdministratorSettings>

Settings allow to set the notification email, phone number and other settings for the admin.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-D365Permission <string>

D365Permission define the name of the permission policy that shall be assigned. To remove an existing

permission, use ''.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Active <bool>

Active sets the Administrator active or disabled. Disabled Admins cannot access the Delegate365 portal or use

PowerShell.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String

Find a specific item. Wildcards are not supported, use the UserPrincipalName.



System.String

The UserPrincipalName can be used instead of the Identity parameter.





OUTPUTS

Delegate365.Api.Core.Models.Administrator





---------- EXAMPLE 1 ----------



Set-DAdministrator -Identity 'john.doe@delegate365.com' -Active $false



This disables the administrator from using the Delegate365 portal or using Powershell.

---------- EXAMPLE 2 ----------



Set-DAdministrator -Identity 'john.doe@delegate365.com' -OrganizationalUnits ''



Remove all OU assignments from that administrator.

---------- EXAMPLE 3 ----------



Set-DAdministrator -Identity 'john.doe@delegate365.com' -Domains ''



Remove all domain assignments from that administrator.

---------- EXAMPLE 4 ----------



Set-DAdministrator -Identity 'john.doe@delegate365.com' -D365Permission ''



Remove the existing permission policy from that administrator. That user no longer will see any modules in

Delegate365.

---------- EXAMPLE 5 ----------



Set-DAdministrator -Identity 'john.doe@delegate365.com' -OrganizationalUnits 'Paris', 'New York', 'Kuala Lumpur'



Overwrite any existing OU assignments with new ones for that administrator.

---------- EXAMPLE 6 ----------



$settings = New-Object Delegate365.Api.Core.Models.AdministratorSettings

$settings.Email = 'john.doe@delegate365.com'

$settings.Phone = ''

$settings.UsageLocation = 'US'

$settings.DailyNotifications = $false



Set-DAdministrator -Identity john.doe@delegate365.com `

-Active $true

-OrganizationalUnits 'Paris', 'New York' `

-Domains 'atwork-it.com', 'delegate365.com' `

-D365Permission 'Scope Admin'`

-Settings $settings



Overwrite all possible settings of that admin.



RELATED LINKS

Delegate365 support https://support.delegate365.com/