Forum Discussion
Started a few days ago at most: Agent on Session host no longer communicates properly with WVD
- Aug 15, 2019
ClearForward Thanks for reporting the issue. This is service side issue and we have fixed it few minutes back. Can you please verify if it working now. We would like to further investigate if that's not the case. Thanks.
- GuyPaddockAug 15, 2019Brass Contributor
One other power user tip: I found a Powershell cmdlet that makes it really easy to monitor the status of the session hosts so you can see the scheduled task in action.
You can get the cmdlet here:
http://wragg.io/watch-for-changes-with-powershell/You can run it to monitor session hosts this way:
{ Get-RdsSessionHost -TenantName "TENANT" -HostPoolName "HOST POOL" } | Watch-Command -Verbose -Continuous
If any values like status, heartbeat time, session count, etc change, it prints the output.
- GuyPaddockAug 15, 2019Brass Contributor
iconicmlee Sure!
I believe you will need to configure the task to run with highest privs under an admin account, since it needs to be able to stop and start system services:
<?xml version="1.0" encoding="UTF-16"?> <Task version="1.2" xmlns="<a href="http://schemas.microsoft.com/windows/2004/02/mit/task" target="_blank">http://schemas.microsoft.com/windows/2004/02/mit/task</a>"> <RegistrationInfo> <Date>2019-08-14T17:06:39.646478</Date> <Author>CLOUD\guy</Author> <URI>\ITSA-46 Workaround</URI> </RegistrationInfo> <Triggers> <BootTrigger> <Repetition> <Interval>PT1M</Interval> <StopAtDurationEnd>false</StopAtDurationEnd> </Repetition> <Enabled>true</Enabled> </BootTrigger> </Triggers> <Principals> <Principal id="Author"> <UserId>S-1-5-21-2615066866-973913876-715106564-1108</UserId> <LogonType>Password</LogonType> <RunLevel>HighestAvailable</RunLevel> </Principal> </Principals> <Settings> <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy> <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries> <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries> <AllowHardTerminate>true</AllowHardTerminate> <StartWhenAvailable>false</StartWhenAvailable> <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable> <IdleSettings> <StopOnIdleEnd>true</StopOnIdleEnd> <RestartOnIdle>false</RestartOnIdle> </IdleSettings> <AllowStartOnDemand>true</AllowStartOnDemand> <Enabled>true</Enabled> <Hidden>false</Hidden> <RunOnlyIfIdle>false</RunOnlyIfIdle> <WakeToRun>false</WakeToRun> <ExecutionTimeLimit>PT72H</ExecutionTimeLimit> <Priority>7</Priority> </Settings> <Actions Context="Author"> <Exec> <Command>NET</Command> <Arguments>STOP RdAgentBootloader</Arguments> </Exec> <Exec> <Command>NET</Command> <Arguments>START RdAgentBootloader</Arguments> </Exec> </Actions> </Task>
- GuyPaddockAug 15, 2019Brass ContributorAlso: once the task is created, you have to restart the VM to kick it off. Just running the task manually doesn't cause it to recur. It also seems like editing the task causes it to stop running until the next reboot.