{"id":8273,"date":"2024-09-02T09:41:14","date_gmt":"2024-09-02T09:41:14","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=8273"},"modified":"2024-09-02T09:43:17","modified_gmt":"2024-09-02T09:43:17","slug":"intune-proactive-remediation-to-uninstall-user-version-of-grammarly","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/intune-proactive-remediation-to-uninstall-user-version-of-grammarly","title":{"rendered":"Intune Proactive Remediation to Uninstall User version of Grammarly"},"content":{"rendered":"\n<p>When you run Uninstall.exe \/S as system for Grammarly Nothing happens you have to run this as the user<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">&lt;#\n.DESCRIPTION\n    Proactive Remediation | Detection\n.EXAMPLE\n    PowerShell.exe -ExecutionPolicy ByPass -File &lt;ScriptName>.ps1\n.NOTES\n    VERSION     AUTHOR              CHANGE\n    1.0         Jonathan Conway     Initial script creation\n#>\n \n# Discovery\ntry {\n    # Run Test and store as variable\n    $Test = Get-ChildItem -Path \"$env:LOCALAPPDATA\\Grammarly\\DesktopIntegrations\\\" -Filter \"Grammarly.Desktop.exe\" -Recurse -Force -ErrorAction SilentlyContinue\n \n    # Check where test is compliant or not - if no instances of Zoom are discovered then mark as 'Compliant' and exit with 0\n    if ($null -eq $Test) {\n        Write-Output \"Compliant\"\n        exit 0\n    }\n    # If instances of Zoom are discovered then mark as 'Non Compliant' and exit with 1\n    else {\n        Write-Warning \"Non Compliant\"\n        exit 1\n    }\n}\n \ncatch {\n    # If any errors occur then return 'Non Compliant'\n    Write-Warning \"Non Compliant\"\n    exit 1\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">&lt;#\nThis script will attempt to uninstall Grammarly user installs.\n\n    Proactive Remediation | Remmediation \n\nUser uninstall scripts based on https:\/\/social.technet.microsoft.com\/Forums\/en-US\/9fb747b2-0084-4ed1-98a1-ecc9b0d05684\/uninstall-mozilla-firefox-from-environment\n#>\n\n\n# Kill running processes\ntaskkill.exe \/F \/IM \"Grammarly.Desktop.exe\"\n\n# Canva - uninstall user installs\nGet-ChildItem -Path \"$env:LOCALAPPDATA\\Grammarly\\DesktopIntegrations\" Grammarly.Desktop.exe -Recurse -Force -ErrorAction SilentlyContinue | ForEach-Object {\n    $SetupPath = $_.directory.tostring() + \"\\Uninstall.exe\"\n    $Arguments = \" \/S\"\n    $UserUninstall = Start-Process $SetupPath -ArgumentList $Arguments -PassThru -Wait -ErrorAction SilentlyContinue\n    $UserUninstall.WaitForExit()\n}\n<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you run Uninstall.exe \/S as system for Grammarly Nothing happens you have to run this as the user<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8273","post","type-post","status-publish","format-standard","hentry","category-research"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/8273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=8273"}],"version-history":[{"count":2,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/8273\/revisions"}],"predecessor-version":[{"id":8275,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/8273\/revisions\/8275"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=8273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=8273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=8273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}