共用方式為


Get-AzNetworkProfile

取得現有的網路設定檔最上層資源

語法

GetByResourceNameNoExpandParameterSet (預設值)

Get-AzNetworkProfile
    [-ResourceGroupName <String>]
    [-Name <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

GetByResourceNameExpandParameterSet

Get-AzNetworkProfile
    -ResourceGroupName <String>
    -Name <String>
    -ExpandResource <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

GetByResourceIdExpandParameterSet

Get-AzNetworkProfile
    -ResourceId <String>
    -ExpandResource <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

GetByResourceIdNoExpandParameterSet

Get-AzNetworkProfile
    -ResourceId <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

Get-AzNetworkProfile Cmdlet 會擷取現有的網路配置檔最上層資源

範例

範例 1

$networkProfile = Get-AzNetworkProfile -Name np1 -ResourceGroupName rg1
ProvisioningState                           : Succeeded
ContainerNetworkInterfaces                  : {}
ContainerNetworkInterfaceConfigurations     : {}
ContainerNetworkInterfacesText              : []
ContainerNetworkInterfaceConfigurationsText : []
ResourceGroupName                           : rg1
Location                                    : westus
ResourceGuid                                : 00000000-0000-0000-0000-000000000000
Type                                        : Microsoft.Network/networkProfiles
Tag                                         :
TagsTable                                   :
Name                                        : np1
Etag                                        : W/"00000000-0000-0000-0000-000000000000"
Id                                          : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1
                                              /providers/Microsoft.Network/networkProfiles/np1

這會擷取資源群組 rg1 中的網路設定檔 np1

範例 2

$networkProfile = Get-AzNetworkProfile -Name np*
ProvisioningState                           : Succeeded
ContainerNetworkInterfaces                  : {}
ContainerNetworkInterfaceConfigurations     : {}
ContainerNetworkInterfacesText              : []
ContainerNetworkInterfaceConfigurationsText : []
ResourceGroupName                           : rg1
Location                                    : westus
ResourceGuid                                : 00000000-0000-0000-0000-000000000000
Type                                        : Microsoft.Network/networkProfiles
Tag                                         :
TagsTable                                   :
Name                                        : np1
Etag                                        : W/"00000000-0000-0000-0000-000000000000"
Id                                          : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1
                                              /providers/Microsoft.Network/networkProfiles/np1

ProvisioningState                           : Succeeded
ContainerNetworkInterfaces                  : {}
ContainerNetworkInterfaceConfigurations     : {}
ContainerNetworkInterfacesText              : []
ContainerNetworkInterfaceConfigurationsText : []
ResourceGroupName                           : rg1
Location                                    : westus
ResourceGuid                                : 00000000-0000-0000-0000-000000000000
Type                                        : Microsoft.Network/networkProfiles
Tag                                         :
TagsTable                                   :
Name                                        : np2
Etag                                        : W/"00000000-0000-0000-0000-000000000000"
Id                                          : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1
                                              /providers/Microsoft.Network/networkProfiles/np2

這會擷取以「np」開頭的網路設定檔

參數

-DefaultProfile

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

參數屬性

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

參數集

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

-ExpandResource

要展開的資源參照。

參數屬性

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

參數集

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

-Name

網路設定檔的名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:True
不要顯示:False
別名:資源名稱

參數集

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

-ResourceGroupName

網路設定檔的資源群組名稱。

參數屬性

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

參數集

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

-ResourceId

網路設定檔的 Azure 資源管理員識別碼。

參數屬性

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

參數集

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

CommonParameters

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

輸入

String

輸出

PSNetworkProfile