Bewerken

Delen via


New-AzWvdHostPool

create a host pool.

Syntax

New-AzWvdHostPool
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -HostPoolType <String>
   -LoadBalancerType <String>
   -Location <String>
   -PreferredAppGroupType <String>
   [-AgentUpdateMaintenanceWindow <IMaintenanceWindowProperties[]>]
   [-AgentUpdateMaintenanceWindowTimeZone <String>]
   [-AgentUpdateType <String>]
   [-AgentUpdateUseSessionHostLocalTime]
   [-CustomRdpProperty <String>]
   [-Description <String>]
   [-ExpirationTime <DateTime>]
   [-FriendlyName <String>]
   [-IdentityType <String>]
   [-Kind <String>]
   [-ManagedBy <String>]
   [-MaxSessionLimit <Int32>]
   [-PersonalDesktopAssignmentType <String>]
   [-PlanName <String>]
   [-PlanProduct <String>]
   [-PlanPromotionCode <String>]
   [-PlanPublisher <String>]
   [-PlanVersion <String>]
   [-PublicNetworkAccess <String>]
   [-RegistrationInfoToken <String>]
   [-RegistrationTokenOperation <String>]
   [-Ring <Int32>]
   [-SkuCapacity <Int32>]
   [-SkuFamily <String>]
   [-SkuName <String>]
   [-SkuSize <String>]
   [-SkuTier <String>]
   [-SsoClientId <String>]
   [-SsoClientSecretKeyVaultPath <String>]
   [-SsoSecretType <String>]
   [-SsoadfsAuthority <String>]
   [-StartVMOnConnect]
   [-Tag <Hashtable>]
   [-VMTemplate <String>]
   [-ValidationEnvironment]
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzWvdHostPool
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -HostPoolType <String>
   -LoadBalancerType <String>
   -Location <String>
   -PreferredAppGroupType <String>
   [-DesktopAppGroupName <String>]
   [-WorkspaceName <String>]
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzWvdHostPool
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -JsonFilePath <String>
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzWvdHostPool
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -JsonString <String>
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

create a host pool.

Examples

Example 1: Create a Windows Virtual Desktop HostPool by name

New-AzWvdHostPool -ResourceGroupName ResourceGroupName `
                            -Name HostPoolName `
                            -Location 'eastus' `
                            -HostPoolType 'Pooled' `
                            -LoadBalancerType 'DepthFirst' `
                            -RegistrationTokenOperation 'Update' `
                            -ExpirationTime $((Get-Date).ToUniversalTime().AddDays(1).ToString('yyyy-MM-ddTHH:mm:ss.fffffffZ')) `
                            -Description 'Description' `
                            -FriendlyName 'Friendly Name' `
                            -MaxSessionLimit 5 `
                            -VMTemplate $null `
                            -SsoClientId $null `
                            -SsoClientSecretKeyVaultPath $null `
                            -SsoSecretType $null `
                            -SsoadfsAuthority $null `
                            -CustomRdpProperty $null `
                            -Ring $null `
                            -ValidationEnvironment:$false

Location   Name                 Type
--------   ----                 ----
eastus     HostPoolName Microsoft.DesktopVirtualization/hostpools

This command creates a Windows Virtual Desktop HostPool in a Resource Group.

Example 2: Create a Windows Virtual Desktop HostPool by name

New-AzWvdHostPool -ResourceGroupName ResourceGroupName `
                            -Name HostPoolName `
                            -Location 'eastus' `
                            -HostPoolType 'Personal' `
                            -LoadBalancerType 'Persistent' `
                            -RegistrationTokenOperation 'Update' `
                            -ExpirationTime $((Get-Date).ToUniversalTime().AddDays(1).ToString('yyyy-MM-ddTHH:mm:ss.fffffffZ')) `
                            -Description 'Description' `
                            -FriendlyName 'Friendly Name' `
                            -MaxSessionLimit 5 `
                            -VMTemplate $null `
                            -SsoClientId $null `
                            -SsoClientSecretKeyVaultPath $null `
                            -SsoSecretType $null `
                            -SsoadfsAuthority $null `
                            -CustomRdpProperty $null `
                            -Ring $null `
                            -ValidationEnvironment:$false

Location   Name                 Type
--------   ----                 ----
eastus     HostPoolName Microsoft.DesktopVirtualization/hostpools

This command creates a Windows Virtual Desktop HostPool in a Resource Group.

Parameters

-AgentUpdateMaintenanceWindow

List of maintenance windows. Maintenance windows are 2 hours long.

Type:IMaintenanceWindowProperties[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AgentUpdateMaintenanceWindowTimeZone

Time zone for maintenance as defined in https://learn.microsoft.com/dotnet/api/system.timezoneinfo.findsystemtimezonebyid. Must be set if useLocalTime is true.

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

-AgentUpdateType

The type of maintenance for session host components.

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

-AgentUpdateUseSessionHostLocalTime

Whether to use localTime of the virtual machine.

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CustomRdpProperty

Custom rdp property of HostPool.

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

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

Description of HostPool.

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

-DesktopAppGroupName

Desktop App Group Name

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

-ExpirationTime

Expiration time of registration token.

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

-FriendlyName

Friendly name of HostPool.

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

-HostPoolType

HostPool type for desktop.

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

-IdentityType

The identity type.

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

-JsonFilePath

Path of Json file supplied to the Create operation

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

-JsonString

Json string supplied to the Create operation

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

-Kind

Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.

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

-LoadBalancerType

The type of the load balancer.

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

-Location

The geo-location where the resource lives

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

-ManagedBy

The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.

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

-MaxSessionLimit

The max session limit of HostPool.

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

-Name

The name of the host pool within the specified resource group

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

-PersonalDesktopAssignmentType

PersonalDesktopAssignment type for HostPool.

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

-PlanName

A user defined name of the 3rd Party Artifact that is being procured.

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

-PlanProduct

The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding.

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

-PlanPromotionCode

A publisher provided promotion code as provisioned in Data Market for the said product/artifact.

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

-PlanPublisher

The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic

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

-PlanVersion

The version of the desired product/artifact.

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

-PreferredAppGroupType

The type of preferred application group type, default to Desktop Application Group

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

-PublicNetworkAccess

Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource to only be accessed via private endpoints

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

-RegistrationInfoToken

The registration token base64 encoded string.

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

-RegistrationTokenOperation

The type of resetting the token.

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

-ResourceGroupName

The name of the resource group. The name is case insensitive.

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

-Ring

The ring number of HostPool.

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

-SkuCapacity

If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.

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

-SkuFamily

If the service has different generations of hardware, for the same SKU, then that can be captured here.

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

-SkuName

The name of the SKU. E.g. P3. It is typically a letter+number code

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

-SkuSize

The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.

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

-SkuTier

This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.

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

-SsoadfsAuthority

URL to customer ADFS server for signing WVD SSO certificates.

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

-SsoClientId

ClientId for the registered Relying Party used to issue WVD SSO certificates.

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

-SsoClientSecretKeyVaultPath

Path to Azure KeyVault storing the secret used for communication to ADFS.

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

-SsoSecretType

The type of single sign on Secret Type.

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

-StartVMOnConnect

The flag to turn on/off StartVMOnConnect feature.

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

-SubscriptionId

The ID of the target subscription. The value must be an UUID.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Tag

Resource tags.

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

-ValidationEnvironment

Is validation environment.

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

-VMTemplate

VM template for sessionhosts configuration within hostpool.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WorkspaceName

Workspace Name

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

Outputs

IHostPool