Get-ExecutionPolicy Set-ExecutionPolicy Unrestricted Set-ExecutionPolicy Restricted Install powershell 7 from powershell 5 : iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI" foreach ($u in $users) { Write-Host $u.Name -ForegroundColor Green $cal = Get-MailboxFolderStatistics $u.Identity -FolderScope Calendar | Where-Object {$_.Name -in @("Agenda", "Calendar", "Calendrier", "Kalender")} foreach ($c in $cal) { Write-Output $c.Name } }