Επεξεργασία

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


Get-AzureADMSNamedLocationPolicy

Gets an Azure Active Directory named location policy.

Syntax

Get-AzureADMSNamedLocationPolicy []
Get-AzureADMSNamedLocationPolicy
   -PolicyId <String>
   [<CommonParameters>]

Description

This cmdlet allows an admin to get the Azure Active Directory named location policy. Named locations are custom rules that define network locations which can then be used in a Conditional Access policy.

Examples

Example 1: Retrieves a list of all named location policies in Azure AD.

PS C:\> Get-AzureADMSNamedLocationPolicy

          OdataType               : #microsoft.graph.ipNamedLocation
          Id                      : 06e4ff15-ca6b-4843-9c34-3fdd1ce8f739
          DisplayName             : IPv4 named location
          CreatedDateTime         : 2019-09-26T23:12:16.0792706Z
          ModifiedDateTime        : 2019-09-27T00:12:12.5986473Z
          IsTrusted               : false
          IpRanges                : {
                                      class IpRange {
                                        CidrAddress: 6.5.4.3/32
                                      }
                                    }

This command retrieves a list of all named location policies in Azure AD.

Example 2: Retrieves a named location policy in Azure AD with given Id.

PS C:\> Get-AzureADMSNamedLocationPolicy -PolicyId 6b5e999b-0ba8-4186-a106-e0296c1c4358

          OdataType                           : #microsoft.graph.countryNamedLocation
          Id                                  : 6b5e999b-0ba8-4186-a106-e0296c1c4358
          DisplayName                         : Country named location
          CreatedDateTime                     : 2019-09-26T23:12:16.0792706Z
          ModifiedDateTime                    : 2019-09-27T00:12:12.5986473Z
          CountriesAndRegions                 : [
                                                  "US",
                                                  "CA"
                                                ]
          IncludeUnknownCountriesAndRegions   : false

This command retrieves a named location policy in Azure AD.

Parameters

-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 Get-AzureADMSNamedLocationPolicy to the Microsoft Graph PowerShell.