From 257fad18edb487d3a3d65f0df2278063f948ac80 Mon Sep 17 00:00:00 2001 From: dyoder Date: Mon, 5 Apr 2021 20:56:48 -0400 Subject: [PATCH] minor updates --- Fix-ClearOutlookAutoCompleteCache.ps1 | 3 +++ Uninstall-AutodeskDesktopApp.ps1 | 31 ++++++++++++++++++----- rmm/Fix-ClearOutlookAutoCompleteCache.ps1 | 2 ++ 3 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 Fix-ClearOutlookAutoCompleteCache.ps1 create mode 100644 rmm/Fix-ClearOutlookAutoCompleteCache.ps1 diff --git a/Fix-ClearOutlookAutoCompleteCache.ps1 b/Fix-ClearOutlookAutoCompleteCache.ps1 new file mode 100644 index 0000000..29a1281 --- /dev/null +++ b/Fix-ClearOutlookAutoCompleteCache.ps1 @@ -0,0 +1,3 @@ +LogMsg "Clearing Outlook auto complete cache" +Try { Start-Process "outlook.exe" -ArgumentList "/CleanAutoCompleteCache" -ErrorAction Stop } +Catch { LogErr $_.Exception.Message } \ No newline at end of file diff --git a/Uninstall-AutodeskDesktopApp.ps1 b/Uninstall-AutodeskDesktopApp.ps1 index 6f44b07..01872fd 100644 --- a/Uninstall-AutodeskDesktopApp.ps1 +++ b/Uninstall-AutodeskDesktopApp.ps1 @@ -6,21 +6,38 @@ If ( $PATH ) $SVC = Get-Service -Name "AdAppMgrSvc" If ( $SVC.Status -ne "Stopped" ) { - Write-Output "Stopping AdAppMgrSvc service" + LogMsg "Stopping AdAppMgrSvc service" Try { $SVC | Stop-Service -Force } - Catch { Write-Output $_.Exception.Message } + Catch { LogMsg $_.Exception.Message } } - Write-Output "Stopping processes" + LogMsg "Stopping processes" Try { Get-Process | Where { $_.Name -like "AdAppMgr" } | Stop-Process -Force Get-Process | Where { $_.Name -like "AutodeskDesktopApp" } | Stop-Process -Force } - Catch { Write-Output $_.Exception.Message } + Catch { LogMsg $_.Exception.Message } - Write-Output "Uninstalling Autodesk Desktop App" + LogMsg "Uninstalling Autodesk Desktop App" Try { Start-Process -FilePath $PATH -ArgumentList '--mode unattended' -Wait } - Catch { Write-Output $_.Exception.Message } + Catch { LogMsg $_.Exception.Message } + + If ( Test-Path "HKLM:\SOFTWARE\Wow6432Node\Autodesk\Autodesk Application Manager" ) { + LogMsg "Removing: ""HKLM:\SOFTWARE\Wow6432Node\Autodesk\Autodesk Application Manager""" + Remove-Item "HKLM:\SOFTWARE\Wow6432Node\Autodesk\Autodesk Application Manager" -Force -ErrorAction SilentlyContinue + } + If ( Test-Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Autodesk Desktop App" ) { + LogMsg "Removing: ""HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Autodesk Desktop App""" + Remove-Item "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Autodesk Desktop App" -Force -ErrorAction SilentlyContinue + } + If ( Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AdAppMgrSvc.exe" ) { + LogMsg "Removing: ""HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AdAppMgrSvc.exe""" + Remove-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AdAppMgrSvc.exe" -Force -ErrorAction SilentlyContinue + } + If ( Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AutodeskDesktopApp.exe" ) { + LogMsg "Removing: ""HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AutodeskDesktopApp.exe""" + Remove-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AutodeskDesktopApp.exe" -Force -ErrorAction SilentlyContinue + } } -Else { Write-Output "Autodesk Desktop App is not installed" } \ No newline at end of file +Else { LogMsg "Autodesk Desktop App is not installed" } \ No newline at end of file diff --git a/rmm/Fix-ClearOutlookAutoCompleteCache.ps1 b/rmm/Fix-ClearOutlookAutoCompleteCache.ps1 new file mode 100644 index 0000000..cad1f33 --- /dev/null +++ b/rmm/Fix-ClearOutlookAutoCompleteCache.ps1 @@ -0,0 +1,2 @@ +. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1'))) +Run-Script -LivePSScript Fix-ClearOutlookAutoCompleteCache \ No newline at end of file