-
Understanding the Citrix Virtual Apps and Desktops Administration Model
-
-
-
-
-
-
-
-
-
-
-
Set-ProvVMUpdateTimeWindow
-
-
-
-
-
-
This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
Set-ProvVMUpdateTimeWindow
Sets a time window on provisioned virtual machines during which they will undergo a property update on boot.
Syntax
Set-ProvVMUpdateTimeWindow -ProvisioningSchemeName <String> [-StartTimeInUTC <String>] [-StartsNow] [-DurationInMinutes <Int32>] [-LoggingId <Guid>] [-BearerToken <String>] [-AdminClientIP <String>] [-TraceParent <String>] [-TraceState <String>] [-VirtualSiteId <String>] [-AdminAddress <String>] [<CommonParameters>]
Set-ProvVMUpdateTimeWindow -ProvisioningSchemeName <String> -VMName <String[]> [-StartTimeInUTC <String>] [-StartsNow] [-DurationInMinutes <Int32>] [-LoggingId <Guid>] [-BearerToken <String>] [-AdminClientIP <String>] [-TraceParent <String>] [-TraceState <String>] [-VirtualSiteId <String>] [-AdminAddress <String>] [<CommonParameters>]
Set-ProvVMUpdateTimeWindow -ProvisioningSchemeUid <Guid> [-StartTimeInUTC <String>] [-StartsNow] [-DurationInMinutes <Int32>] [-LoggingId <Guid>] [-BearerToken <String>] [-AdminClientIP <String>] [-TraceParent <String>] [-TraceState <String>] [-VirtualSiteId <String>] [-AdminAddress <String>] [<CommonParameters>]
Set-ProvVMUpdateTimeWindow -ProvisioningSchemeUid <Guid> -VMName <String[]> [-StartTimeInUTC <String>] [-StartsNow] [-DurationInMinutes <Int32>] [-LoggingId <Guid>] [-BearerToken <String>] [-AdminClientIP <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 defines a time window where a provisioning scheme update will take place against either specific machines in a catalog or an entire catalog. The update will take place when the machine is next booted within the time window. Note that running this command does not make the machine automatically reboot or turn on sometime within the time window to apply the update. The power action to initiate the update must either be performed as a part of an autoscale schedule or manually through Studio or the New-BrokerHostingPowerAction cmdlet within the time window. If the time window passes before the machine is booted successfully, the update will not apply and will have to be set again with this cmdlet.
On each VM an update window is set, ProvisioningSchemeUpdateRequested defines the start of the time window and ProvisioningSchemeUpdateUntil defines the end of the time window.
Related Commands
Parameters
Name | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|
ProvisioningSchemeName | The name of the provisioning scheme | true | true (ByValue, ByPropertyName) | |
VMName | List of VM names set a time window for. If not specified, all VMs in the machine catalog associated with the specified provisioning scheme will have the time window applied | true | true (ByValue, ByPropertyName) | |
ProvisioningSchemeUid | The unique identifier of the provisioning scheme | true | false | |
StartTimeInUTC | The start time in UTC format of the time window. Mutually exclusive with StartsNow switch. Must be no more than 5 seconds in the past. The given string will be converted into a DateTime using parsing rules defined by the DateTime.Parse method, which allows for a timezone offset to specify time in any timezone. If no timezone offset is specified, UTC will be assumed. See the example usages of Set-ProvVMUpdateTimeWindow or this link for more details https://docs.microsoft.com/en-us/dotnet/api/system.datetime.parse?view=net-6.0#the-string-to-parse | false | false | |
StartsNow | Whether this time window should start right away at the current time. Mutually exclusive with specific StartTimeInUTC. Implied to be set if StartTimeInUTC is not specified | false | false | |
DurationInMinutes | The duration in minutes of the time window. If less than 0, indicates the time window has no upper bound | false | false | 120 minutes |
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 | |
AdminClientIP | Specifies the Client IP of 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 Set-ProvVMUpdateTimeWindow.
Return Values
Examples
Example 1
c:\PS> Set-ProvScheme -ProvisioningSchemeName azure-catalog -MachineProfile "XDHyp:\HostingUnits\azure-unit\machineprofile.folder\new-template.vm"
c:\PS> Get-ProvScheme | select ProvisioningSchemeName, ProvisioningSchemeVersion
ProvisioningSchemeName ProvisioningSchemeVersion
----------------------- --------------------------
azure-catalog 2
c:\PS> Get-ProvVM | select VMName, ProvisioningSchemeVersion, ProvisioningSchemeUpdateRequested, ProvisioningSchemeUpdateUntil
VMName ProvisioningSchemeVersion ProvisioningSchemeUpdateRequested ProvisioningSchemeUpdateUntil
------ ------------------------- --------------------------------- -----------------------------
azu01 1
azu02 1
azu03 1
azu04 1
c:\PS> Set-ProvVMUpdateTimeWindow -ProvisioningSchemeName azure-catalog -StartTimeInUTC "3/12/2022 3am" -DurationInMinutes 60
c:\PS> Get-ProvVM | select VMName, ProvisioningSchemeVersion, ProvisioningSchemeUpdateRequested, ProvisioningSchemeUpdateUntil
VMName ProvisioningSchemeVersion ProvisioningSchemeUpdateRequested ProvisioningSchemeUpdateUntil
------ ------------------------- --------------------------------- -----------------------------
azu01 1 3/11/2022 11:00:00 PM 3/12/2022 12:00:00 AM
azu02 1 3/11/2022 11:00:00 PM 3/12/2022 12:00:00 AM
azu03 1 3/11/2022 11:00:00 PM 3/12/2022 12:00:00 AM
azu04 1 3/11/2022 11:00:00 PM 3/12/2022 12:00:00 AM
c:\PS> Get-Date
Thursday, March 10, 2022 1:53:41 PM
c:\PS> New-BrokerHostingPowerAction -Action "Restart" -MachineName azu01
c:\PS> Get-ProvVM | select VMName, ProvisioningSchemeVersion, ProvisioningSchemeUpdateRequested, ProvisioningSchemeUpdateUntil
VMName ProvisioningSchemeVersion ProvisioningSchemeUpdateRequested ProvisioningSchemeUpdateUntil
------ ------------------------- --------------------------------- -----------------------------
azu01 1 3/11/2022 11:00:00 PM 3/12/2022 12:00:00 AM
azu02 1 3/11/2022 11:00:00 PM 3/12/2022 12:00:00 AM
azu03 1 3/11/2022 11:00:00 PM 3/12/2022 12:00:00 AM
azu04 1 3/11/2022 11:00:00 PM 3/12/2022 12:00:00 AM
c:\PS> Get-Date
Friday, March 11, 2022 11:53:41 PM
c:\PS> New-BrokerHostingPowerAction -Action "Restart" -MachineName azu01
c:\PS> Get-ProvVM | select VMName, ProvisioningSchemeVersion, ProvisioningSchemeUpdateRequested, ProvisioningSchemeUpdateUntil
VMName ProvisioningSchemeVersion ProvisioningSchemeUpdateRequested ProvisioningSchemeUpdateUntil
------ ------------------------- --------------------------------- -----------------------------
azu01 2
azu02 1 3/11/2022 11:00:00 PM 3/12/2022 12:00:00 AM
azu03 1 3/11/2022 11:00:00 PM 3/12/2022 12:00:00 AM
azu04 1 3/11/2022 11:00:00 PM 3/12/2022 12:00:00 AM
<!--NeedCopy-->
Description
Change the MachineProfile for the azure-catalog provisioning scheme with Set-ProvScheme, this increments the provisioning scheme version to 2. Set all 4 VMs in azure-catalog to have a property update in the time window starting 3/12/2022 at 3am UTC and lasting for 60 minutes. Times for ProvisioningSchemeUpdateRequested and ProvisioningSchemeUpdateUntil are displayed in local time (EST in this case). If a catalog machine is booted in that time window, it will update to the latest provisioning scheme settings. The first restart of machine azu01 in this example performs no action since it’s before the time window starts, while the second restart is within the window, so the machine is updated and the time window is cleared.
Example 2
c:\PS> Get-ProvVM | select VMName, ProvisioningSchemeVersion, ProvisioningSchemeUpdateRequested, ProvisioningSchemeUpdateUntil
VMName ProvisioningSchemeVersion ProvisioningSchemeUpdateRequested ProvisioningSchemeUpdateUntil
------ ------------------------- --------------------------------- -----------------------------
azu01 1
azu02 1
azu03 1
azu04 1
c:\PS> $duration = New-TimeSpan -Days 2
c:\PS> Set-ProvVMUpdateTimeWindow -ProvisioningSchemeName azure-catalog -VMName azu01, azu02 -StartTimeInUTC "3/11/2022 11pm -4" -DurationInMinutes $duration.TotalMinutes
c:\PS> Get-ProvVM | select VMName, ProvisioningSchemeVersion, ProvisioningSchemeUpdateRequested, ProvisioningSchemeUpdateUntil
VMName ProvisioningSchemeVersion ProvisioningSchemeUpdateRequested ProvisioningSchemeUpdateUntil
------ ------------------------- --------------------------------- -----------------------------
azu01 1 3/11/2022 11:00:00 PM 3/13/2022 11:00:00 PM
azu02 1 3/11/2022 11:00:00 PM 3/13/2022 11:00:00 PM
azu03 1
azu04 1
<!--NeedCopy-->
Description
Set azu01 and azu02 in azure-catalog to have a property update anytime from 11pm EST (-4) until 2 days later. The other machines remain having no property update time window set. Times for ProvisioningSchemeUpdateRequested and ProvisioningSchemeUpdateUntil are displayed in local time (EST in this case). The update will be run next time each machine boots in that window.
Example 3
c:\PS> Get-ProvVM | select VMName, ProvisioningSchemeVersion, ProvisioningSchemeUpdateRequested, ProvisioningSchemeUpdateUntil
VMName ProvisioningSchemeVersion ProvisioningSchemeUpdateRequested ProvisioningSchemeUpdateUntil
------ ------------------------- --------------------------------- -----------------------------
azu01 1
azu02 1
azu03 1
azu04 1
c:\PS> $startTime = (Get-Date).AddDays(7).ToUniversalTime()
c:\PS> Set-ProvVMUpdateTimeWindow -ProvisioningSchemeName azure-catalog -VMName azu01, azu02 -StartTimeInUTC $startTime -DurationInMinutes -1
c:\PS> Get-ProvVM | select VMName, ProvisioningSchemeVersion, ProvisioningSchemeUpdateRequested, ProvisioningSchemeUpdateUntil
VMName ProvisioningSchemeVersion ProvisioningSchemeUpdateRequested ProvisioningSchemeUpdateUntil
------ ------------------------- --------------------------------- -----------------------------
azu01 1 3/18/2022 11:32:51 PM
azu02 1 3/18/2022 11:32:51 PM
azu03 1
azu04 1
<!--NeedCopy-->
Description
Set azu01 and azu02 in azure-catalog to have a property update anytime after 7 days from now. The other machines remain having no property update time window set. The update will be run next time each machine boots after the start time.
Example 4
c:\PS> Get-ProvVM | select VMName, ProvisioningSchemeVersion, ProvisioningSchemeUpdateRequested, ProvisioningSchemeUpdateUntil
VMName ProvisioningSchemeVersion ProvisioningSchemeUpdateRequested ProvisioningSchemeUpdateUntil
------ ------------------------- --------------------------------- -----------------------------
azu01 1
azu02 1
azu03 1
azu04 1
c:\PS> Set-ProvVMUpdateTimeWindow -ProvisioningSchemeName azure-catalog -VMName azu01, azu02 -StartsNow -DurationInMinutes -1
c:\PS> Get-ProvVM | select VMName, ProvisioningSchemeVersion, ProvisioningSchemeUpdateRequested, ProvisioningSchemeUpdateUntil
VMName ProvisioningSchemeVersion ProvisioningSchemeUpdateRequested ProvisioningSchemeUpdateUntil
------ ------------------------- --------------------------------- -----------------------------
azu01 1 3/11/2022 11:32:51 PM
azu02 1 3/11/2022 11:32:51 PM
azu03 1
azu04 1
<!--NeedCopy-->
Description
Set azu01 and azu02 in azure-catalog to have a property update when next booted. The other machines remain having no property update time window set.
Share
Share
In this article
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Citrix product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.