Επεξεργασία

Κοινή χρήση μέσω


Set-AzureADMSNamedLocationPolicy

Updates a named location policy in Azure Active Directory by PolicyId.

Syntax

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

This cmdlet allows an admin to update a named location policy in Azure Active Directory by PolicyId. Conditional access policies are custom rules that define an access scenario.

Examples

Example 1: Update an ip named location policy in Azure AD by PolicyId.

PS C:\> Set-AzureADMSNamedLocationPolicy -PolicyId 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 -OdataType "#microsoft.graph.ipNamedLocation" -IsTrusted $false

This command updates an ip named location policy in Azure AD by PolicyId.

Example 2: Update a country or region named location policy in Azure AD by PolicyId.

PS C:\> Set-AzureADMSNamedLocationPolicy -PolicyId 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 -OdataType "#microsoft.graph.countryNamedLocation" -IncludeUnknownCountriesAndRegions $true

This command updates a country or region named location policy in Azure AD by PolicyId.

Parameters

-CountriesAndRegions

Specifies the countries and regions for the named location policy in Azure Active Directory.

Type:List<T>[Microsoft.Open.MSGraph.Model.CountriesAndRegion]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

Specifies the display name of a named location policy in Azure Active Directory.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Id

{{ Fill Id Description }}

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IncludeUnknownCountriesAndRegions

Specifies the includeUnknownCountriesAndRegions value for the named location policy in Azure Active Directory.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IpRanges

Specifies the ip ranges of the named location policy in Azure Active Directory.

Type:List<T>[Microsoft.Open.MSGraph.Model.IpRange]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IsTrusted

Specifies the isTrusted value for the named location policy in Azure Active Directory.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-OdataType

Specifies the odata type of a named location policy object in Azure Active Directory.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PolicyId

Specifies the ID of a named location policy in Azure Active Directory.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Notes

See the migration guide for Set-AzureADMSNamedLocationPolicy to the Microsoft Graph PowerShell.