Back to script library
Entra / Microsoft 365 · Users & guests

Report white board info

How to use the Whiteboard Admin module to create a report of all whiteboards and their owners in a tenant. The original code.

Connect & set up

Run these once per session. All scopes are read-only unless the script makes changes.

Import-Module WhiteboardAdmin
# Connect to the Microsoft Graph
Connect-MgGraph -TenantId $TenantId -Scope "Directory.Read.All, User.Read.All"

Run it

The main script. Copy it, or download the .ps1 and run it from your console.

param(
[string] $TenantId = ""
)
Import-Module WhiteboardAdmin
# Connect to the Microsoft Graph
Connect-MgGraph -TenantId $TenantId -Scope "Directory.Read.All, User.Read.All"
try {
$dateTime = (Get-Date).toString("dd-MM-yyyy")
$fileName = "WhiteboardReport-" + $dateTime + ".csv"
$outputView = "c:\temp\" + $fileName
# The geography to look for board owners in. Accepted values are: Europe, Australia, or Worldwide (all boards not in australia or europe).
$supportedGeographies = @("Europe", "Australia", "Worldwide")
# Array to hold Whiteboard owners
$WhiteboardOwners = [System.Collections.Generic.List[Object]]::new(); $i=0
foreach ($geography in $supportedGeographies) {
Write-Host "Getting Whiteboard owners for geography: $($geography)..."
$GeographyOwners = Get-WhiteboardOwners -Geography $Geography
foreach ($UserId in $GeographyOwners.items) {
$User = Get-MgUser -UserId $UserId
$i++
$ReportLine = [PSCustomObject][Ordered]@{
DisplayName = $User.DisplayName
UPN = $User.UserPrincipalName
Geography = $Geography
UserId = $UserId
}
$WhiteboardOwners.Add($ReportLine)
} # End ForEach Owner
Write-Host "Total whiteboard owners found so far $($i)"
} # EndForEach Geography
# Array to hold Whiteboard details
$Whiteboards = [System.Collections.Generic.List[Object]]::new()
# Get whiteboards from the Microsoft Whiteboard service by owners
foreach ($Owner in $WhiteboardOwners) {
Write-Host "Getting Whiteboards for owner: $($Owner.UPN) ..."
$whiteboardInfo = Get-Whiteboard -UserId $Owner.UserID
foreach ($whiteboardInstance in $whiteboardInfo) {
$ReportLine = [PSCustomObject][Ordered]@{
User = $Owner.DisplayName
UPN = $Owner.UPN
WhiteboardId = $whiteboardInstance.Id
Title = $whiteboardInstance.Title
IsShared = $whiteboardInstance.IsShared
Created = Get-Date($whiteboardInstance.CreatedTime) -format g
Modified = Get-Date($whiteboardInstance.LastModifiedTime) -format g
Geography = $Owner.Geography
UserId = $Owner.UserId
}
$Whiteboards.Add($ReportLine)
} #End Foreach Whiteboards
Write-Host "Found $($whiteboards.Count) Whiteboards owned by: $($Owner.UPN)"
} # End Foreach Whiteboard owners
Write-Host "Found $($whiteboards.Count) Whiteboards in the tenant."
# Export the results to a CSV file and Out-GridView
$Whiteboards | Export-CSV -Path $outputView -Force -NoTypeInformation
$Whiteboards | Out-GridView
Write-Host "Finished"
}
catch {
Write-Host -f Red "Error:" $_.Exception.Message
}

Parameters

ParameterDefaultNotes
-TenantId""Microsoft Entra tenant ID for app-only Graph authentication.
Attribution