How to Restart Computer with PowerShell?

0 votes

Hi Guys,

I have launched an EC2 instance for Windows. I am trying to connect it using python script so that I can turn off the Windows system using PowerShell. How can I do that?

Oct 7 in Others by akhtar
• 33,470 points
87 views

1 answer to this question.

0 votes

Hi@akhtar,

You can use the Restart-Computer command in your PowerShell. But first, your instance should be in running state. You can see the below command.

$ Restart-Computer -ComputerName "Server01" -Wait -For PowerShell -Timeout 600 -Delay 2
answered Oct 7 by MD
• 79,390 points

Related Questions In Others

0 votes
1 answer

How to communicate gRPC example working with Node.js?

hi.. you can read below link, it ...READ MORE

answered Dec 2, 2019 in Others by Narendra Reddy Dalli
1,042 views
0 votes
1 answer
+1 vote
0 answers

How to split a number with coma betweeen two colunms

Jul 3, 2019 in Others by anonymous
70 views
0 votes
1 answer
0 votes
1 answer

How to restart docker for windows using Powershell?

Try this: $processes = Get-Process "*docker for windows*" if ...READ MORE

answered Oct 23, 2018 in DevOps & Agile by Tyrion anex
• 8,560 points
1,849 views
+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer

how to install Amazon AWS Command Line Interface tools on Bamboo build agent.

Hi@Abhishek, You need to set the following parameters ...READ MORE

answered Apr 6 in Others by MD
• 79,390 points
235 views
0 votes
1 answer

How to install Flutter in Windows system?

Hi@akhtar, You can follow the below-given steps to ...READ MORE

answered Jul 17 in Others by MD
• 79,390 points
189 views