Shut Down and Restart features in UiPath

Can we shut down the machine using UiPath ?
Can we restart the machine using UiPath ?
Can we perform Switch User operation using UiPath?

Hi @Sivasakthi123
You can shutdown and restart if you make a shortcut icon executing shutdown command.

you can do that by using following steps.
1. use start process activity and in executable path type “cmd”.
2. then use a “type into” activity and select cmd command prompt and type “shutdown -s -t 00”. “00” is the time in which shutdown should happen.
3. Similarly, for restarting you can type “shutdown -r -t 00”.


I simply created a .bat file in my bot folder and ran it with a start process activity. It worked like a charm. I guess the benefits of this is it does not depend on the specific location of the cmd.exe that may vary on the target computer and its OS version.

Hi savantsa,
can you send me the .bat script please.
can the system restart at a specific time as well
Any help is appreciated

You can search the PowerShell script to shutdown the system on google.
Refer to this link:

PowerShell Basics: Shutdown Command Stop-Computer | Examples

Once you find the right command, all you have to do is create a text file, paste the script and save it as “.bat” extension. To shutdown the system, you will have to open the .bat file.

Opening the .bat file will perform the script and proceed to shutdown the system.