Get-AzHost
Hosts ophalen of vermelden.
Notitie
Dit is de vorige versie van onze documentatie. Raadpleeg de meest recente versie voor actuele informatie.
Syntax
Get-AzHost
[-ResourceGroupName] <String>
[-HostGroupName] <String>
[[-Name] <String>]
[-InstanceView]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzHost
[-ResourceId] <String>
[-InstanceView]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Met deze cmdlet krijgt u een host in een hostgroep. Deze cmdlet bevat ook alle hosts in een hostgroep als er geen hostnaam is opgegeven.
Voorbeelden
Voorbeeld 1
Get-AzHost -ResourceGroupName $resourceGroupName -HostGroupName $hostGroupName -Name $hostName
ResourceGroupName : myrg01
PlatformFaultDomain : 1
AutoReplaceOnFailure : True
HostId : 00000000-0000-0000-0000-000000000000
VirtualMachines[0] :
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg01/providers/Microsoft.Compute/virtualMachines/myvm01
VirtualMachines[1] :
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg01/providers/Microsoft.Compute/virtualMachines/myvm02
ProvisioningTime : 7/27/2019 3:22:59 AM
ProvisioningState : Succeeded
Sku :
Name : ESv3-Type1
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg01/providers/Microsoft.Compute/hostGroups/myhostgroup01/hosts/myhost01
Name : myhost01
Location : eastus
Tags : {"key1":"val2"}
Met deze opdracht wordt een host geretourneerd.
Voorbeeld 2
Get-AzHost -ResourceGroupName $resourceGroupName -HostGroupName $hostGroupName -Name $hostName -InstanceView
ResourceGroupName : myrg01
PlatformFaultDomain : 0
AutoReplaceOnFailure : True
HostId : 00000000-0000-0000-0000-000000000000
ProvisioningTime : 8/19/2019 9:13:19 PM
ProvisioningState : Succeeded
InstanceView :
AssetId : 00000000-0000-0000-0000-000000000000
AvailableCapacity :
AllocatableVMs[0] :
VmSize : Standard_E2s_v3
Count : 28
AllocatableVMs[1] :
VmSize : Standard_E4-2s_v3
Count : 14
AllocatableVMs[2] :
VmSize : Standard_E4s_v3
Count : 14
Statuses[0] :
Code : ProvisioningState/succeeded
Level : Info
DisplayStatus : Provisioning succeeded
Time : 8/19/2019 9:13:19 PM
Statuses[1] :
Code : HealthState/available
Level : Info
DisplayStatus : Host available
Sku :
Name : ESv3-Type1
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg01/providers/Microsoft.Compute/hostGroups/myhostgroup01/hosts/myhost01
Name : crptestps2264host
Location : eastus
Tags : {"key1":"val2"}
Met deze opdracht wordt de exemplaarweergave van een host geretourneerd.
Voorbeeld 3
Get-AzHost -ResourceGroupName $resourceGroupName -HostGroupName $hostGroupName
ResourceGroupName Name Location Tags Sku FD
----------------- ---- -------- ---- --- --
myrg01 myhost01 eastus {[key1, val2]} ESv3-Type1 0
myrg01 myhost02 eastus {[key1, val2]} ESv3-Type1 1
Met deze opdracht worden alle hosts in de opgegeven hostgroep geretourneerd.
Parameters
De referenties, het account, de tenant en het abonnement dat wordt gebruikt voor communicatie met Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
De naam van de hostgroep.
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Geeft aan dat deze cmdlet alleen de exemplaarweergave van de host krijgt.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
De naam van de host.
| Type: | String |
| Aliases: | HostName |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
De naam van de resourcegroep
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
De id van de resource.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |