Where to find the machine token refresh timestamp for Azure Virtual Desktop session hosts?

Mathew 0 Reputation points
2025-01-03T19:29:12.1066667+00:00

We have several AVD Windows 10 session hosts that are currently unassigned but will be eventually (There is a reason they are pre-deployed which can't be avoided). We don't want them to lose their host pool registration in the meantime so I'm working on automating powering them on/off to refresh their machine tokens.

During testing, I want to verify that the VM was up long enough for the machine token to refresh before powering it off again. The final automation will be set up with sufficient time between power-on and power-off based on the tests.

Is there somewhere on the VM or in Azure that I can look for a timestamp of when the machine token was last refreshed?

Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,708 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sai Krishna Katakam 1,725 Reputation points Microsoft External Staff
    2025-01-04T01:22:56.49+00:00

    Hi Mathew,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    To find the machine token refresh timestamp for Azure Virtual Desktop (AVD) session hosts, you can check the Windows Event Logs on the session host VMs. Specifically, the machine token refresh events are logged in the "Microsoft-Azure-Desktop-SessionHost" event log.

    Steps to Check Machine Token Refresh Logs

    • Log in to the Windows 10 session host VM.
    • Open the Event Viewer by typing eventvwr in the Run dialog (Win + R).
    • In the Event Viewer, expand the Applications and Services Logs.
    • Navigate to Microsoft > Windows > Azure-Desktop-SessionHost > Operational.
    • In the Operational log, look for events that indicate the machine token has been refreshed.
    • You can check the timestamps of these events to determine when the last refresh occurred.
    • You can also automate the retrieval of these logs using PowerShell scripts to check for the last refresh timestamp programmatically.

    For more details, please refer to the below documentation:
    Update session hosts using session host update in Azure Virtual Desktop (preview)

    If an answer has been helpful, please consider accept the "Answer" and "Upvote" to help increase visibility of this question for other members of the Microsoft Q&A community. 

    User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.