Citrix Virtual Apps and Desktops SDK

Request-ProvVMUpdate

Requests a property update on provisioned virtual machines.

Syntax


Request-ProvVMUpdate -ProvisioningSchemeName <String> [-LoggingId <Guid>] [-BearerToken <String>] [-TraceParent <String>] [-TraceState <String>] [-VirtualSiteId <String>] [-AdminAddress <String>] [<CommonParameters>]

Request-ProvVMUpdate -ProvisioningSchemeName <String> -VMName <String[]> [-LoggingId <Guid>] [-BearerToken <String>] [-TraceParent <String>] [-TraceState <String>] [-VirtualSiteId <String>] [-AdminAddress <String>] [<CommonParameters>]

Request-ProvVMUpdate -ProvisioningSchemeUid <Guid> [-LoggingId <Guid>] [-BearerToken <String>] [-TraceParent <String>] [-TraceState <String>] [-VirtualSiteId <String>] [-AdminAddress <String>] [<CommonParameters>]

Request-ProvVMUpdate -ProvisioningSchemeUid <Guid> -VMName <String[]> [-LoggingId <Guid>] [-BearerToken <String>] [-TraceParent <String>] [-TraceState <String>] [-VirtualSiteId <String>] [-AdminAddress <String>] [<CommonParameters>]

<!--NeedCopy-->

Detailed Description

Provides the ability to synchronize the properties of existing virtual machines with any changes occurred on the provisioning scheme.

This cmdlet updates the ProvisioningSchemeUpdateRequested field on virtual machines to the current time, which indicates that the machines will synchronize to the property updates occurred on the provisioning scheme upon next start.

Parameters

Name Description Required? Pipeline Input Default Value
ProvisioningSchemeName The name of the provisioning scheme. true true (ByValue, ByPropertyName)  
VMName List of VM names requesting for update. If not specified, all VMs in the machine catalog associated with the specified provisioning scheme will request for a property update. true true (ByValue, ByPropertyName)  
ProvisioningSchemeUid The unique identifier of the provisioning scheme. true 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

Citrix.Machinecreation.Sdk.Provisionedvirtualmachine

You can pipe an object containing parameters called ‘VMId’ and ‘ProvisioningSchemeName’ to Request-ProvVMUpdate.

Return Values

Notes

Running Set-ProvScheme to update provisioning scheme properties will only affect future provisioned machines. To request existing VMs in a catalog to be brought up to date upon the next power on, use this cmdlet to request certain or all VMs created from the provisioning scheme associated with the catalog to be updated.

Examples

Example 1


c:\PS> Set-ProvScheme -ProvisioningSchemeName AzuPS -MachineProfile "XDHyp:\HostingUnits\azure-unit\machineprofile.folder\new-template.vm"

c:\PS> Get-ProvScheme | select ProvisioningSchemeName, ProvisioningSchemeVersion

ProvisioningSchemeName   ProvisioningSchemeVersion

-----------------------  --------------------------

AzuPS                                            2

c:\PS> Get-ProvVM | select VMName, ProvisioningSchemeVersion, ProvisioningSchemeUpdateRequested

VMName       ProvisioningSchemeVersion  ProvisioningSchemeUpdateRequested

------       -------------------------  ---------------------------------

azu01                              1

azu02                              1

azu03                              1

azu04                              1

c:\PS> Request-ProvVMUpdate -ProvisioningSchemeName AzuPS

c:\PS> Get-ProvVM | select VMName, ProvisioningSchemeVersion, ProvisioningSchemeUpdateRequested

VMName       ProvisioningSchemeVersion  ProvisioningSchemeUpdateRequested

------       -------------------------  ---------------------------------

azu01                              1                10/13/2021 8:21:36 PM

azu02                              1                10/13/2021 8:21:36 PM

azu03                              1                10/13/2021 8:21:36 PM

azu04                              1                10/13/2021 8:21:36 PM

<!--NeedCopy-->

Description

Change the provisioning scheme’s MachineProfile with Set-ProvScheme, this increments the provisioning scheme version to 2. Request all 4 VMs in the AzuPS catalog to have a property update. No matter the current version of the provisioning scheme, an update will be requested for each machine, and any updates to the provisioning scheme after the update is requested will be applied to the machine next time it boots.

Example 2


c:\PS> Get-ProvVM | select VMName, ProvisioningSchemeVersion, ProvisioningSchemeUpdateRequested

VMName       ProvisioningSchemeVersion  ProvisioningSchemeUpdateRequested

------       -------------------------  ---------------------------------

azu01                              1

azu02                              1

azu03                              1

azu04                              1

c:\PS> Request-ProvVMUpdate -ProvisioningSchemeName AzuPS -VMName azu01,azu02

c:\PS> Get-ProvVM | select VMName, ProvisioningSchemeVersion, ProvisioningSchemeUpdateRequested

VMName       ProvisioningSchemeVersion  ProvisioningSchemeUpdateRequested

------       -------------------------  ---------------------------------

azu01                              1                10/13/2021 8:21:36 PM

azu02                              1                10/13/2021 8:21:36 PM

azu03                              1

azu04                              1

<!--NeedCopy-->

Description

Request azu01 and azu02 in the AzuPS catalog to have a property update. The other machines remain having no property update scheduled.

Request-ProvVMUpdate