Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Credit to Reddit user piepsodj - https://www.reddit.com/r/msp/comments/125sxuo/comment/je6kugc/
- #This section will kill the 3CXDesktopApp process, if it is currently running....
- if (Get-Process -Name "3CXDesktopApp" -ErrorAction SilentlyContinue) {
- write-host "Found the process running, killing it!"
- Stop-Process -Name "3CXDesktopApp" -Force
- }
- #This section will rename the 3CXDesktopApp.Exe and Update.exe to a different filename, so they won't get run automatically again.
- $ListOfLocations = @(
- "C:\Users\*\AppData\Local\Programs\3CXDesktopApp",
- "C:\Program Files\3CXDesktopApp"
- )
- foreach ($Location in $ListOfLocations){
- $FoundInstances = Get-Item -Path $Location -ErrorAction SilentlyContinue
- foreach ($FoundInstance in $FoundInstances){
- write-host "Found 3CX Desktop folders at '$FoundInstance', Deleting folders..."
- Remove-Item -Path $FoundInstance -Recurse
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement