title: Zoom Registry Key Cleaner PowerShell Script
body: <p>We have a SCCM environment so we have setup ZoomInstallerFull.msi to be silently deployed to 4000+ workstations. this deployment is a Machine based installation therefore it's registry keys going to be under HKEY LOCAL MACHINE. so we can remove those without any issues.</p>
  <p>Problem comes from where the user going to install Zoom (without UAT prompt) it's going to store under their user profile</p>
  <p>Eg:- HKEY_USERS\S-1-5-21-1957844674-164910922-1384523041-953926\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ZoomUMX</p>
  <p>This is bit tricky to remove because the SID is different from user to user. to overcome this issue we wrote a script as below</p>
  <pre><code>#Get the SID of logged in User
  $LoggedinUserSID=Get-WmiObject win32_useraccount | ? {$_.Name -eq $env:USERNAME} | Select-Object -ExpandProperty SID
  
  try {
      #Check if the registy key for zoom exists in HKEYUSERS\SID\Software
      $ZoomRegKey=Get-Item &quot;Registry::HKEY_USERS\$($LoggedinUserSID)\Software\ZoomUMX&quot; -ErrorAction Stop
      #Write the Message to console, if reg Key found
      Write-Host -f Cyan &quot;Found the users Registry Key for Zoom. Deleting..&quot;
  
      #Try Deleting the Registry Key
      $ZoomRegKey | Remove-Item -Recurse -Force -ErrorAction Stop
  
      #write messahe to console, if deletion completed
      Write-Host -f Green &quot;Deleted the reg key successfully.&quot;
      Read-Host &quot;Press Enter to Exit&quot;
  }
  catch {
      #In case any error occured, log the error
      Write-Host -f Red &quot;An Error Occured : $($_.Exception.Message)&quot;
  }
  </code></pre>
  <p>But this seems doesn't work, can someone please suggest a better version of this ?</p>