Get-Resources
Exchange Online: Lists all resource mailboxes
#Requires -Version 5.1
[CmdletBinding()]
Param()
Process {
try {
$res = Get-Mailbox -SortBy DisplayName -ErrorAction Stop | Select-Object * | Where-Object -Property IsResource -EQ $true
if ($null -eq $res -or $res.Count -eq 0) {
Write-Output "No resources found"
return
}
foreach ($item in $res) {
$item | Add-Member -NotePropertyName Timestamp -NotePropertyValue (Get-Date -Format "yyyy-MM-dd HH:mm:ss") -PassThru -Force
}
}
catch { throw }
}This script has no configurable parameters.