Get-AzConnectedMachine
擷取混合式電腦之模型檢視或實例檢視的相關信息。
語法
Get-AzConnectedMachine
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzConnectedMachine
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-Expand <String>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzConnectedMachine
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-Expand <String>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Description
擷取混合式電腦之模型檢視或實例檢視的相關信息。
範例
範例 1:列出訂用帳戶中的所有連線機器
Get-AzConnectedMachine -SubscriptionId ********-****-****-****-**********
Name Location OSName Status ProvisioningState
---- -------- ------ ------ -----------------
winwestus2_1 westus2 windows Connected Succeeded
linwestus2_1 westus2 linux Connected Succeeded
winwestus2_2 westus2 windows Connected Succeeded
winwestus2_3 westus2 windows Connected Succeeded
列出訂用帳戶中的所有已連線機器。 如果未指定訂用帳戶,則會使用您目前 Azure PowerShell 內容中的訂用帳戶。
範例 2:列出資源群組中的所有已連線機器
Get-AzConnectedMachine -ResourceGroupName contoso-connected-machines
Name Location OSName Status ProvisioningState
---- -------- ------ ------ -----------------
winwestus2_2 westus2 windows Connected Succeeded
winwestus2_3 westus2 windows Connected Succeeded
列出資源群組中的所有已連線機器。
範例 3:依名稱取得資源群組中的連線計算機
Get-AzConnectedMachine -ResourceGroupName contoso-connected-machines -Name winwestus2_1
Name Location OSName Status ProvisioningState
---- -------- ------ ------ -----------------
winwestus2_1 westus2 windows Connected Succeeded
依名稱取得資源群組中的連線計算機。
參數
-DefaultProfile
DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。
類型: | PSObject |
別名: | AzureRMContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Expand
要套用至作業的展開表達式。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Name
混合式計算機的名稱。
類型: | String |
別名: | MachineName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
資源群組的名稱。 名稱不區分大小寫。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-SubscriptionId
目標訂用帳戶的標識碼。
類型: | String[] |
Position: | Named |
預設值: | (Get-AzContext).Subscription.Id |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |