Microsoft 365: PowerShell – How to retrieve tenant settings

Hi All,
Greetings for the day!!!
Today, I’m sharing a short PowerShell script that retrieves all tenant settings.
Details
- Background / Usecase / Scenario
- I need to update one of the my tenant setting – “LegacyAuthProtocolsEnabled“
- Before updating the respective tenant setting, I want to see the current value for the setting – “LegacyAuthProtocolsEnabled“
- We have SharePoint Online PowerShell module CMDLET – “Get-SPOTenant” which returns all the tenant settings.
- To use “Get-SPOTenant” CMDLET we need to connect to Microsoft 365 tenant
- We will connect to our Microsoft 365 tenant using “Connect-SPOService” PowerShell CMDLET
- Import the SharePoint Online PowerShell module – Microsoft.Online.SharePoint.PowerShell using Import-Module PowerShell CMDLET
- Using Get-Module we will get the path of – SharePoint Online PowerShell module – Microsoft.Online.SharePoint.PowerShell
PS C:\> Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable
Directory: C:\Users\Documents\PowerShell\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Binary 16.0.2612… Microsoft.Online.SharePoint.PowerS… Desk
- As we get the path for SharePoint Online PowerShell module – Microsoft.Online.SharePoint.PowerShell, we are ready to import the module
PS C:\> Import-Module -Name C:\Users\Documents\PowerShell\Modules\Microsoft.Online.SharePoint.PowerShell -UseWindowsPowerShell
WARNING: The names of some imported commands from the module 'Microsoft.Online.SharePoint.PowerShell' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.
WARNING: The names of some imported commands from the module 'Microsoft.Online.SharePoint.PowerShell' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.
WARNING: The names of some imported commands from the module 'Microsoft.Online.SharePoint.PowerShell' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.
WARNING: Module Microsoft.Online.SharePoint.PowerShell is loaded in Windows PowerShell using WinPSCompatSession remoting session; please note that all input and output of commands from this module will be deserialized objects. If you want to load this module into PowerShell please use 'Import-Module -SkipEditionCheck' syntax.
We have detailed articles on PowerShell module.
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/
- As we successfully import the module, we are ready to connect to Microsoft 365 tenant using “Connect-SPOService“
PS C:\> Connect-sPOService -Url https://knowledgejunction1-admin.sharepoint.com/ -Credential $cred

- As we successfully connected to Microsoft 365 tenant, we are ready to fetch all tenant settings using “Get-SPOTenant“
PS C:> Get-SPOTenant
RunspaceId : 6f32d8eb-3387-484b-8912-7b344174b765
StorageQuota : 1304576
BonusStorageQuotaMB : 0
StorageQuotaAllocated : 0
ResourceQuota : 0
ResourceQuotaAllocated : 0
OneDriveStorageQuota : 1048576
CompatibilityRange : 15,15
ExternalServicesEnabled : True
NoAccessRedirectUrl :
ArchiveRedirectUrl :
SharingCapability : ExternalUserAndGuestSharing
DisplayStartASiteOption : True
StartASiteFormUrl : https://knowledgejunction1.sharepoint.com/SitePages/
Test-PowerApps.aspx
ShowEveryoneClaim : False
ShowAllUsersClaim : False
OfficeClientADALDisabled : False
LegacyAuthProtocolsEnabled : True
DisableCustomAppAuthentication : False
IsSharePointAddInsDisabled : False
IsSharePointAddInsBlocked : False
DisableSharePointStoreAccess : False
SiteOwnerManageLegacyServicePrincipalEnabled : False
ShowEveryoneExceptExternalUsersClaim : True
AllowEveryoneExceptExternalUsersClaimInPrivateSite : True
SearchResolveExactEmailOrUPN : False
ProvisionSharedWithEveryoneFolder : False

REFERENCES
- PowerShell Modules / CMDLETs – Connecting to Microsoft 365 Services – https://knowledge-junction.in/2025/06/09/powershell-connecting-to-microsoft-365-services/
- PowerShell – Exploring Module CMDLETs – https://knowledge-junction.in/2022/12/12/__trashed-2/
Thanks for reading!!!
HAVE A FANTASTIC TIME AHEAD !!! LIFE IS BEAUTIFUL 🙂

1 Response
[…] We have detailed article to get the Microsoft 365 tenant setting. Microsoft 365: PowerShell – How to retrieve tenant settings – https://microsoft365junction.com/2025/06/22/m365-powershell-retrieve-tenant-settings/ […]