Skip to main content

Restart a Remote Server Using Command Prompt


Launch command prompt (as administrator) and run the below command. User should have administrator permissions on the server.
   1: SHUTDOWN /r /f /t 0 /m \\Server Name
/r         Shutdown and restart the computer.
/f         Force running applications to close without forewarning users.
/t xxx     Set the time-out period before shutdown to xxx seconds.
           The valid range is 0-600, with a default of 30.

/m \\computer Specify the target computer.
/c "comment" Comment on the reason for the restart or shutdown.
If there aren’t any issues the system will be restarted
   1: C:\Windows\system32>;SHUTDOWN /r /f /t 0 /m \\xyz /c "Hotfix Installation"
Modify the above script parameters appropriately to copy the files successfully!

Comments

Popular posts from this blog

Installing Nagios 4 on Ubuntu 14 04 LTS

AD-Powershell for Active Directory Administrators

http://social.technet.microsoft.com/wiki/contents/articles/5819.ad-powershell-for-active-directory-administrators.aspx Computer object commands List all computer accounts in a domain Get-ADComputer –Filter {Name –Like "*"} View all computers that are logged in for 90 days to the Active Directory Search-ADaccount -AccountInactive -Timespan 90 -ComputersOnly OR $lastLogon = (get-date).adddays(-90).ToFileTime() Get-ADComputer -filter {lastLogonTimestamp -gt $lastLogon}  Find and delete all disabled Computer accounts in Active Directory Search-ADAccount -AccountDisabled -ComputersOnly | Sort-Object | Remove-ADComputer Find and delete disabled computer accounts from a specific OU Search-ADAccount -AccountDisabled -Searchbase "OU=IT,DC=Contoso,DC=Com" -ComputersOnly | Sort-Object | Remove-ADComputer Find and delete all computer accounts that no longer have signed up since 11/20/2011 to the Active Directory Search-ADAccount -AccountInactive -DateTime "20.11.2011...