# Powershell Teams Module

**URL:** <https://forums.powershell.org/t/powershell-teams-module/22319>\
**Category:** PowerShell Help\
**Created:** [May 18, 2023, 1:35pm UTC](https://forums.powershell.org/t/powershell-teams-module/22319 "2023-05-18T13:35:47Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Will](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@Will](https://forums.powershell.org/u/Will)\
**Post date:** [May 18, 2023, 1:35pm UTC](https://forums.powershell.org/t/powershell-teams-module/22319/1 "2023-05-18T13:35:47Z")

</div>

Hello and Good Day-

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?

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [May 18, 2023, 1:49pm UTC](https://forums.powershell.org/t/powershell-teams-module/22319/2 "2023-05-18T13:49:30Z")

</div>

> [@Will](#):
>
> I’m still learning the basics of Powershell and its associated modules.

One of the first things you should learn is how to read the help.

> [@Will](#):
>
> is it possible to Set-TeamArchivedState by Group ID using more than just one Group ID in a single command?

```auto
Set-TeamArchivedState
   -GroupId <String>
   -Archived <Boolean>
   [-SetSpoSiteReadOnlyForMembers <Boolean>]
   [<CommonParameters>]

```

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

> **[The Help System - PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/learn/ps101/02-help-system?view=powershell-7.3)**
>
> Mastering the help system is the key to being successful with PowerShell.

---

<div class="post-metadata">

**Author:** ![Will](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@Will](https://forums.powershell.org/u/Will)\
**Post date:** [May 18, 2023, 1:56pm UTC](https://forums.powershell.org/t/powershell-teams-module/22319/3 "2023-05-18T13:56:45Z")

</div>

Yeah I thought so. I wasn’t sure if there was a way around that. Thanks for the input. 🙂

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [May 18, 2023, 2:05pm UTC](https://forums.powershell.org/t/powershell-teams-module/22319/4 "2023-05-18T14:05:03Z")

</div>

> [@Will](#):
>
> I wasn’t sure if there was a way around that.

There is a way around. You have to use a loop. 🤷🏼‍♂️ 😉

---

<div class="post-metadata">

**Author:** ![Will](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@Will](https://forums.powershell.org/u/Will)\
**Post date:** [May 18, 2023, 2:10pm UTC](https://forums.powershell.org/t/powershell-teams-module/22319/5 "2023-05-18T14:10:10Z")

</div>

Thanks. Whatever that means LOL

---

<div class="post-metadata">

**Author:** ![KevinGagel](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kevingagel/32/5982_2.png) [@KevinGagel](https://forums.powershell.org/u/KevinGagel)\
**Post date:** [May 18, 2023, 3:33pm UTC](https://forums.powershell.org/t/powershell-teams-module/22319/6 "2023-05-18T15:33:44Z")

</div>

Here’s the link to Foreach-Object which is what you’d use in a loop.  
[ForEach-Object (Microsoft.PowerShell.Core) - PowerShell | Microsoft Learn](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/foreach-object?view=powershell-5.1)

---

<div class="post-metadata">

**Author:** ![Will](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@Will](https://forums.powershell.org/u/Will)\
**Post date:** [May 18, 2023, 3:52pm UTC](https://forums.powershell.org/t/powershell-teams-module/22319/7 "2023-05-18T15:52:39Z")

</div>

Thank so much Kevin!! Can you tell that I’m really green here? LOL

---

<div class="post-metadata">

**Author:** ![krzydoug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/krzydoug/32/1008_2.png) [@krzydoug](https://forums.powershell.org/u/krzydoug)\
**Post date:** [May 18, 2023, 4:54pm UTC](https://forums.powershell.org/t/powershell-teams-module/22319/8 "2023-05-18T16:54:57Z")

</div>

You don’t have to use a loop, GroupId also accepts pipeline input

```auto
-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.

---

<div class="post-metadata">

**Author:** ![Will](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@Will](https://forums.powershell.org/u/Will)\
**Post date:** [May 18, 2023, 5:12pm UTC](https://forums.powershell.org/t/powershell-teams-module/22319/9 "2023-05-18T17:12:02Z")

</div>

Yep. I am learning the basics. I’ve been watching a 6 hour course headed by Jeffery Snover. It has helped a lot.

---

<div class="post-metadata">

**Author:** ![krzydoug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/krzydoug/32/1008_2.png) [@krzydoug](https://forums.powershell.org/u/krzydoug)\
**Post date:** [May 18, 2023, 6:44pm UTC](https://forums.powershell.org/t/powershell-teams-module/22319/10 "2023-05-18T18:44:42Z")

</div>

I find when watching Snover or Jason Helmick it’s best to do 1.5 to 2.0 speed. 🙂

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:14pm UTC](https://forums.powershell.org/t/powershell-teams-module/22319/11 "2024-05-16T20:14:56Z")

</div>


