The Set-AzSqlServerActiveDirectoryAdministrator cmdlet provisions a Microsoft Entra administrator for AzureSQL Server in the current subscription.
You can provision only one administrator at a time.
The following members of Microsoft Entra ID can be provisioned as a SQL Server administrator:
Native members of Microsoft Entra ID
Federated members of Microsoft Entra ID
Imported members from other Azure ADs who are native or federated members
Microsoft Entra groups created as security groups
Microsoft accounts, such as those in the Outlook.com, Hotmail.com, or Live.com domains, are not supported as administrators.
Other guest accounts, such as those in the Gmail.com or Yahoo.com domains, are not supported as administrators.
We recommend that you provision a dedicated Microsoft Entra group as an administrator.
Exemplos
Example 1: Provision an administrator group for a server
This command provisions a Microsoft Entra administrator group named DBAs for the server named Server01.
This server is associated with resource group ResourceGroup01.
Example 2: Provision an administrator user for a server
This command provisions a Microsoft Entra administrator group named DBAs for the server named Server01.
The command specifies an ID for the ObjectId parameter.
This makes sure that the command succeeds even if the display name of the group is not unique.
Parâmetros
-Confirm
Prompts you for confirmation before running the cmdlet.
Specifies the unique ID of the Microsoft Entra administrator that this cmdlet provisions.
If the display name is not unique, you must specify a value for this parameter.
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.
A origem deste conteúdo pode ser encontrada no GitHub, onde também pode criar e rever problemas e pedidos Pull. Para mais informações, consulte o nosso guia do contribuidor.