Share via

Scheduling VM startup

Aniruddh Padmanaban 21 Reputation points
2021-05-18T13:34:27.003+00:00

Hello!

I have been trying to get my azure vm to turn on at a specific time everyday. I used "Start/Stop vm during off hours" and that worked fine but I don't just need the vm to have a "running" status but almost need it to "Switch on" or "Automatically log in to vm". Does anyone have a solution out there? thanks :)

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

Answer accepted by question author

Pranathi Panyam_MSFT 1,071 Reputation points Microsoft Employee Moderator
2021-05-19T10:39:07.883+00:00

@Aniruddh Padmanaban Thanks for posting your query here!

If you want to automate the login process, you can save the below script with the extension.ps1 and run it in PowerShell.

echo "Connecting to your VM's public IP"
$Server="your VM's public IP"
$User="VM's username"
$Password="VM's password"
cmdkey /generic:TERMSRV/$Server /user:$User /pass:$Password
mstsc /v:$Server

Kindly let us know if the above helps or you need further assistance on this issue.

---------------------------------------------------------------------------------------------------------------------------------------------------

Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

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