createtokenExpirationTime.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ARM tokenExpirationTime | |
# The expiration date can be no less than an hour and no more than one month. | |
# If you set tokenExpirationTime outside of that limit, it wont work. | |
# tokenExpirationTime is used to generate token for WVD hostpool | |
# https://docs.microsoft.com/en-us/powershell/module/az.desktopvirtualization/new-azwvdhostpool?view=azps-4.8.0 | |
$ExpirationTime = $((get-date).ToUniversalTime().AddDays(1).ToString('yyyy-MM-ddTHH:mm:ss.fffffffZ')) | |
Write-Host "$("##vso[task.setvariable variable=ExpirationTime]")$($ExpirationTime)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fixed problem with space the old write host had wrong variable with space!
Wrong Write-Host "$("##vso[task.setvariable variable=ExpirationTime]") $($ExpirationTime)"
Correct!
Write-Host "$("##vso[task.setvariable variable=ExpirationTime]")$($ExpirationTime)"