Tag Archives: Server 2012 R2

Dropbox on Server 2012 R2 closes unexpectedly

The Dropbox app closes unexpectedly (service continues to run) while running on Server 2012 R2.  When the app closes syncing stops and users start complaining.  So I wrote the following script and scheduled it to run every 30 minutes.

FYI… although it installs, Dropbox is not officially supported on Server systems.

https://www.dropbox.com/en/help/3

Script checks to see if the Dropbox process is running, if it is, it simply quits after displaying a message, if it’s not, then it tries starting the Dropbox process and sends an email out if the process gets started successfully.

$Dropbox = Get-Process "Dropbox" -ea SilentlyContinue
if ($Dropbox) {
echo "Dropbox is running!!!"
}
Else {
Start-Process -FilePath "C:\Program Files (x86)\Dropbox\Client\Dropbox.exe"
$Dropbox = Get-Process "Dropbox" -ea SilentlyContinue
if ($Dropbox) {
echo "Dropbox has been started!!!"
Send-MailMessage -to "administrator@domain" -from "email@domain" -subject "Dropbox has been started!!!" -body "The Dropbox process on server SERVER NAME (SERVER IP) wasn't running, a
script has started the Dropbox process." -SmtpServer EMAIL SERVER IP -Port EMAIL SERVER PORT
}
}