共用方式為


Set-AzureADMSNamedLocationPolicy

依 PolicyId 更新 Azure Active Directory 中的具名位置原則。

語法

Set-AzureADMSNamedLocationPolicy
   -PolicyId <String>
   [-OdataType <String>]
   [-Id <String>]
   [-DisplayName <String>]
   [-IpRanges <System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]>]
   [-IsTrusted <Boolean>]
   [-CountriesAndRegions <System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]>]
   [-IncludeUnknownCountriesAndRegions <Boolean>]
   [<CommonParameters>]

Description

此 Cmdlet 可讓系統管理員依 PolicyId 更新 Azure Active Directory 中的具名位置原則。 條件式存取原則是定義存取案例的自定義規則。

範例

範例 1:依 PolicyId 更新 Azure AD 中的 IP 具名位置原則。

PS C:\> Set-AzureADMSNamedLocationPolicy -PolicyId 07a1f48d-0cbb-4c2c-8ea2-1ea00e3eb3b6 -OdataType "#microsoft.graph.ipNamedLocation" -IsTrusted $false

此命令會依 PolicyId 更新 Azure AD 中的 IP 具名位置原則。

範例 2:依 PolicyId 更新 Azure AD 中具名位置原則的國家或地區。

PS C:\> Set-AzureADMSNamedLocationPolicy -PolicyId 76fdfd4d-bd80-4c1e-8fd4-6abf49d121fe -OdataType "#microsoft.graph.countryNamedLocation" -IncludeUnknownCountriesAndRegions $true

此命令會依 PolicyId 更新 Azure AD 中具名位置原則的國家或地區。

參數

-CountriesAndRegions

指定 Azure Active Directory 中具名位置原則的國家/地區。

類型:List<T>[Microsoft.Open.MSGraph.Model.CountriesAndRegion]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DisplayName

指定 Azure Active Directory 中具名位置原則的顯示名稱。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Id

{{ 填滿標識符描述 }}

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-IncludeUnknownCountriesAndRegions

指定 Azure Active Directory 中具名位置原則的 includeUnknownCountriesAndRegions 值。

類型:Boolean
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-IpRanges

指定 Azure Active Directory 中具名位置原則的 IP 範圍。

類型:List<T>[Microsoft.Open.MSGraph.Model.IpRange]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-IsTrusted

指定 Azure Active Directory 中具名位置原則的 isTrusted 值。

類型:Boolean
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-OdataType

指定 Azure Active Directory 中具名位置原則物件的 odata 類型。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-PolicyId

指定 Azure Active Directory 中具名位置原則的標識碼。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False