共用方式為


Set-AzEnvironment

設定 Azure 環境的屬性。

語法

Name (預設值)

Set-AzEnvironment
    [-Name] <String>
    [[-PublishSettingsFileUrl] <String>]
    [[-ServiceEndpoint] <String>]
    [[-ManagementPortalUrl] <String>]
    [[-StorageEndpoint] <String>]
    [[-ActiveDirectoryEndpoint] <String>]
    [[-ResourceManagerEndpoint] <String>]
    [[-GalleryEndpoint] <String>]
    [[-ActiveDirectoryServiceEndpointResourceId] <String>]
    [[-GraphEndpoint] <String>]
    [[-AzureKeyVaultDnsSuffix] <String>]
    [[-AzureKeyVaultServiceEndpointResourceId] <String>]
    [[-TrafficManagerDnsSuffix] <String>]
    [[-SqlDatabaseDnsSuffix] <String>]
    [[-AzureDataLakeStoreFileSystemEndpointSuffix] <String>]
    [[-AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix] <String>]
    [[-AdTenant] <String>]
    [[-GraphAudience] <String>]
    [[-DataLakeAudience] <String>]
    [[-BatchEndpointResourceId] <String>]
    [[-AzureOperationalInsightsEndpointResourceId] <String>]
    [[-AzureOperationalInsightsEndpoint] <String>]
    [-EnableAdfsAuthentication]
    [-AzureAnalysisServicesEndpointSuffix <String>]
    [-AzureAnalysisServicesEndpointResourceId <String>]
    [-AzureAttestationServiceEndpointSuffix <String>]
    [-AzureAttestationServiceEndpointResourceId <String>]
    [-AzureSynapseAnalyticsEndpointSuffix <String>]
    [-ContainerRegistryEndpointSuffix <String>]
    [-AzureSynapseAnalyticsEndpointResourceId <String>]
    [-MicrosoftGraphEndpointResourceId <String>]
    [-MicrosoftGraphUrl <String>]
    [-SshAuthScope <String>]
    [-Scope <ContextModificationScope>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ARMEndpoint

Set-AzEnvironment
    [-Name] <String>
    [[-StorageEndpoint] <String>]
    [-ARMEndpoint] <String>
    [[-AzureKeyVaultDnsSuffix] <String>]
    [[-AzureKeyVaultServiceEndpointResourceId] <String>]
    [[-DataLakeAudience] <String>]
    [[-BatchEndpointResourceId] <String>]
    [[-AzureOperationalInsightsEndpointResourceId] <String>]
    [[-AzureOperationalInsightsEndpoint] <String>]
    [-AzureAnalysisServicesEndpointSuffix <String>]
    [-AzureAnalysisServicesEndpointResourceId <String>]
    [-AzureAttestationServiceEndpointSuffix <String>]
    [-AzureAttestationServiceEndpointResourceId <String>]
    [-AzureSynapseAnalyticsEndpointSuffix <String>]
    [-ContainerRegistryEndpointSuffix <String>]
    [-AzureSynapseAnalyticsEndpointResourceId <String>]
    [-Scope <ContextModificationScope>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Set-AzEnvironment Cmdlet 會設定端點和中繼資料,以連線到 Azure 執行個體。

範例

範例 1:建立和修改新環境

Add-AzEnvironment -Name TestEnvironment `
        -ActiveDirectoryEndpoint TestADEndpoint `
        -ActiveDirectoryServiceEndpointResourceId TestADApplicationId `
        -ResourceManagerEndpoint TestRMEndpoint `
        -GalleryEndpoint TestGalleryEndpoint `
        -GraphEndpoint TestGraphEndpoint

Name            Resource Manager Url ActiveDirectory Authority
----            -------------------- -------------------------
TestEnvironment TestRMEndpoint       TestADEndpoint/

Set-AzEnvironment -Name TestEnvironment `
        -ActiveDirectoryEndpoint NewTestADEndpoint `
        -GraphEndpoint NewTestGraphEndpoint | Format-List

Name                                              : TestEnvironment
EnableAdfsAuthentication                          : False
ActiveDirectoryServiceEndpointResourceId          : TestADApplicationId
AdTenant                                          :
GalleryUrl                                        : TestGalleryEndpoint
ManagementPortalUrl                               :
ServiceManagementUrl                              :
PublishSettingsFileUrl                            :
ResourceManagerUrl                                : TestRMEndpoint
SqlDatabaseDnsSuffix                              :
StorageEndpointSuffix                             :
ActiveDirectoryAuthority                          : NewTestADEndpoint
GraphUrl                                          : NewTestGraphEndpoint
GraphEndpointResourceId                           :
TrafficManagerDnsSuffix                           :
AzureKeyVaultDnsSuffix                            :
AzureDataLakeStoreFileSystemEndpointSuffix        :
AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix :
AzureKeyVaultServiceEndpointResourceId            :
BatchEndpointResourceId                           :
AzureOperationalInsightsEndpoint                  :
AzureOperationalInsightsEndpointResourceId        :
AzureAttestationServiceEndpointSuffix             :
AzureAttestationServiceEndpointResourceId         :
AzureSynapseAnalyticsEndpointSuffix               :
AzureSynapseAnalyticsEndpointResourceId           :

在此範例中,我們會使用 Add-AzEnvironment 建立具有範例端點的新 Azure 環境,然後使用 Cmdlet Set-AzEnvironment 變更所建立環境的 ActiveDirectoryEndpoint 和 GraphEndpoint 屬性值。

參數

-ActiveDirectoryEndpoint

指定 Azure Active Directory 驗證的基底授權單位。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:AdEndpointUrl, 活動目錄, ActiveDirectory授權單位

參數集

Name
Position:5
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-ActiveDirectoryServiceEndpointResourceId

指定權杖的對象,以驗證對 Azure Resource Manager 或服務管理 (RDFE) 端點的要求。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

Name
Position:8
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-AdTenant

指定預設的 Active Directory 租用戶。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

Name
Position:17
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-ARMEndpoint

Azure Resource Manager 端點。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:臂網址

參數集

ARMEndpoint
Position:1
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-AzureAnalysisServicesEndpointResourceId

Azure Analysis Services 資源的資源識別碼。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-AzureAnalysisServicesEndpointSuffix

與 Azure Log Analytics API 通訊時要使用的端點。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-AzureAttestationServiceEndpointResourceId

Azure 證明服務的資源識別碼,是所要求權杖的收件者。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-AzureAttestationServiceEndpointSuffix

Azure 認證服務的 Dns 尾碼。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix

Azure Data Lake Analytics 作業和目錄服務的 Dns 尾碼

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

Name
Position:15
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-AzureDataLakeStoreFileSystemEndpointSuffix

Azure Data Lake Store 檔案系統的 Dns 尾碼。 範例:azuredatalake.net

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

Name
Position:14
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-AzureKeyVaultDnsSuffix

Azure 金鑰保存庫服務的 Dns 尾碼。 例子是 vault-int.azure-int.net

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:10
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-AzureKeyVaultServiceEndpointResourceId

Azure 金鑰保存庫資料服務的資源識別碼,是所要求權杖的收件者。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:11
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-AzureOperationalInsightsEndpoint

與 Azure Log Analytics API 通訊時要使用的端點。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:22
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-AzureOperationalInsightsEndpointResourceId

使用 Azure Log Analytics API 進行驗證的權杖物件。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:21
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-AzureSynapseAnalyticsEndpointResourceId

Azure Synapse Analytics 的資源識別碼,是所要求權杖的收件者。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-AzureSynapseAnalyticsEndpointSuffix

Azure Synapse Analytics 的 Dns 尾碼。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-BatchEndpointResourceId

Azure Batch 服務的資源識別碼,這是所要求權杖的收件者

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:BatchResourceId, 批次對象

參數集

(All)
Position:20
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

參數屬性

類型:SwitchParameter
預設值:False
支援萬用字元:False
不要顯示:False
別名:參見

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-ContainerRegistryEndpointSuffix

Azure Container Registry 的尾碼。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-DataLakeAudience

使用 AD Data Lake 服務端點進行驗證的權杖物件。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:DataLakeEndpointResourceId, DataLakeResourceId

參數集

(All)
Position:19
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

參數屬性

類型:IAzureContextContainer
預設值:None
支援萬用字元:False
不要顯示:False
別名:AzContext, AzureRmContext, AzureCredential

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-EnableAdfsAuthentication

表示允許 Active Directory 同盟服務 (ADFS) 內部部署驗證。

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False
別名:內部部署

參數集

Name
Position:16
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-GalleryEndpoint

指定部署範本 Azure Resource Manager 資源庫的端點。 參數是將值設定為 GalleryUrlPSAzureEnvironment 從 ArmMetadata 中移除,Azure GalleryUrl PowerShell 將不再提供值,因此不建議再設定 GalleryEndpoint

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:Gallery, 畫廊網址

參數集

Name
Position:7
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-GraphAudience

使用 AD Graph 端點進行驗證的權杖對象。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:GraphEndpointResourceId, GraphResourceId

參數集

Name
Position:18
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-GraphEndpoint

指定 Graph (Active Directory 中繼資料) 要求的 URL。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:Graph, 圖形網址

參數集

Name
Position:9
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-ManagementPortalUrl

指定管理入口網站的 URL。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

Name
Position:3
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-MicrosoftGraphEndpointResourceId

Microsoft Graph 的資源識別碼

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

Name
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-MicrosoftGraphUrl

Microsoft Graph 網址

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

Name
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-Name

指定要修改的環境名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:0
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-PublishSettingsFileUrl

指定可從中下載 .publishsettings 檔案的 URL。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

Name
Position:1
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-ResourceManagerEndpoint

指定 Azure Resource Manager 要求的 URL。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:資源管理器, ResourceManager網址

參數集

Name
Position:6
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-Scope

決定環境定義變更的範圍,例如,變更是否僅套用至現行處理程序,或套用至此使用者啟動的所有階段作業。

參數屬性

類型:ContextModificationScope
預設值:None
接受的值:Process, CurrentUser
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-ServiceEndpoint

指定服務管理 (RDFE) 要求的端點。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:服務管理, ServiceManagementUrl

參數集

Name
Position:2
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-SqlDatabaseDnsSuffix

指定 Azure SQL 資料庫伺服器的網域名稱尾碼。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

Name
Position:13
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-SshAuthScope

SSH 至 Azure VM 時的驗證範圍。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

Name
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-StorageEndpoint

指定儲存體 (Blob、資料表、佇列和檔案) 存取的端點。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:StorageEndpoint尾碼

參數集

(All)
Position:4
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-TrafficManagerDnsSuffix

指定 Azure 流量管理員服務的網域名稱尾碼。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

Name
Position:12
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 指令未執行。

參數屬性

類型:SwitchParameter
預設值:False
支援萬用字元:False
不要顯示:False
別名:威斯康辛

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

CommonParameters

此 cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters

輸入

String

SwitchParameter

輸出

PSAzureEnvironment