azure - 如何使用 PowerShell 获取为 SQL Server 分配的 Azure Active Directory 管理员?
问题描述
我想使用 PowerShell 脚本获取特定 Azure SQL 服务器当前分配的 Active Directory 管理员名称。
我认为它会显示在资源属性中,但不幸的是没有,我没有找到任何特定的命令。
有什么方法可以获取这些信息吗?
解决方案
获取此信息的 PowerShell 命令是 Get-AzureRmSqlServerActiveDirectoryAdministrator
来自 Microsoft 文档的示例 -
Get-AzureRmSqlServerActiveDirectoryAdministrator -ResourceGroupName "ResourceGroup01" -ServerName "Server01"
ResourceGroupName ServerName DisplayName ObjectId
----------------- ---------- ----------- --------
ResourceGroup01 Server01 DBAs 40b79501-b343-44ed-9ce7-da4c8cc7353b
此外,至少在您的屏幕截图中,您没有为服务器设置任何管理员。如果您想先进行设置,在从 PowerShell 命令读取该信息之前,请按照此处的指导进行操作 - https://docs.microsoft.com/en-us/azure/sql-database/sql-database-aad-authentication -配置
推荐阅读
- android - 有什么方法可以让用户在 android studio 的活动中添加按钮
- html - 如何以角度隐藏switch语句中的项目
- html - 在不使用阴影的情况下在自定义 div 上放置阴影
- python - 我在保存方法 Django 中得到了不正确的计算
- python - DictReader 没有以正确的方式解析我的字符串
- android - 有没有办法在 android 模拟器上使用 Microsoft Authenticator 的无密码登录选项
- javascript - Google 表格图表仅返回我的 REST API 的一行
- android - 如何在回收站视图中为多按钮设置 onclick
- moodle - R/exams Moodle 选择题不计分
- azure - 搜索 Azure Runbook 作业的“输入”?