Skip to content


Creates a new image scheme.


New-ProvImageScheme [-PreparedImageSchemeName] <String> -HostingUnitName <String> -NetworkMapping <Hashtable> [-VMCpuCount <Int32>] [-VMMemoryMB <Int32>] [-ServiceOffering <String>] [-CustomProperties <String>] [-MachineProfile <String>] [-LoggingId <Guid>] [-BearerToken <String>] [-TraceParent <String>] [-TraceState <String>] [-VirtualSiteId <String>] [-AdminAddress <String>] [<CommonParameters>]<br><br>New-ProvImageScheme [-PreparedImageSchemeName] <String> -HostingUnitUid <Guid> -NetworkMapping <Hashtable> [-VMCpuCount <Int32>] [-VMMemoryMB <Int32>] [-ServiceOffering <String>] [-CustomProperties <String>] [-MachineProfile <String>] [-LoggingId <Guid>] [-BearerToken <String>] [-TraceParent <String>] [-TraceState <String>] [-VirtualSiteId <String>] [-AdminAddress <String>] [<CommonParameters>]

Detailed Description

Lets you create a new image scheme. The image scheme is a collection of all of the data that is required to prepare a template against which virtual machines can be created. An image scheme will be used in New-ImageVersion command to prepare an image.

It therefore requires the following: Hosting Unit A reference to an item defined in the Host Service that defines the hypervisor, the network, and the storage to be used.

This cmdlet requires information to be provided that is retrieved using other snap-ins that form part of the Citrix Machine Creation Services: Hosting Unit Service Snapin The snap-in that provides information about the hypervisors.


Name Description Required? Pipeline Input Default Value
PreparedImageSchemeName The name of the image scheme to be created. This must be a name that is not being used by an existing image scheme, and it must not contain any of the following characters \/;:#.*?=<> []()""' true false
HostingUnitName The name of the hosting unit used for the image scheme. true false
HostingUnitUid The identifier for the hosting unit used for the image scheme. true false
NetworkMapping Specifies how the attached NICs are mapped to networks. If this parameter is omitted, provisioned VM in New-ImageVersion command is created with a single NIC, which is mapped to the default network in the HostingUnit. If this parameter is supplied, machine is created with the number of NICs specified in the map, and each NIC is attached to the specified network. true false
VMCpuCount The number of processors used by virtual machines created from the image scheme. false false The number of CPUs assigned to the base image VM snapshot or VM template.
VMMemoryMB The maximum amount of memory used by virtual machines created from the image scheme. false false The amount of memory assigned to the base image VM snapshot or VM template.
ServiceOffering The Service Offering to use when creating machines in Cloud Hypervisors. false false
CustomProperties The properties of the image scheme that are specific to the target hosting infrastructure. false false
MachineProfile The inventory path to the source that is used as a template. This profile identifies the values for the VMs created by the catalog. This must be a path to an item in the same hosting unit that the hosting unit name or hosting unit UID refers to. Valid paths are of the format: XDHyp:\HostingUnits\<HostingUnitName>\<path>\<VMName>.vm false false
LoggingId Specifies the identifier of the high-level operation this cmdlet call forms a part of. Citrix Studio and Director typically create high-level operations. PowerShell scripts can also wrap a series of cmdlet calls in a high-level operation by way of the Start-LogHighLevelOperation and Stop-LogHighLevelOperation cmdlets. false false
BearerToken Specifies the bearer token assigned to the calling user false false
TraceParent Specifies the trace parent assigned for internal diagnostic tracing use false false
TraceState Specifies the trace state assigned for internal diagnostic tracing user false false
VirtualSiteId Specifies the virtual site the PowerShell snap-in will connect to. false false
AdminAddress The address of a Citrix Virtual Apps and Desktops controller the PowerShell snap-in will connect to. You can provide this as a host name or an IP address. false false Localhost. Once a value is provided by any cmdlet, this value becomes the default.

Input Type

Return Values


This object provides details of the image scheme and contains the following information:
CpuCount <int> The number of processors that will be used to create VMs. CustomProperties <string> Properties of the image scheme which that are specific to the target hosting infrastructure. (See about_ProvCustomProperties) HostingUnitName <string> The name of the hosting unit being used by this image scheme. HostingUnitUid <Guid> The unique identifier of the hosting unit being used by this image scheme. MachineProfile <string> The inventory path to the source VM used by the image scheme as a template. MemoryMB <int> The maximum amount of memory that will be used to created VMs in MB. NetworkMaps <Citrix.MachineCreation.Sdk.NetworkMap[]> The NIC/network mappings that will be used to create VMs. PreparedImageSchemeName <string> The name of this image scheme. PreparedImageSchemeUid <Guid> The unique identifier for this image scheme. ServiceOffering <string> The service offering that the scheme uses when creating VMs in Cloud Hypervisors.


In case of failure, the following errors can result.
Error Codes
An error occurred in the service while attempting a database operation.
The operation could not be completed because the database for the service is not configured.
An error occurred in the service while attempting a database operation. Communication with the database failed for
for various reasons.
The database supporting the service instance being used has not been upgraded to support the personal vDisk feature.
An error occurred while communicating with the service.
The user does not have administrative rights to perform this operation.
The operation could not be performed because of a configuration logging error.
One or more of the scopes nominated for the new image scheme do not exist.
An unexpected error occurred. To locate more details, see the Windows event logs on the controller being used, or examine the XenDesktop logs. ImageSchemeNameAlreadyExists
The specified image scheme name has already existed.


Example 1

C:\PS> New-ProvImageScheme -PreparedImageSchemeName XenPS -HostingUnitName XenHu<br><br>CpuCount                 : 0<br><br>CustomProperties         :<br><br>HostingUnitName          : XenHu<br><br>HostingUnitUid           : e5d4a2c9-6650-4cfc-93cc-1686db82b92e<br><br>MachineProfile           :<br><br>MemoryMB                 : 0<br><br>NetworkMaps              : []<br><br>PreparedImageSchemeName  : XenPS<br><br>PreparedImageSchemeUid   : 85bd21c6-851b-420a-a702-2fa2ee6f0052<br><br>ServiceOffering          :


Creates a new image scheme with the name "XenPS" using the hosting unit "XenHu".

Example 2

C:\PS> New-ProvImageScheme -PreparedImageSchemeName azurescheme -HostingUnitName azure -ServiceOffering "XDHyp:\HostingUnits\azure\serviceoffering.folder\Standard_B2ms.serviceoffering" -NetworkMapping @{"0"="XDHyp:\HostingUnits\azure\virtualprivatecloud.folder\East US.region\virtualprivatecloud.folder\hu.resourcegroup\hu.virtualprivatecloud\"}<br><br>CpuCount                 : 0<br><br>CustomProperties         :<br><br>HostingUnitName          : azure<br><br>HostingUnitUid           : e5d4a2c9-6650-4cfc-93cc-1686db82b92e<br><br>MachineProfile           :<br><br>MemoryMB                 : 0<br><br>NetworkMaps              : [{"DeviceId":"0","NetworkId":"","NetworkPath":"virtualprivatecloud.folder\\East US.region\\virtualpr<br><br>                           ivatecloud.folder\\hu.resourcegroup\\hu.virtualprivatecloud\\"}]<br><br>PreparedImageSchemeName  : myImageScheme<br><br>PreparedImageSchemeUid   : b5a55401-ad36-4f53-b0e0-dbb6a5bdf6fd<br><br>ServiceOffering          : serviceoffering.folder\Standard_B2ms.serviceoffering


Creates a new image scheme with the name "azurescheme" using the hosting unit "azure".

Was this article helpful?