Exchange Online PowerShell: Resolving error – Get-OwaMailboxPolicy: The term ‘Get-OwaMailboxPolicy’ is not recognized as a name of a cmdlet, function, script file, or executable program

Hi All,
Greetings for the day!
Today new issue and resolution 🙂
Details
- I want to see the mail box policies in my tenant
- To get the Outlook web mail box policies I am using Exchange PowerShell – Get-OwaMailboxPolicy
- While executing the “Get-OwaMailboxPolicy” PowerShell CMDLET I am getting an error
Error / Issue
Get-OwaMailboxPolicy: The term ‘Get-OwaMailboxPolicy’ is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Solution
- Make sure “ExchangeOnlineManagement” PowerShell module is installed.
- We can make sure by executing the CMDLET – Get-Module as
PS C:\> Get-Module -Name ExchangeOnlineManagement -ListAvailable
Directory: C:\Users\u1086350\Documents\PowerShell\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Script 3.8.0 ExchangeOnlineManagement Desk {Add-VivaModuleFeaturePolicy, Add-VivaO…

- If “Exchange Online” PowerShell module is not installed, we can install “Exchange Online” PowerShell module by executing “Install-Module” PowerShell CMDLET as
Install-Module -Name ExchangeOnlineManagement -Force
- Once we have successfully installed PowerShell module “ExchangeOnlineManagement“, try importing the module using “Import-Module” PowerShell CMDLET
Import-Module -Name ExchangeOnlineManagement -Force
- As we install and import “Exchange Online” PowerShell module successfully, make sure we are connecting to “Exchange Online” by executing the PowerShell CMDLET – “Connect-ExchangeOnline”
Connect-ExchangeOnline

- After successfully connecting to “Exchange Online“, we are successfully capable of executing the “Get-OwaMailboxPolicy” cmdlet
PS C:\> Get-OwaMailboxPolicy
WacEditingEnabled : True
PrintWithoutDownloadEnabled : True
OneDriveAttachmentsEnabled : True
ThirdPartyFileProvidersEnabled : False
AdditionalStorageProvidersAvailable : True
ClassicAttachmentsEnabled : True
ReferenceAttachmentsEnabled : True
SaveAttachmentsToCloudEnabled : True
InternalSPMySiteHostURL :
ExternalSPMySiteHostURL :
ExternalImageProxyEnabled : True
NpsSurveysEnabled : True
MessagePreviewsDisabled : False
PersonalAccountCalendarsEnabled : True
TeamsnapCalendarsEnabled : True
BookingsMailboxCreationEnabled : True
BookingsMailboxDomain :
ProjectMocaEnabled : False
DirectFileAccessOnPublicComputersEnabled : True
DirectFileAccessOnPrivateComputersEnabled : True
WebReadyDocumentViewingOnPublicComputersEnabled : True
WebReadyDocumentViewingOnPrivateComputersEnabled : True
ForceWebReadyDocumentViewingFirstOnPublicComputers : False
ForceWebReadyDocumentViewingFirstOnPrivateComputers : False
WacViewingOnPublicComputersEnabled : True
WacViewingOnPrivateComputersEnabled : True
ForceWacViewingFirstOnPublicComputers : False
ForceWacViewingFirstOnPrivateComputers : False
ActionForUnknownFileAndMIMETypes : Allow
WebReadyFileTypes : {.xlsx, .pptx, .docx, .xls…}
WebReadyMimeTypes : {application/vnd.openxmlformats-officedocument.presentationml.pr
esentation, application/vnd.openxmlformats-officedocument.wordpr
ocessingml.document, application/vnd.openxmlformats-officedocume
nt.spreadsheetml.sheet, application/vnd.ms-powerpoint…}
WebReadyDocumentViewingForAllSupportedTypes : True
WebReadyDocumentViewingSupportedMimeTypes : {application/msword, application/vnd.ms-excel,
application/x-msexcel, application/vnd.ms-powerpoint…}
WebReadyDocumentViewingSupportedFileTypes : {.doc, .dot, .rtf, .xls…}
AllowedFileTypes : {.rpmsg, .xlsx, .xlsm, .xlsb…}
AllowedMimeTypes : {image/jpeg, image/png, image/gif, image/bmp}
ForceSaveFileTypes : {.vsmacros, .ps2xml, .ps1xml, .mshxml…}
ForceSaveMimeTypes : {Application/x-shockwave-flash, Application/octet-stream,
Application/futuresplash, Application/x-director…}

REFERENCES
- Get-OwaMailboxPolicy – https://learn.microsoft.com/en-us/powershell/module/exchange/get-owamailboxpolicy?view=exchange-ps
- PowerShell – Exploring Module CMDLETs – https://knowledge-junction.in/2022/12/12/__trashed-2/
- PowerShell Modules / CMDLETs – Connecting to Microsoft 365 Services – https://knowledge-junction.in/2025/06/09/powershell-connecting-to-microsoft-365-services/
Thanks for reading!!!
HAVE A FANTASTIC TIME AHEAD !!! LIFE IS BEAUTIFUL 🙂

You must be logged in to post a comment.