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
Monday, 12 June 2023 by Marcin
Does this work when a group was created before and then Team created from that group? One of our clients have had SharePoint Team sites created long time ago for the purpose of data sharing which create Office 365 group for each site that they have used for access management. Someone now after some time created a Team from one of those existing groups, because they were the owner of that group. Does your script show the creation date of the team or the group. From the first look it seam that it shows the UnifiedGroup creation date.