New-ProvScheme
Creates a new provisioning scheme.
Syntax
New-ProvScheme
[-ProvisioningSchemeName] <String>
-ImageVersionSpecUid <Guid>
-HostingUnitName <String>
[-VMCpuCount <Int32>]
[-VMMemoryMB <Int32>]
-IdentityPoolName <String>
[-CleanOnBoot]
[-UseWriteBackCache]
[-Scope <String[]>]
[-NetworkMapping <Hashtable>]
[-Metadata <Hashtable>]
[-ServiceOffering <String>]
[-SecurityGroup <String[]>]
[-TenancyType <String>]
[-MachineProfile <String>]
[-CustomProperties <String>]
[-ResetAdministratorPasswords]
[-UseFullDiskCloneProvisioning]
[-Validate]
[-MasterImageNote <String>]
[-RunAsynchronously]
[-PurgeJobOnSuccess]
[-InitialBatchSizeHint <Int32>]
[-PVSSite <Guid>]
[-PVSvDisk <Guid>]
[-ProvisioningSchemeType <ProvisioningSchemeType>]
[-ForceCreate]
[-KeepPreparationVMOnFailure]
[-DataDiskPersistence <String>]
[-DataDisk <String>]
[-LoggingId <Guid>]
[<CitrixCommonParameters>]
[<CommonParameters>]
<!--NeedCopy-->
New-ProvScheme
[-ProvisioningSchemeName] <String>
-ImageVersionSpecUid <Guid>
-HostingUnitUid <Guid>
[-VMCpuCount <Int32>]
[-VMMemoryMB <Int32>]
-IdentityPoolUid <Guid>
[-CleanOnBoot]
[-UseWriteBackCache]
[-Scope <String[]>]
[-NetworkMapping <Hashtable>]
[-Metadata <Hashtable>]
[-ServiceOffering <String>]
[-SecurityGroup <String[]>]
[-TenancyType <String>]
[-MachineProfile <String>]
[-CustomProperties <String>]
[-ResetAdministratorPasswords]
[-UseFullDiskCloneProvisioning]
[-Validate]
[-MasterImageNote <String>]
[-RunAsynchronously]
[-PurgeJobOnSuccess]
[-InitialBatchSizeHint <Int32>]
[-PVSSite <Guid>]
[-PVSvDisk <Guid>]
[-ProvisioningSchemeType <ProvisioningSchemeType>]
[-ForceCreate]
[-KeepPreparationVMOnFailure]
[-DataDiskPersistence <String>]
[-DataDisk <String>]
[-LoggingId <Guid>]
[<CitrixCommonParameters>]
[<CommonParameters>]
<!--NeedCopy-->
New-ProvScheme
[-ProvisioningSchemeName] <String>
[-MasterImageVM <String>]
-HostingUnitName <String>
[-VMCpuCount <Int32>]
[-VMMemoryMB <Int32>]
-IdentityPoolName <String>
[-CleanOnBoot]
[-UseWriteBackCache]
[-Scope <String[]>]
[-NetworkMapping <Hashtable>]
[-Metadata <Hashtable>]
[-ServiceOffering <String>]
[-SecurityGroup <String[]>]
[-TenancyType <String>]
[-MachineProfile <String>]
[-CustomProperties <String>]
[-ResetAdministratorPasswords]
[-FunctionalLevel <String>]
[-UseFullDiskCloneProvisioning]
[-Validate]
[-MasterImageNote <String>]
[-RunAsynchronously]
[-PurgeJobOnSuccess]
[-InitialBatchSizeHint <Int32>]
[-PVSSite <Guid>]
[-PVSvDisk <Guid>]
[-ProvisioningSchemeType <ProvisioningSchemeType>]
[-ForceCreate]
[-KeepPreparationVMOnFailure]
[-DataDiskPersistence <String>]
[-DataDisk <String>]
[-LoggingId <Guid>]
[<CitrixCommonParameters>]
[<CommonParameters>]
<!--NeedCopy-->
New-ProvScheme
[-ProvisioningSchemeName] <String>
[-MasterImageVM <String>]
-HostingUnitUid <Guid>
[-VMCpuCount <Int32>]
[-VMMemoryMB <Int32>]
-IdentityPoolUid <Guid>
[-CleanOnBoot]
[-UseWriteBackCache]
[-Scope <String[]>]
[-NetworkMapping <Hashtable>]
[-Metadata <Hashtable>]
[-ServiceOffering <String>]
[-SecurityGroup <String[]>]
[-TenancyType <String>]
[-MachineProfile <String>]
[-CustomProperties <String>]
[-ResetAdministratorPasswords]
[-FunctionalLevel <String>]
[-UseFullDiskCloneProvisioning]
[-Validate]
[-MasterImageNote <String>]
[-RunAsynchronously]
[-PurgeJobOnSuccess]
[-InitialBatchSizeHint <Int32>]
[-PVSSite <Guid>]
[-PVSvDisk <Guid>]
[-ProvisioningSchemeType <ProvisioningSchemeType>]
[-ForceCreate]
[-KeepPreparationVMOnFailure]
[-DataDiskPersistence <String>]
[-DataDisk <String>]
[-LoggingId <Guid>]
[<CitrixCommonParameters>]
[<CommonParameters>]
<!--NeedCopy-->
Description
Allows you to create a new provisioning scheme. The creation process makes a copy of the hard disk attached to a virtual machine snapshot or VM template and stores it in every storage location that the hosting unit referenced by the provisioning scheme defines. This is a long-running task and typically takes several minutes to complete (depending on the size of the hard disk that is being copied and the number of snapshots that the hard disk consists of).
A snapshot or VM template must be used rather than a VM, so that the content of the hard disk for the provisioning scheme can be easily determined.
Because the snapshot or VM template are specified using a path into the Citrix Host Service PowerShell Provider, the Citrix Host Service PowerShell snap-in must also be loaded to use this cmdlet.
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.
AD Identity Service Snapin
The snap-in that provides information about the identity pools.
The provisioning scheme is a collection of all of the data that is required to form a template against which virtual machines can be created. 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.
Identity Pool
A reference to the collection of Active Directory accounts that is used for VMs created from the provisioning scheme.
Examples
EXAMPLE 1
Creates a new provisioning scheme with the name “XenPS” using the hosting unit “XenHu” and the identity pool “idPool1” from the master VM snapshot called “Base.snapshot”.
New-ProvScheme -ProvisioningSchemeName XenPS -HostingUnitName XenHu -IdentityPoolName idPool1 -CleanOnBoot -MasterImageVM XDHyp:\HostingUnits\XenHU\Base.vm\Base.snapshot
TaskId : 90e93b9d-a225-4701-ad50-fa1546af35ac
Type : NewProvisioningScheme
Status : Finished
CurrentOperation :
TaskExpectedCompletion :
LastUpdateTime : 17/05/2020 08:24:08
ActiveElapsedTime : 11
DateStarted : 17/05/2020 08:22:22
DateFinished : 17/05/2020 08:24:08
TerminatingError :
Storage : {}
WorkflowStatus : Completed
Warnings : {}
ProvisioningSchemeName : XenPS
MasterImage : XDHyp:\HostingUnits\XenHU\Base.vm\Base.snapshot
IdentityPoolName : idPool1
IdentityPoolUid : 03743136-e43b-4a87-af74-ab71686b3c16
HostingUnitName : XenHU
HostingUnitUid : 01a4a008-8ce8-4165-ba9c-cdf15a6b0501
CustomProperties :
InitialBatchSizeHint : 0
ProvisioningSchemeUid : 7585f0de-192e-4847-a6d8-22713c3a2f42
TaskState : Finished
TaskStateInformation :
TaskProgress : 100
DiskSize : 24
MasterImageNote :
WriteBackCacheDiskSize : 127
WriteBackCacheMemorySize : 256
WriteBackCacheDriveLetter : W
Scopes : {}
NetworkMaps : {0}
ProvisioningSchemeMetadata : {}
ServiceOffering :
SecurityGroups :
DedicatedTenancy : False
ResetAdministratorPasswords : True
StatusMessageSubstitutions :
GpuTypeId :
UseFullDiskCloneProvisioning : False
<!--NeedCopy-->
EXAMPLE 2
Creates a new provisioning scheme with the name “AWS1” using the hosting unit “aws-test” and the identity pool “idPool1” from the master VM snapshot called “TemplateAmi”. The machine instance “server-vda” is used as a Machine Profile when creating the provisioning scheme so all other parameters are taken from the instance.
$provScheme = New-ProvScheme -ProvisioningSchemeName AWS1 -HostingUnitName aws-test -IdentityPoolName idPool1 -MasterImageVM "XDHyp:\HostingUnits\aws-test\TemplateAmi (ami-06927522c36bf4109).template" -CleanOnBoot -MachineProfile "XDHyp:\HostingUnits\aws-test\us-east-1a.availabilityzone\server-vda (i-0c136ee2a01a3dd60).vm"
<!--NeedCopy-->
EXAMPLE 3
Creates a new provisioning scheme with the name “AWS2” using the hosting unit “aws-test” and the identity pool “idPool2” from the master VM snapshot called “TemplateAmi”. The version “1” of the launch template with name “machine-profile-lt” and id “lt-06927522c36bg5698” is used as a Machine Profile when creating the provisioning scheme so all other parameters are taken from this launch template version. If instance type value (ServiceOffering) is empty in the machine profile launch template version and no service offering is provided in cmdlet parameter, the cmdlet will return error.
$provScheme = New-ProvScheme -ProvisioningSchemeName AWS2 -HostingUnitName aws-test -IdentityPoolName idPool2 -MasterImageVM "XDHyp:\HostingUnits\aws-test\TemplateAmi (ami-06927522c36bf4109).template" -CleanOnBoot -MachineProfile "XDHyp:\HostingUnits\aws-test\machine-profile-lt (lt-06927522c36bg5698).launchtemplate\lt-06927522c36bg5698 (1).launchtemplateversion"
<!--NeedCopy-->
EXAMPLE 4
Creates a new provisioning scheme with the name “XenPS” using the hosting unit “XenHu” and the identity pool “idPool1” from the master VM snapshot called “Base.snapshot” asynchronously. To get the task details, use Get-ProvTask -TaskID <task id>.
New-ProvScheme -ProvisioningSchemeName XenPS -HostingUnitName XenHu -IdentityPoolName idPool1 -CleanOnBoot -MasterImageVM XDHyp:\HostingUnits\XenHU\Base.vm\Base.snapshot -RunAsynchronously
Guid
----
6dd85fec-96cf-46b1-9cd4-d8ba7d06e85b
Get-ProvTask -TaskID 6dd85fec-96cf-46b1-9cd4-d8ba7d06e85b
TaskId : 6dd85fec-96cf-46b1-9cd4-d8ba7d06e85b
Type : NewProvisioningScheme
Status : Finished
CurrentOperation :
TaskExpectedCompletion :
LastUpdateTime : 17/05/2020 08:24:08
ActiveElapsedTime : 11
DateStarted : 17/05/2020 08:22:22
DateFinished : 17/05/2020 08:24:08
TerminatingError :
Storage : {}
WorkflowStatus : Completed
Warnings : {}
ProvisioningSchemeName : XenPS
MasterImage : XDHyp:\HostingUnits\XenHU\Base.vm\Base.snapshot
IdentityPoolName : idPool1
IdentityPoolUid : 03743136-e43b-4a87-af74-ab71686b3c16
HostingUnitName : XenHU
HostingUnitUid : 01a4a008-8ce8-4165-ba9c-cdf15a6b0501
CustomProperties :
InitialBatchSizeHint : 0
ProvisioningSchemeUid : 7585f0de-192e-4847-a6d8-22713c3a2f42
TaskState : Finished
TaskStateInformation :
TaskProgress : 100
DiskSize : 24
MasterImageNote :
WriteBackCacheDiskSize : 127
WriteBackCacheMemorySize : 256
WriteBackCacheDriveLetter : W
Scopes : {}
NetworkMaps : {0}
ProvisioningSchemeMetadata : {}
ServiceOffering :
SecurityGroups :
DedicatedTenancy : False
ResetAdministratorPasswords : True
StatusMessageSubstitutions :
GpuTypeId :
UseFullDiskCloneProvisioning : False
<!--NeedCopy-->
EXAMPLE 5
Creates a new provisioning scheme with the name “XenPS2” using the hosting unit “XenHu” and the identity pool “idPool1” from the master VM snapshot called “Base.snapshot”.
The operation runs synchronously, and the return value contains the task details.
$provScheme = New-ProvScheme -ProvisioningSchemeName XenPS2 -HostingUnitName XenHu -IdentityPoolName idPool1 -CleanOnBoot -MasterImageVM XDHyp:\HostingUnits\XenHU\Base.vm\Base.snapshot
$provScheme
TaskId : d726222a-04b5-4098-b9ac-db85ed9d351b
Type : NewProvisioningScheme
Status : Finished
CurrentOperation :
TaskExpectedCompletion :
LastUpdateTime : 17/05/2020 08:24:08
ActiveElapsedTime : 11
DateStarted : 17/05/2020 08:22:22
DateFinished : 17/05/2020 08:24:08
TerminatingError :
Storage : {}
WorkflowStatus : Completed
Warnings : {}
ProvisioningSchemeName : XenPS2
MasterImage : XDHyp:\HostingUnits\XenH\Base.vm\Base.snapshot
IdentityPoolName : idPool1
IdentityPoolUid : 03743136-e43b-4a87-af74-ab71686b3c16
HostingUnitName : XenHU
HostingUnitUid : 01a4a008-8ce8-4165-ba9c-cdf15a6b0501
CustomProperties :
InitialBatchSizeHint : 0
ProvisioningSchemeUid : 7585f0de-192e-4847-a6d8-22713c3a2f42
TaskState : Finished
TaskStateInformation :
TaskProgress : 100
DiskSize : 24
MasterImageNote :
WriteBackCacheDiskSize : 127
WriteBackCacheMemorySize : 256
WriteBackCacheDriveLetter : W
Scopes : {}
NetworkMaps : {0}
ProvisioningSchemeMetadata : {}
ServiceOffering :
SecurityGroups :
DedicatedTenancy : False
ResetAdministratorPasswords : True
StatusMessageSubstitutions :
GpuTypeId :
UseFullDiskCloneProvisioning : False
<!--NeedCopy-->
EXAMPLE 6
Creates a new provisioning scheme with the name “XenPS2” using the hosting unit “AzureHostingUnit” and the identity pool “idPool1” from the master VM snapshot called “Base.snapshot” and using the machine profile called 1.0.
The operation runs synchronously, and the return value contains the task details.
$provScheme = New-ProvScheme -ProvisioningSchemeName XenPS2 -HostingUnitName AzureHostingUnit -IdentityPoolName idPool1 -CleanOnBoot -MasterImageVM XDHyp:\HostingUnits\AzureHostingUnit\image.folder\RG.resourcegroup\masterImage.manageddisk -MachineProfile XDHyp:\HostingUnits\AzureHostingUnit\machineprofile.folder\RG.resourcegroup\TS.templatespec\1.0.templatespecversion
$provScheme
TaskId : d726222a-04b5-4098-b9ac-db85ed9d351b
Type : NewProvisioningScheme
Status : Finished
CurrentOperation :
TaskExpectedCompletion :
LastUpdateTime : 17/05/2020 08:24:08
ActiveElapsedTime : 11
DateStarted : 17/05/2020 08:22:22
DateFinished : 17/05/2020 08:24:08
TerminatingError :
Storage : {}
WorkflowStatus : Completed
Warnings: : {}
ProvisioningSchemeName : XenPS2
MachineProfile : XDHyp:\HostingUnits\AzureHostingUnit\machineprofile.folder\RG.resourcegroup\TS.templatespec\1.0.templatespecversion
MasterImage : XDHyp:\HostingUnits\AzureHostingUnit\image.folder\RG.resourcegroup\masterImage.manageddisk
IdentityPoolName : idPool1
IdentityPoolUid : 03743136-e43b-4a87-af74-ab71686b3c16
HostingUnitName : AzureHostingUnit
HostingUnitUid : 01a4a008-8ce8-4165-ba9c-cdf15a6b0501
CustomProperties :
InitialBatchSizeHint : 0
ProvisioningSchemeUid : 7585f0de-192e-4847-a6d8-22713c3a2f42
TaskState : Finished
TaskStateInformation :
TaskProgress : 100
DiskSize : 24
MasterImageNote :
WriteBackCacheDiskSize : 127
WriteBackCacheMemorySize : 256
WriteBackCacheDriveLetter : W
Scopes : {}
NetworkMaps : {0}
ProvisioningSchemeMetadata : {}
ServiceOffering :
SecurityGroups :
DedicatedTenancy : False
ResetAdministratorPasswords : True
StatusMessageSubstitutions :
GpuTypeId :
UseFullDiskCloneProvisioning : False
<!--NeedCopy-->
EXAMPLE 7
Creates a new provisioning scheme with the optional parameter “-ForceCreate” to show how to keep a provisioning scheme that fails in image preparation to assist in troubleshooting the failure.
$task = New-ProvScheme -HostingUnitName "xenres" -IdentityPoolName "jf1" -InitialBatchSizeHint 1 -MasterImageVM "XDHyp:\HostingUnits\xenres\small.vm\Small.snapshot" -NetworkMapping @{"0"="XDHyp:\HostingUnits\xenres\my-network.network"} -ProvisioningSchemeName "no-vda-test" -ProvisioningSchemeType "MCS" -Scope @() -VMCpuCount 1 -VMMemoryMB 256 -ForceCreate
Get-ProvScheme -ProvisioningSchemeName "no-vda-test"
CleanOnBoot : False
ControllerAddress : {}
CpuCount : 1
DiskSize : 1
HostingUnitName : xenres
HostingUnitUid : 14d7fa9c-c790-407c-858a-5e5a758a73cc
IdentityPoolName : jf1
IdentityPoolUid : 5639673f-1e13-455c-9c41-0f493e24f4e2
MachineCount : 0
MachineProfile :
MasterImageVM : XDHyp:\HostingUnits\xenres\small.vm\Small.snapshot
MasterImageVMDate : 9/7/2023 10:14:34 AM
MemoryMB : 256
Metadata : {ImageManagementPrep_DoImagePreparation = True, ImageManagementPrep_Excluded_Steps = ,
ImageManagementPrep_NoAutoShutdown = False}
MetadataMap : {[ImageManagementPrep_DoImagePreparation, True], [ImageManagementPrep_Excluded_Steps,
], [ImageManagementPrep_NoAutoShutdown, False]}
PVSSite :
PVSVDisk :
PreparedImageDefinitionName :
PreparedImageVersionNumber :
PreparedImageVersionUid : 00000000-0000-0000-0000-000000000000
ProvisioningSchemeName : no-vda-test
ProvisioningSchemeType : MCS
ProvisioningSchemeUid : 78a38a90-eea3-40bf-a4c8-94c9a1cd6906
ProvisioningSchemeVersion : 1
State : ErrorCreating
TaskId :
VMMetadata : {A, A, E, A...}
WindowsActivationType : UnsupportedVDA
PersonalVDiskDriveLetter :
PersonalVDiskDriveSize : 0
UsePersonalVDiskStorage : False
NetworkMaps : {0}
Scopes :
DedicatedTenancy : False
GpuTypeId :
ResetAdministratorPasswords : False
SecurityGroups : {}
ServiceOffering :
TenancyType : Shared
CurrentMasterImageUid : 20f4e0e1-2983-43c1-b6ba-25e6798f092f
CustomProperties :
ImageRuntimeInfo :
UseFullDiskCloneProvisioning : False
UseWriteBackCache : False
WriteBackCacheDiskSize : 0
WriteBackCacheDriveLetter :
WriteBackCacheMemorySize : 0
Warnings : {}
WriteBackCacheDiskIndex : 0
Get-ProvOperationEvent -LinkedObjectUid 78a38a90-eea3-40bf-a4c8-94c9a1cd6906
EventAdditionalData : No Image Preparation results found. There may be no suitable VDA installed, or some other
serious failure in the Master VM. Image preparation failed.
EventCategory : Error
EventDateTime : 9/8/2023 9:53:07 AM
EventId : 1
EventMessage :
EventSeverity : Critical
EventSource : Mcs
EventState : New
LinkedObjectType : ProvisioningScheme
LinkedObjectUid : 78a38a90-eea3-40bf-a4c8-94c9a1cd6906
OperationName : Create
OperationTargetName : no-vda-test
OperationTargetType : ProvisioningScheme
OperationType : ProvisioningSchemeManagement
Recommendation :
<!--NeedCopy-->
EXAMPLE 8
Creates a new provisioning scheme with the optional parameter “-KeepPreparationVMOnFailure” to show how to keep a provisioning scheme and the image preparation VM when image preparation fails to assist in troubleshooting the failure. The image preparation VM can be removed on the hypervisor manually or will be removed automatically when the associated provisioning scheme is deleted.
$task = New-ProvScheme -HostingUnitName "xenres" -IdentityPoolName "small fail" -MasterImageVM "XDHyp:\HostingUnits\xenres\small.vm\Small.snapshot" -NetworkMapping @{"0"="XDHyp:\HostingUnits\xenres\my-network.network"} -ProvisioningSchemeName "fail test" -ProvisioningSchemeType "MCS" -Scope @() -VMCpuCount 1 -VMMemoryMB 256 -ForceCreate -KeepPreparationVMOnFailure
Get-ProvScheme -ProvisioningSchemeName "fail test"
CleanOnBoot : False
ControllerAddress : {}
CpuCount : 1
DiskSize : 1
HostingUnitName : xenres
HostingUnitUid : 9a63a0c3-abd7-4ee3-8cc5-821f213cef9f
IdentityPoolName : small fail
IdentityPoolUid : 387ede83-8b24-4904-ac76-e89edb023be5
ImageDefinitionName :
ImageVersionNumber :
ImageVersionSpecUid :
MachineCount : 0
MachineProfile :
MasterImageVM : XDHyp:\HostingUnits\xenres\small.vm\Small.snapshot
MasterImageVMDate : 7/30/2024 1:55:40 PM
MemoryMB : 256
Metadata : {ImageManagementPrep_DoImagePreparation = True, ImageManagementPrep_Excluded_Steps = ,
ImageManagementPrep_NoAutoShutdown = False}
MetadataMap : {[ImageManagementPrep_DoImagePreparation, True], [ImageManagementPrep_Excluded_Steps,
], [ImageManagementPrep_NoAutoShutdown, False]}
PVSSite :
PVSVDisk :
ProvisioningSchemeName : fail test
ProvisioningSchemeType : MCS
ProvisioningSchemeUid : 7512265b-dbb4-4a84-ad03-62f1d88f49fe
ProvisioningSchemeVersion : 1
State : ErrorCreating
TaskId :
VMMetadata : {A, A, E, A...}
WindowsActivationType : UnsupportedVDA
PersonalVDiskDriveLetter :
PersonalVDiskDriveSize : 0
UsePersonalVDiskStorage : False
NetworkMaps : {0}
Scopes :
DataDisk :
DataDiskPersistence :
DedicatedTenancy : False
GpuTypeId :
ResetAdministratorPasswords : False
SecurityGroups : {}
ServiceOffering :
TenancyType : Shared
CurrentMasterImageUid : d21c6bea-ccfa-4670-a605-23087d978a44
CustomProperties :
ImageRuntimeInfo :
UseFullDiskCloneProvisioning : False
UseWriteBackCache : False
WriteBackCacheDiskSize : 0
WriteBackCacheDriveLetter :
WriteBackCacheMemorySize : 0
Warnings : {}
WriteBackCacheDiskIndex : 0
Get-ProvScheme -ProvisioningSchemeName "fail test" | Remove-ProvScheme
TaskId : a1e720f9-c389-42d3-ae73-210bc08ee243
Active : False
Host : JOEF-DDC2
DateStarted : 7/30/2024 2:04:56 PM
Metadata : {}
ProvisioningSchemeUid : 7512265b-dbb4-4a84-ad03-62f1d88f49fe
ProvisioningSchemeName : fail test
PurgeDBOnly : False
ForgetVM : False
RemovedVirtualMachines : {}
FailedVirtualMachines : {}
TaskStateInformation : Completed
TaskState : Finished
TaskType : RemoveProvScheme
LastUpdateTime : 7/30/2024 2:04:57 PM
CurrentOperation :
TerminatingError :
TaskProgress : 100
WorkFlowStatus : Completed
DateFinished : 7/30/2024 2:04:57 PM
TaskExpectedCompletion : 7/30/2024 2:04:57 PM
ActiveElapsedTime : 1
Status : Finished
Type : RemoveProvScheme
<!--NeedCopy-->
Parameters
-HostingUnitName
The name of the hosting unit to be used for the provisioning scheme.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IdentityPoolName
The name of the identity pool to be used for the provisioning scheme.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HostingUnitUid
The unique identifier of the hosting unit to be used for the provisioning scheme.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IdentityPoolUid
The unique identifier of the identity pool to be used for the provisioning scheme.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ImageVersionSpecUid
The identifier for the image version spec used for the provisioning scheme.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Introduced in: | Citrix Virtual Apps and Desktop 7 2402 |
-ProvisioningSchemeName
The name of the provisioning scheme to be created. This must not be a name that is being used by an existing provisioning scheme, and must not contain any of the following characters \/;:#.*?=<>|[]()””’
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Length range: | 1 to 64 |
Disallowed characters: | \/;:#.*?=<>\|[]()"' |
-MasterImageVM
The path in the hosting unit provider to the VM snapshot or template that will be used. This identifies the hard disk to be used and the default values for the memory and processors. This must be a path to a Snapshot or Template item in the same hosting unit specified by HostingUnitName or HostingUnitUid. Valid paths are of the format:
XDHyp:\HostingUnits\<HostingUnitName>\<path>\<VMName>.vm\<SnapshotName>.snapshot XDHyp:\HostingUnits\<HostingUnitName>\<path>\<TemplateName>.template
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
-UseWriteBackCache
Indicates whether write-back cache is enabled for the VMs created from this provisioning scheme.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FunctionalLevel
The FunctionalLevel of the VDA installed on the given MasterImageVM.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMCpuCount
The number of processors that will be used to create VMs from the provisioning scheme. Only supported for on-prem hypervisors and cannot be used alongside ServiceOffering.
Type: | Int32 |
Position: | Named |
Default value: | The number of CPUs assigned to the base image VM snapshot or VM template. |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMemoryMB
The maximum amount of memory that will be used to created VMs from the provisioning scheme in MB. Only supported for on-prem hypervisors and cannot be used alongside ServiceOffering.
Type: | Int32 |
Position: | Named |
Default value: | The amount of memory assigned to the base image VM snapshot or VM template. |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CleanOnBoot
Indicates whether the VMs created from this provisioning scheme are reset to their initial condition each time they are started.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Scope
The administration scopes to be applied to the new provisioning scheme.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NetworkMapping
Specifies how the attached NICs are mapped to networks. If this parameter is omitted, VMs are created with a single NIC, which is mapped to the default network in the hosting unit. If this parameter is supplied, machines are created with the number of NICs specified in the map, and each NIC is attached to the specified network.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Metadata
The metadata to be associated with this provisioning scheme.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServiceOffering
The Service Offering to use when creating VMs in Cloud Hypervisors. Cannot be used alongside either VMCpuCount or VMMemoryMB.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SecurityGroup
The security groups to apply to VMs created in Cloud Hypervisors.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TenancyType
Indicates whether to use tenancy type Shared, Instance or Host when creating VMs in Cloud Hypervisors.
Type: | String |
Accepted values: | Shared, Instance, Host |
Position: | Named |
Default value: | Shared |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MachineProfile
Defines the inventory path to the source VM used by the provisioning scheme as a template. This profile identifies the properties for the VMs created from the scheme. The VM must be in the hosting unit that HostingUnitName or HostingUnitUid refers to. If any properties are present in the MachineProfile but not the CustomProperties, values from the template will be written back to the CustomProperties. See about_Prov_MachineProfile for more details.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Introduced in: | Citrix Virtual Apps and Desktop 7 2109 |
-CustomProperties
The properties of the provisioning scheme that are specific to the target hosting infrastructure. See about_Prov_CustomProperties for more information.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResetAdministratorPasswords
Indicates whether the passwords for administrator accounts are reset on created machines.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UseFullDiskCloneProvisioning
Indicates whether VMs should be created using the dedicated full disk clone feature.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Validate
Indicates whether a dry run of the configuration validation will be performed.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Introduced in: | Citrix Virtual Apps and Desktop 7 2308 |
-MasterImageNote
A note for the master image.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Introduced in: | Citrix Virtual Apps and Desktop 7 2109 |
-RunAsynchronously
Indicates whether the command returns before it completes. If specified, the command returns an identifier for the task that was created. This task can be monitored using the Get-ProvTask command.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PurgeJobOnSuccess
Indicates that the task history is removed from the database when the task completes. This can not be specified for tasks that run asynchronously.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InitialBatchSizeHint
Provides a predictive hint for the number of initial VMs that will be added to the MCS catalog when the scheme is successfully created. Callers should supply this parameter in situations where the completion of New-ProvScheme will be closely followed by a New-ProvVM call to create an initial batch of VMs in the catalog.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PVSSite
PVS Site to be assigned to the VMs in the Provisioning Scheme.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Introduced in: | Citrix Virtual Apps and Desktop 7 2209 |
-PVSvDisk
PVS vDisk to be assigned to the VMs in the Provisioning Scheme.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Introduced in: | Citrix Virtual Apps and Desktop 7 2209 |
-ProvisioningSchemeType
The type of Provisioning Scheme to created, either MCS or PVS, defaults to MCS
Type: | ProvisioningSchemeType |
Accepted values: | MCS, PVS |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Introduced in: | Citrix Virtual Apps and Desktop 7 2303 |
-ForceCreate
If specified, the provisioning scheme will be created even in the event of creation failure.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Introduced in: | Citrix Virtual Apps and Desktop 7 2311 |
-KeepPreparationVMOnFailure
If specified, the image preparation VM will not be deleted and the provisioning scheme will be created in case of image preparation failure. The image preparation VM can be used for troubleshooting purposes and can be removed on the hypervisor manually or will be removed automatically when the provisioning scheme is deleted.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Introduced in: | Citrix Virtual Apps and Desktop 7 2411 |
-DataDiskPersistence
If specified, the provisioning scheme will be created using the data disk and indicates whether to use Persistent or NonPersistent data disk during VM creation. This property applies to provisioning scheme with CleanOnBoot enabled.
Type: | String |
Accepted values: | Persistent, NonPersistent |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Introduced in: | Citrix Virtual Apps and Desktop 7 2411 |
-DataDisk
If specified, the provisioning scheme will use the path of the Data disk specified.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Introduced in: | Citrix Virtual Apps and Desktop 7 2411 |
-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.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
CitrixCommonParameters
This cmdlet supports the common Citrix parameters: -AdminAddress, -AdminClientIP, -BearerToken, -TraceParent, -TraceState and -VirtualSiteId. For more information, see about_CitrixCommonParameters.
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Removed Parameters
Parameters in this section were available in older releases, and have been removed or replaced due to changes in functionality.
-UsePersonalVDiskStorage
Indicates whether personal vDisks are used for the VMs created from this provisioning scheme.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Removed in: | Citrix Virtual Apps and Desktop 7 2209 |
-NoImagePreparation
Indicates that image preparation should not be performed on this provisioning scheme.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Removed in: | Citrix Virtual Apps and Desktop 7 2411 |
-DedicatedTenancy
Indicates whether to use dedicated tenancy when creating VMs in Cloud Hypervisors.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Removed in: | Citrix Virtual Apps and Desktop 7 2303 |
-VhdTemplateSource
A file path to a source VHD template to be used when performing application scanning during image preparation. The presence of this parameter in conjunction with VhdResultDestination implies that application scanning is to be performed.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Removed in: | Citrix Virtual Apps and Desktop 7 2209 |
-VhdResultDestination
A file path (including file name) where the VHD disk file containing the results of application scanning should be written.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Removed in: | Citrix Virtual Apps and Desktop 7 2209 |
-AppScanResultsFile
File name to which the results of application scanning should be written.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Removed in: | Citrix Virtual Apps and Desktop 7 2209 |
-AzureAdJoinType
Specifies the Azure Active Directory join type.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Introduced in: | Citrix Virtual Apps and Desktop 7 2109 |
Removed in: | Citrix Virtual Apps and Desktop 7 2206 |
Inputs
None
You can’t pipe objects to this cmdlet.
Outputs
Guid
When the RunAsynchronously identifier is specified, this GUID is returned and provides the task identifier.
System.Management.Automation.PSCustomObject
This object provides details of the task that was run and contains the following information:
TaskId <Guid>
The identifier for the task that was performed.
Type <Citrix.XDInterServiceTypes.JobType>
The type of task. For new provisioning scheme tasks, this is always NewProvisioningScheme.
Status <string>
Where in its lifecycle the task is.
CurrentOperation <string>
Operation specific phase of the overall “Running” task state.
TaskExpectedCompletion <DateTime>
The date and time at which the task is expected to complete.
LastUpdateTime <DateTime>
The date and time of the last task status update.
ActiveElapsedTime <int>
Number of seconds the task has taken for active execution.
DateStarted <DateTime>
The date and time when the task was started.
DateFinished <DateTime>
The date and time when the task was completed.
TerminatingError < Citrix.Fma.Sdk.ServiceCore.CommonCmdlets.TaskterminatingError>
Diagnostic information if the task completely fails.
Storage <Citrix.MachineCreation.Sdk.NewProvSchemeStorage[]>
Storage objects to be used for the new provisioning scheme task.
WorkflowStatus <System.Workflow.Runtime.WorkflowStatus>
Indicates the status of the workflow that is used to process the task.
Warnings <Citrix.MachineCreation.Sdk.ProvSchemeWarning[]>
Warnings associated with the new provisioning scheme task.
ProvisioningSchemeName <string>
The name of the provisioning scheme being created.
MasterImage <string>
The inventory path of the VM snapshot or template to be used as the master VM image for the task.
IdentityPoolName <string>
The name of the identity pool to be used by the new provisioning scheme.
IdentityPoolUid <guid>
The unique identifier name of the identity pool to be used by the new provisioning scheme.
HostingUnitName <string>
The name of the hosting unit to be used by the new provisioning scheme.
HostingUnitUid <guid>
The unique identifier of the hosting unit to be used by the new provisioning scheme.
CustomProperties <string>
The properties of the provisioning scheme that are specific to the target hosting infrastructure.
InitialBatchSizeHint <int>
The number of VMs that are expected to be added to the scheme as an initial batch.
ProvisioningSchemeUid <Guid>
The unique identifier of the provisioning scheme being created.
TaskState <Citrix.MachineCreation.Sdk.NewProvisioningSchemeState>
The state of the task. This can be any of the following:
Processing
The task has begun but has not done anything yet.
LocatingResources,
The workflow is locating resources from other services.
HostingUnitNotFound
The task failed because the required hosting unit could not be located.
VirtualMachineBackupNotFound
The task failed because the required VM snapshot or VM template could not be located.
ConsolidatingMasterImage
The task is consolidating the master image.
ReplicatingConsolidatedImageToAllStorage
The task is replicating the consolidated master image.
StoringProvisioningScheme
The task is storing the provisioning scheme data in the database.
Finished
The task completed with no errors.
ProvisioningSchemeAlreadyExists
The task failed because a provisioning scheme with the same name already exists.
IdentityPoolNotFound
The task failed because the specified identity pool could not be found.
MasterVMImageIsNotPartOfProvisioningSchemeHostingUnit,
The task failed because the hosting unit from which the master image originated is not the same hosting unit that the provisioning scheme is using.
MasterVmImageIsNotABackup
The task failed because the master VM path does not refer to a snapshot or VM template item.
ProvisioningSchemeNotFound
The task failed because it could not find a provisioning scheme with the specified name.
TaskAlreadyRunningForProvisioningScheme
The task failed because a task for a provisioning scheme with the same name is already running.
InvalidMasterVMConfiguration
The task failed because the VM snapshot or VM template specified as the master has an invalid configuration.
InvalidMasterVMState
The task failed because the VM snapshot or VM template specified as the master is currently in an invalid state.
InsufficientResources
The task failed because the hypervisor did not have enough resources to complete the task.
DiskConsolidationFailed
The disk consolidation task failed. Details are in the task state information string.
StorageNotFound
The task failed because no associated storage was found in the hosting unit.
ConfigurationError
The task failed because the service is unable to contact one of the other services. This is because not all appropriate Configuration Service registrations have been performed.
RequestedFeatureNotEnabled
The task failed because a requested feature is not enabled.
MachineProfileNotSupported
The task failed because machine profile is not supported.
FailedToReadMachineProfile
Failed to read the Machine Profile.
Canceled
The task was stopped by user intervention (using Stop-ProvTask).
TaskStateInformation <string>
Additional information about the current task state.
TaskProgress <double>
The progress of the task 0-100%.
DiskSize <int>
The disk size (in GB) that will be used to create VMs.
MasterImageNote <string>
The note of the master image.
WriteBackCacheDiskSize <int>
The size of any write-back cache disk (Setting WriteBackCacheDiskSize to 0 is not allowed).
WriteBackCacheMemorySize <int>
The size of the write-back cache (Setting WriteBackCacheMemorySize to 0 is not allowed).
WriteBackCacheDriveLetter <char>
The drive letter of write back cache disk (default empty which means to be allocated by operating system).
Scopes <Citrix.Fma.Sdk.ServiceCoreScopeReference[]>
The delegated administration scopes to which the scheme will belong.
NetworkMaps <Citrix.MachineCreation.Sdk.NetworkMap[]>
The list of NIC to network associations, if specified.
ProvisioningSchemeMetadata <System.Collections.Generic.Dictionary[string, string];>
The metadata to apply to the provisioning scheme, if specified.
ServiceOffering <string>
The service offering that the scheme uses when creating VMs in Cloud Hypervisors.
SecurityGroups <string[]>
The security groups that will be applied to machines created in Cloud Hypervisors.
DedicatedTenancy <bool>
Whether to use dedicated tenancy when creating VMs in Cloud Hypervisors.
ResetAdministratorPasswords <bool>
Whether to reset the passwords for administrator accounts on created machines.
StatusMessageSubstitutions <string[]>
List of strings to be substituted into custom error or status messages from provisioning plug-ins.
GpuTypeId <string>
The id of the GPU type used by this provisioning scheme, null if no GPU.
UseFullDiskCloneProvisioning <bool>
Indicates whether the machines are provisioned using the dedicated full disk clone feature.
Notes
The cmdlet is associated with a task of type NewProvisioningScheme, and while active will move through the following operations (CurrentOperation field):
ValidatingInputs
ConsolidatingMasterImage
PreparingMasterImage
ReplicatingMasterImage
CommittingScheme
Only one long-running task for each provisioning scheme can be processed at a time.
In case of failure, the following errors can result.
Error Codes
JobCreationFailed
The requested task could not be started.
DatabaseError
An error occurred in the service while attempting a database operation.
DatabaseNotConfigured
The operation could not be completed because the database for the service is not configured.
ServiceStatusInvalidDb
An error occurred in the service while attempting a database operation. Communication with the database failed for
for various reasons.
CommunicationError
An error occurred while communicating with the service.
InvalidParameterCombination
Both PurgeJobOnSuccess and RunAsynchronously were specified. When running asynchronously, the cmdlet terminates before the job does, so it cannot clean up the completed job.
PermissionDenied
The user does not have administrative rights to perform this operation.
ConfigurationLoggingError
The operation could not be performed because of a configuration logging error.
ScopeNotFound
One or more of the scopes nominated for the new provisioning scheme do not exist.
ImageVersionNotFound
The specified image version for the new provisioning scheme do not exist.
ImageVersionNotReady
The specified image version for the new provisioning scheme is not ready for use.
WorkflowHostUnavailable
The task could not be started because the database connection is inactive.
ExceptionThrown
An unexpected error occurred. For more details, see the Windows event logs on the controller being used, or Citrix Virtual Apps and Desktops logs.
VhdParametersMustBeSupplied
When parameter VhdTemplateSource or VhdResultDestination is supplied, both parameters are required to be supplied.
ServiceDoesNotSupportFullDiskClone
The full disk clone parameter is being used when the service does not support the full disk clone feature. Upgrade the service or remove the parameter.
FullDiskCloneDoesNotSupportCleanOnBootVMs
The full disk clone functionality is applicable to dedicated provisioned machines only.
CannotUseWriteBackCacheWithCleanOnBootDisabled
Cannot turn on writebackcache on persistent catalog. Do not use -UseWriteBackCache without specifying -CleanOnBoot.