KB Issue
Importing certificates into Exchange Server causes an error.
Issue Details
When running the PowerShell command to import a certificate for Exchange Server, you may encounter the following error.
Import-ExchangeCertificate: The term 'Import-ExchangeCertificate' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Recreate Issue
The following PowerShell script results in the error above.
[PowerShell - ]
CFFCS | CarrzSynEdit: | PS (PowerShell)
PS G:\SSL> Import-ExchangeCertificate -FileData ([System.IO.File]::ReadAllBytes('g:\SSL\6-27-2022.pfx'))
-Password (ConvertTo-SecureString -String 'P*ssWoRd' -AsPlainText -Force)

Resolve Issue
The reason the script will not work in PowerShell is by design.
The script will need to be run from the Exchange Server, using the
[Exchange Management Shell],
located in the Start Menu under
[Microsoft Exchange Server V#]
[PowerShell - ]
CFFCS | CarrzSynEdit: | PS (PowerShell)
PS C:\Windows\system32>Import-ExchangeCertificate -FileData ([System.IO.File]::ReadAllBytes('g:\SSL\6-27-2022.pfx'))
-Password (ConvertTo-SecureString -String 'P*ssWoRd' -AsPlainText -Force)