你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Set-AzureADServicePrincipal

更新服务主体。

语法

Default (默认值)

Set-AzureADServicePrincipal
    -ObjectId <String>
    [-AccountEnabled <String>]
    [-AlternativeNames <System.Collections.Generic.List`1[System.String]>]
    [-AppId <String>]
    [-AppRoleAssignmentRequired <Boolean>]
    [-DisplayName <String>]
    [-ErrorUrl <String>]
    [-Homepage <String>]
    [-KeyCredentials <System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]>]
    [-LogoutUrl <String>]
    [-PasswordCredentials <System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]>]
    [-PublisherName <String>]
    [-ReplyUrls <System.Collections.Generic.List`1[System.String]>]
    [-SamlMetadataUrl <String>]
    [-ServicePrincipalNames <System.Collections.Generic.List`1[System.String]>]
    [-ServicePrincipalType <String>]
    [-Tags <System.Collections.Generic.List`1[System.String]>]
    [<CommonParameters>]

说明

Set-AzureADServicePrincipal cmdlet 更新 Azure Active Directory (Azure AD) 中的服务主体。

示例

示例 1:禁用服务主体的帐户

PS C:\> Set-AzureADServicePrincipal -ObjectId aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -AccountEnabled $False

此命令禁用指定服务主体的帐户。

参数

-AccountEnabled

指示帐户是否已启用。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-AlternativeNames

此服务主体的备用名称

参数属性

类型:

List<T>[String]

默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-AppId

指定应用程序 ID。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-AppRoleAssignmentRequired

指示是否需要应用程序角色分配。

参数属性

类型:Boolean
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DisplayName

指定显示名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ErrorUrl

指定错误 URL。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Homepage

指定主页。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-KeyCredentials

指定密钥凭据。

参数属性

类型:

List<T>[Microsoft.Open.AzureAD.Model.KeyCredential]

默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-LogoutUrl

指定注销 URL。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ObjectId

指定 Azure AD 中服务主体的 ID。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:True
来自管道的值(按属性名称):True
来自剩余参数的值:False

-PasswordCredentials

指定密码凭据。

参数属性

类型:

List<T>[Microsoft.Open.AzureAD.Model.PasswordCredential]

默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-PublisherName

指定发布者名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ReplyUrls

用户令牌发送到的 URL 用于与关联的应用程序登录,或 OAuth 2.0 授权代码和访问令牌发送到的重定向 URI 供关联应用程序使用。

参数属性

类型:

List<T>[String]

默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SamlMetadataUrl

@{text=}

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ServicePrincipalNames

指定服务主体名称。

参数属性

类型:

List<T>[String]

默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ServicePrincipalType

服务主体类型

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Tags

指定一个标签数组。 请注意,如果打算将此服务主体显示在管理门户的“所有应用程序”列表中,则需要将此值设置为 {WindowsAzureActiveDirectoryIntegratedApp}

参数属性

类型:

List<T>[String]

默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters

备注

请参阅 Set-AzureADServicePrincipal 到 Microsoft Graph PowerShell 的迁移指南。