Configuring Check spelling before sending a message in Outlook - mattnovitsch/M365 GitHub Wiki

Summary

I had a customer ask about configuring Outlook for all their users to always spell check their emails before sending a message. I have written a script that will do this.

  • Note: The script is written for Office 365 current branch if you are using an older version of Office then you will need to change the script version number from 16.0 to whatever version you are using.

image

Prerequisites

Steps:

  1. Navigate to Microsoft Endpoint Manager
  2. Navigate to Reports > Endpoint Analytics
  • Note: You can do this via scripts also but since we are trying to force this change in an organization having it run more than once is best handled in Endpoint Analytics image
  1. Click on Proactive Remediations and then Create script package image
  2. Provide the package with a name. I'm using "Check spelling before sending a message in Outlook". Click Next once you have established a name. image
  3. Upload the script that was download earlier as a prerequisite and make sure to change "Run this script using the logged-on credentials", this is important as the registry keys changed by the PowerShell are in HKeyCurrentUser. <BR? image
  4. Assign Tag accordingly image
  5. Assign to the correct group or all devices.
  • Note: If you click Daily you can modify the run time from daily, hourly, or once. image
  1. Click Create after you review the configuration. image

Script deep dive

The $registryPath is the part I mentioned before about the different office versions. As you can see I am using the value of 16.0 so that is clearly 2016 or later. The script will check if the value of spell checker is enabled, if its not enabled the script will change it. If the script determines its also set to enabled then it just terminates. #Define variables for the path, key, and value $registryPath = "HKCU:\Software\Microsoft\Office\16.0\Outlook\Options\Spelling" $Name = "check" $value = "1" #check the path and key to see if its enabled or not. #0 = disabled #1 = enabled If((Get-ItemProperty -Path HKCU:\Software\Microsoft\Office\16.0\Outlook\Options\Spelling\).check -eq 0) { New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType DWORD -Force | Out-Null }