Hello, @fareed ahmad !
Why is my VM shutting down in Azure Lab Services after I add Windows features?
A restart will cause your VM to become Stopped, however you should be able to use "Start template" to start your VM again. In the example below I've created a Windows Server 2022 template using a standard marketplace image and added ADFS. I rebooted the VM which left it in the Stopped state. I then started the template and was able to connect without issue.
If you are experiencing something different, it's possible that something went wrong when additional Windows features were added and that will require some troubleshooting.
If you can provide additional information, we'd be happy to help you troubleshoot this.
Click on "Start template" to start the VM again: