Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# 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
$ExpirationTime = $((get-date).ToUniversalTime().AddDays(1).ToString('yyyy-MM-ddTHH:mm:ss.fffffffZ'))
Write-Host "$("##vso[task.setvariable variable=ExpirationTime]")$($ExpirationTime)"
Copy link

fixed problem with space the old write host had wrong variable with space!
Wrong Write-Host "$("##vso[task.setvariable variable=ExpirationTime]") $($ExpirationTime)"

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