Edit

Share via


Set-AzureADMSNamedLocationPolicy

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

Syntax

Default (Default)

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.

Parameter properties

Type:

List<T>[Microsoft.Open.MSGraph.Model.CountriesAndRegion]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisplayName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Id

{{ Fill Id Description }}

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IncludeUnknownCountriesAndRegions

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

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IpRanges

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

Parameter properties

Type:

List<T>[Microsoft.Open.MSGraph.Model.IpRange]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IsTrusted

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

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OdataType

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PolicyId

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Notes

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