你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
New-AzureADPolicy
创建策略。
语法
New-AzureADPolicy
[-AlternativeIdentifier <String>]
-Definition <System.Collections.Generic.List`1[System.String]>
-DisplayName <String>
[-IsOrganizationDefault <Boolean>]
[-KeyCredentials <System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]>]
-Type <String>
[<CommonParameters>]
说明
New-AzureADPolicy cmdlet 在 Azure Active Directory (AD) 中创建策略。
示例
示例 1:创建策略
PS C:\>New-AzureADPolicy -Definition <Array of Rules> -DisplayName <Name of Policy> -IsTenantDefault
此命令将创建新策略。
参数
-AlternativeIdentifier
指定备用 ID。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Definition
指定包含策略的所有规则的 JSON 数组,例如: -Definition @ (“{”TokenLifetimePolicy“:{”Version“:1,”MaxInactiveTime“:”20:00:00“}”)
类型: | List<T>[String] |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-DisplayName
策略名称的字符串
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-IsOrganizationDefault
如此 如果此策略是组织默认值
类型: | Boolean |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-KeyCredentials
类型: | List<T>[Microsoft.Open.MSGraph.Model.KeyCredential] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Type
指定策略的类型。 对于令牌生存期,请指定“TokenLifetimePolicy”。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |