Home
Microsoft Team Creation Date script
Office 365 (Teams) Monday, 01 February 2021 by paul

With Teams the Admin center does not currently give any information on when a Team was created. The PowerShell script below will list all the Teams and the date when they were created.

# List All Teams and creation date

Import-Module MSOnline
Import-Module MicrosoftTeams

[string]$username = "[email protected]"
$cred = New-Object System.Management.Automation.PSCredential

# Connect to Exchange powershell
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $session

# Connect to Teams powershell
Connect-MicrosoftTeams 

Write-Host "Getting Teams..."
$Teams = Get-Team

$teamdata = @()

Write-Host "Getting UnifiedGroup data..."
foreach($Team in $Teams)
{
	$TeamUG = Get-UnifiedGroup -Identity $Team.GroupId
	$teamdata += @(
		[pscustomobject]@{
		DisplayName = $Team.DisplayName
		CreationDate = $TeamUG.WhenCreated
		}
	)
}

# display results
$teamdata | sort displayname

 


Add Comment
No Comments.