The term ‘Set-CasMailbox’ is not recognized as the name of a cmdlet, function, script file, or operable program

Hi Everyone this is Prem, I have worked as Microsoft 365 support ambassador. In this blog I will share How to Fix The term ‘Set-CasMailbox’ is not recognized as the name of a cmdlet, function, script file, or operable program error.

 

If your mailbox is on On premise exchange or Exchange online you can get this error if the pre requisites not full filled.

 

If you are getting this error with Exchange on premise setup, you can check if you are on the correct windows server having exchange running.

 

For Onpremise exchange Administrative tasks you will have to use Exchange management shell for the command to work, If you are using Windows PowerShell it might not work.

 

For Exchange Online this error occurs when we run the command in the Windows PowerShell which is not connected to Exchange online.

 

In this blog we will talk about this error in regards to Exchange Online.

 

When running the command you can get this error:The term 'Set-CasMailbox' is not recognized

 

Steps to fix The term ‘Set-CasMailbox’ is not recognized error:

To run this command successfully we will have to open windows PowerShell as Administrator and then connect it to Exchange online using this article.

 

Once you are successfully connected, you should be able to run the Set-CasMailbox command.

 

Below is the syntax of the Set-CasMailbox command:

Set-CASMailbox
[-Identity]
[-ActiveSyncAllowedDeviceIDs ]
[-ActiveSyncBlockedDeviceIDs ]
[-ActiveSyncDebugLogging ]
[-ActiveSyncEnabled ]
[-ActiveSyncMailboxPolicy ]
[-ActiveSyncSuppressReadReceipt ]
[-Confirm]
[-DisplayName ]
[-DomainController ]
[-ECPEnabled ]
[-EmailAddresses ]
[-EwsAllowEntourage ]
[-EwsAllowList ]
[-EwsAllowMacOutlook ]
[-EwsAllowOutlook ]
[-EwsApplicationAccessPolicy ]
[-EwsBlockList ]
[-EwsEnabled ]
[-HasActiveSyncDevicePartnership ]
[-IgnoreDefaultScope]
[-ImapEnabled ]
[-ImapEnableExactRFC822Size ]
[-ImapMessagesRetrievalMimeFormat ]
[-ImapForceICalForCalendarRetrievalOption ]
[-ImapSuppressReadReceipt ]
[-ImapUseProtocolDefaults ]
[-IsOptimizedForAccessibility ]
[-MacOutlookEnabled ]
[-MAPIBlockOutlookExternalConnectivity ]
[-MAPIBlockOutlookNonCachedMode ]
[-MAPIBlockOutlookRpcHttp ]
[-MAPIBlockOutlookVersions ]
[-MAPIEnabled ]
[-MapiHttpEnabled ]
[-Name ]
[-OneWinNativeOutlookEnabled ]
[-OutlookMobileEnabled ]
[-OWAEnabled ]
[-OWAforDevicesEnabled ]
[-OwaMailboxPolicy ]
[-PopEnabled ]
[-PopEnableExactRFC822Size ]
[-PopForceICalForCalendarRetrievalOption ]
[-PopMessagesRetrievalMimeFormat ]
[-PopSuppressReadReceipt ]
[-PopUseProtocolDefaults ]
[-PrimarySmtpAddress ]
[-PublicFolderClientAccess ]
[-ResetAutoBlockedDevices]
[-SamAccountName ]
[-ShowGalAsDefaultView ]
[-SmtpClientAuthenticationDisabled ]
[-UniversalOutlookEnabled ]
[-WhatIf]

 

Example for the above command:

 

Set-CASMailbox admin@theadmin365.com -OWAEnabled $false -PopEnabled $false

This example disables Outlook on the web and POP3 access for the user admin@theadmin365.com

 

To know more about the command Set-CASMailbox, you can refer Microsoft Official article.

 

Do let me know if you have any question.

 

Date:27/05/2023

Author: Prem

Tag: The term ‘Set-CasMailbox’ is not recognized

Leave a Comment

Your email address will not be published. Required fields are marked *