I’m still learning the basics of Powershell and its associated modules. I’ve been tasked with archiving Teams that have not been used. Using the Microsoft teams module is it possible to Set-TeamArchivedState by Group ID using more than just one Group ID in a single command?
The type <String> tells you that the parameter -GroupID expects one string at a time. If you could provide more than one at a time it would be <String[]>
Here you can read more about the help system of PowerShell
You don’t have to use a loop, GroupId also accepts pipeline input
-GroupId
GroupId of the team
Type: String
Position: Named
Default value: None
Accept pipeline input: True
Accept wildcard characters: False
Agree with Olaf, you should learn the basics of powershell including how to use the help system. If you’re familiar with Linux, it’s similar to man pages. Tons of info right at your fingertips.