Request a 60-minute free consultation

Retrieve Tenant Setting in SharePoint Online

To retrieve tenant settings in SharePoint Online using PowerShell, you can use the SharePoint Online Management Shell module. Tenant settings include various configurations and properties that affect your SharePoint Online tenant. Here's a PowerShell script to retrieve tenant settings:


# Connect to SharePoint Online
Connect-SPOService -Url "https://yourtenant-admin.sharepoint.com"

# Get tenant settings
$tenantSettings = Get-SPOSite -Identity https://yourtenant.sharepoint.com

# Display tenant settings
$tenantSettings | Format-Table -AutoSize

# Disconnect from SharePoint Online
Disconnect-SPOService

Instructions:

In this script:

  1. Use Connect-SPOService to connect to your SharePoint Online tenant's admin center. Replace "https://yourtenant-admin.sharepoint.com" with the URL of your SharePoint Online admin center.
  2. Use Get-SPOSite to retrieve tenant settings. You can specify the URL of your SharePoint Online tenant site or omit the -Identity parameter to retrieve settings for the entire tenant.
  3. Display the retrieved tenant settings. The Format-Table -AutoSize cmdlet formats the output as a table for better readability. You can modify this part to display specific properties or format the output differently.
  4. Finally, use Disconnect-SPOService to disconnect from SharePoint Online when you're done.

Make sure to replace "https://yourtenant-admin.sharepoint.com" with your actual SharePoint Online admin center URL.

After updating the script with your information, save it as a .ps1 file and run it using PowerShell. This script will retrieve and display various tenant settings for your SharePoint Online environment.

Other solutions

Connect with HarjGroup

Contact Us
Find out how HarjGroup's expertise can help you and your company.