| external help file | |
|---|---|
| Module Name | Az.DesktopVirtualization |
| online version | https://learn.microsoft.com/powershell/module/az.desktopvirtualization/new-azwvdsessionhostconfiguration |
| schema | 2.0.0 |
Create a SessionHostConfiguration.
New-AzWvdSessionHostConfiguration -HostPoolName <String> -ResourceGroupName <String>
-DomainInfoJoinType <String> -ImageInfoImageType <String> -NetworkInfoSubnetId <String>
-VMAdminCredentialsPasswordKeyVaultSecretUri <String> -VMAdminCredentialsUsernameKeyVaultSecretUri <String>
-VMNamePrefix <String> -VMSizeId <String> [-SubscriptionId <String>]
[-ActiveDirectoryInfoDomainName <String>] [-ActiveDirectoryInfoOuPath <String>] [-AvailabilityZone <Int32[]>]
[-AzureActiveDirectoryInfoMdmProviderGuid <String>] [-BootDiagnosticInfoEnabled]
[-BootDiagnosticInfoStorageUri <String>] [-CustomConfigurationScriptUrl <String>]
[-CustomInfoResourceId <String>] [-DiffDiskSettingOption <String>] [-DiffDiskSettingPlacement <String>]
[-DomainCredentialsPasswordKeyVaultSecretUri <String>] [-DomainCredentialsUsernameKeyVaultSecretUri <String>]
[-FriendlyName <String>] [-ManagedDiskType <String>] [-MarketplaceInfoExactVersion <String>]
[-MarketplaceInfoOffer <String>] [-MarketplaceInfoPublisher <String>] [-MarketplaceInfoSku <String>]
[-NetworkInfoSecurityGroupId <String>] [-SecurityInfoSecureBootEnabled] [-SecurityInfoType <String>]
[-SecurityInfoVTpmEnabled] [-VMLocation <String>] [-VMResourceGroup <String>] [-VMTag <Hashtable>]
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
New-AzWvdSessionHostConfiguration -HostPoolName <String> -ResourceGroupName <String> -JsonFilePath <String>
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
[<CommonParameters>]
New-AzWvdSessionHostConfiguration -HostPoolName <String> -ResourceGroupName <String> -JsonString <String>
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
[<CommonParameters>]
Create a SessionHostConfiguration.
New-AzWvdSessionHostConfiguration -ResourceGroupName ResourceGroupName `
-HostPoolName HostPoolName `
-ManagedDiskType "Standard_LRS" `
-DomainInfoJoinType "AzureActiveDirectory" `
-ImageInfoImageType "Marketplace" `
-NetworkInfoSubnetId "/subscriptions/{subscriptionId}/resourceGroups/resourceGrouName/providers/Microsoft.Network/virtualNetworks/{vNetName}/subnets/default" `
-VMAdminCredentialsPasswordKeyvaultSecretUri "PasswordSecretUri" `
-VMAdminCredentialsUserNameKeyvaultSecretUri "PasswordUsernameUri" `
-VMNamePrefix "createTest" `
-VMSizeId "Standard_D2s_v3" `
-MarketplaceInfoExactVersion "22631.2715.231114" `
-MarketplaceInfoOffer "office-365" `
-MarketplaceInfoPublisher "microsoftwindowsdesktop" `
-MarketplaceInfoSku "win11-23h2-avd-m365" `
-SecurityInfoSecureBootEnabled `
-SecurityInfoType "TrustedLaunch" `
-SecurityInfoVTpmEnabled `
-VmLocation westus2 `
-VmResourceGroup ResourceGroupNameLocation Name Type
-------- ---- ----
eastus default Microsoft.DesktopVirtualization/hostpools/sessionhostconfigurations
This command creates a Azure Virtual Desktop SessionHostConfiguration on a HostPool.
The domain a virtual machine connected to a hostpool will join.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe organizational unit(OU) path.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseRun the command as a job
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseValue for availability zones to be used by the session host. Should be from [1,2,3].
Type: System.Int32[]
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe Mobile Device Management(MDM) guid.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseWhether boot diagnostics should be enabled on the Virtual Machine.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseUri of the storage account to use for placing the console output and screenshot.
If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe uri to the storage blob containing the arm template to be run on the virtual machine after provisioning.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe resource ID of the image.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Type: System.Management.Automation.PSObject
Parameter Sets: (All)
Aliases: AzureRMContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the ephemeral disk settings for operating system disk.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseGets or sets specifies the ephemeral disk placement for operating system disk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise TempDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Possible values include: 'CacheDisk', 'TempDisk'.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe uri to access the secret that the password is stored in.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe uri to access the secret that the username is stored in.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe type of domain join done by the virtual machine.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseFriendly name to describe this version of the SessionHostConfiguration.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe name of the host pool within the specified resource group
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe type of image session hosts use in the hostpool.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalsePath of Json file supplied to the Create operation
Type: System.String
Parameter Sets: CreateViaJsonFilePath
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseJson string supplied to the Create operation
Type: System.String
Parameter Sets: CreateViaJsonString
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseManaged Disk information.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe version of the image.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe offer of the image.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe publisher of the image.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe SKU of the image.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe resource ID of the security group. Any allowable/open ports should be specified in the Network Security Group(NSG).
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe resource ID of the subnet.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseRun the command asynchronously
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe name of the resource group. The name is case insensitive.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseWhether to use secureBoot on the virtual machine.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe security type used by virtual machine in hostpool session host. Default is Standard.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseWhether to use vTpm on the virtual machine.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe ID of the target subscription. The value must be an UUID.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (Get-AzContext).Subscription.Id
Accept pipeline input: False
Accept wildcard characters: FalseThe uri to access the secret that the password is stored in.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe uri to access the secret that the username is stored in.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe Location for the session host to be created in. It will default to the location of the hostpool if not provided
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe prefix that should be associated with session host names
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe ResourceGroup for the session hosts to be created in. It will default to the ResourceGroup of the hostpool if not provided.
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe id of the size of a virtual machine connected to a hostpool. Example: Standard_D2as_v6
Type: System.String
Parameter Sets: CreateExpanded
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseHashtable that lists key/value pair tags to apply to the VMs
Type: System.Collections.Hashtable
Parameter Sets: CreateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalsePrompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.