Get-AzureADMSNamedLocationPolicy

取得名為 location policy 的 Azure Active Directory。

Syntax

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

Description

此 Cmdlet 可讓系統管理員取得 Azure Active Directory 具名位置原則。 具名位置是自訂規則,可定義可在條件式存取原則中使用的網路位置。

範例

範例 1:擷取 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
                                      }
                                    }

此命令會擷取 Azure AD 中所有具名位置原則的清單。

範例 2:擷取 Azure AD 中具有指定識別碼的具名位置原則。

PS C:\> Get-AzureADMSNamedLocationPolicy -PolicyId 1b7f0916-7677-40d8-97a1-d606f4ed8fcf

          OdataType                           : #microsoft.graph.countryNamedLocation
          Id                                  : 1b7f0916-7677-40d8-97a1-d606f4ed8fcf
          DisplayName                         : Country named location
          CreatedDateTime                     : 2019-09-26T23:12:16.0792706Z
          ModifiedDateTime                    : 2019-09-27T00:12:12.5986473Z
          CountriesAndRegions                 : [
                                                  "US",
                                                  "CA"
                                                ]
          IncludeUnknownCountriesAndRegions   : false

此命令會在 Azure AD 中擷取具名位置原則。

參數

-PolicyId

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

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