Jump to content

Remove Dropbox with PowerShell


kavaa
 Share

Recommended Posts

Here is a script to remove Dropbox with PowerShell.

Be aware that your Dropbox could also be removed.

#Script to remove Dropbox
#This May remove your dropbox folder contents form your computer

#By: Enrique Sanchez

#Dropbox Paths

$Dir = "C:\Users\"

$drop = "\Appdata\Roaming\Dropbox"

$dropM = "\Appdata\Roaming\DropboxMaster"

$DropD = "\Dropbox"

$StartM = "\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Dropbox"

$Short = "\Desktop\Dropbox.lnk"

#Kill related processes

taskkill /im dropbox.exe /f

taskkill /im explorer.exe /f

Get-ChildItem -name c:\users | foreach ($_) {

Remove-Item -recurse -force $Dir$_$dropD -ErrorAction SilentlyContinue

Remove-Item -recurse -force $dir$_$dropM -ErrorAction SilentlyContinue

Remove-Item -recurse -force $dir$_$drop -ErrorAction SilentlyContinue

Remove-Item -recurse -force $dir$_$StartM -ErrorAction SilentlyContinue

Remove-Item -recurse -force $dir$_$Short -ErrorAction SilentlyContinue

}

C:\Windows\explorer.exe

#End

 

Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...