Overview
Automate VDI registration using task scheduler using the steps and scripts in this article. Review the entire article before performing these steps.
- Update the script below with the correct Tenant Token:
sc stop halcyonagenttimeout /t 20fltmc unload halcyonarecho "Waiting for services to stop..."timeout /t 10"C:\Program Files\Halcyon\HalcyonAR\agent.exe" --install_token <<<insert Tenant Token>>>timeout /t 30fltmc load halcyonarsc start halcyonagent
- Save the file on C:\Temp and use Update_Token.bat as the file name
- Use the batch script below to create the scheduled task:
IMPORTANT: This step must be performed on the Golden Image as part of deployment preparation.@echo offset TaskName=UpdateHalcyonTokenset ScriptPath=C:\temp\Update_Token.batREM Create the scheduled taskschtasks /create /tn %TaskName% /tr "%ScriptPath%" /sc ONSTART /ru "SYSTEM" /RL HIGHEST /FREM Add self-deletion command to the batch fileecho SCHTASKS /Delete /TN %TaskName% /F >> %ScriptPath%echo Task %TaskName% created successfully.
Comments
0 comments
Please sign in to leave a comment.