Get-User-Html-SPO
SharePoint Online: HTML report of users
#Requires -Version 5.1
#Requires -Modules Microsoft.Online.SharePoint.PowerShell
[CmdletBinding()]
Param(
[Parameter(Mandatory = $true)]
[string]$Site,
[int]$Limit = 500
)
Process {
try {
$cmdArgs = @{ ErrorAction = 'Stop'; Site = $Site; Limit = $Limit }
$result = Get-SPOUser @cmdArgs | Select-Object DisplayName, LoginName, IsSiteAdmin, IsGroup, Groups, UserType | Sort-Object DisplayName
Write-Output ($result | ConvertTo-Html -Fragment)
}
catch { throw }
}URL of the site collection
Maximum number of users to return