Skip to content

Get-Tenant-Html

SharePoint Online: HTML report of organization properties

#Requires -Version 5.1
#Requires -Modules Microsoft.Online.SharePoint.PowerShell

[CmdletBinding()]
Param(
    [ValidateSet('*','AllowEditing','PublicCdnAllowedFileTypes','ExternalServicesEnabled','StorageQuotaAllocated','ResourceQuotaAllocated','OneDriveStorageQuota')]
    [string[]]$Properties = @('AllowEditing','PublicCdnAllowedFileTypes','ExternalServicesEnabled','StorageQuotaAllocated','ResourceQuotaAllocated','OneDriveStorageQuota')
)

Process {
    try {
        if ($Properties -contains '*') { $Properties = @('*') }
        $result = Get-SPOTenant -ErrorAction Stop | Select-Object $Properties
        Write-Output ($result | ConvertTo-Html -Fragment)
    }
    catch { throw }
}

List of properties to return; use * for all properties

An interactive directory of PowerShell scripts.