你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Get-AzureADMSNamedLocationPolicy

获取 Azure Active Directory 命名位置策略。

语法

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

说明

此 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 中检索具有给定 ID 的命名位置策略。

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 中命名位置策略的 ID。

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

备注

请参阅 Get-AzureADMSNamedLocationPolicy 到 Microsoft Graph PowerShell 的迁移指南。