SOLVED

How do i change Properties of teams using powershell?

Brass Contributor

I was setting up a new team for my organisation and I wanted to add a calendar to the team by importing it as a site. For the calendar, i planned on using the Office 365 group calendar but the group didn't pop up in my outlook groups. Here (link to article) I found out that Office groups aren't visible by default when creating a team.

In the article they state that by changing "HiddenFromExchangeClientsEnabled" property, you can make the group appear as a office 365 group.

 

So i did some research on how to use Powershell. I installed the Microsoft Teams module (install-module -name MicrosoftTeams). I then tried to connect to ms teams (connect-microsoftteams) but this gave an error. The error said I need to run 'import-module MicrosoftTeams' but this command didn't give any result when entering.

 

I'm really new to PowerShell and don't know if this is the only and perfect solution to my problem. Anyone who could provide some help?

6 Replies
Spoiler
 

@wo_kn 

 

You can try to run 

Get-Module -ListAvailable

And check if you see the MicrosoftTeams module. 

 

To install the module with 

Install-Module MicrosoftTeams

 make sure you are running the PowerShell as Administrator. 

 

After installing the module 

Import-Module MicrosoftTeams 

will make the command available to you.  

@ShellBlazer  thank you for your (very fast) reply! :)

 

I've checked the list of modules:

wo_kn_0-1594977537865.png

 

I then tried to install the module by using the command provided by you. Funny enough, nothing happened...

wo_kn_1-1594977579464.png

 

I then tried the last command u provided, which also gave an error.

wo_kn_2-1594977682914.png

 

 

@wo_kn 

 

Best check your current execution policy. 

Get-ExecutionPolicy

I'm guessing it is set to restricted. 

You can set the execution policy to be bypassed for your current PowerShell session by running: 

Set-ExecutionPolicy Bypass -Scope Process

 

@ShellBlazer 

Thanks again for your reply!

It took some time for me to figure out but it finally worked. 

I used the bypass you suggested and was able to use the connect command which led me to Office 365 login. I entered my credentials (I'm also an admin on the tenant).

wo_kn_0-1594989597310.png

 

After, I tried to use this command but didn't work unfortunatly:

Set-UnifiedGroup Team name -HiddenFromExchangeClientsEnabled:$false

wo_kn_1-1594989735074.png

 

I'm guessing there's something Powershell needs before I'll be able to use this command as Powershell doesn't recognize this command.

best response confirmed by wo_kn (Brass Contributor)
Solution

@wo_kn 

 

Set-UnifiedGroup is part of the Exchange Module. 

https://docs.microsoft.com/en-us/powershell/module/exchange/set-unifiedgroup?view=exchange-ps 

 

You can install this by running: 

Install-Module -Name ExchangeOnlineManagement

 

Connect by running: 

Connect-ExchangeOnline

 

Be aware that for managing all aspects of Teams you might need 4 PowerShell modules. 

1. AzureAD Module

2. Exchange online module

3. SharePoint module 

4. Teams Module 

@ShellBlazer 

 

Thanks a lot!

I've just done your last 2 commands and I was able to use the command

Set-UnifiedGroup Teamname -HiddenFromExchangeClientsEnabled:$false

Instead of the Teamname I used the group e-mail which I got out of the office admincenter.

 

I was able to enter the command and some moments later, the Office-group was visible in Outlook!

 

Thank you so much for taking time to answer this! :smile:

 

1 best response

Accepted Solutions
best response confirmed by wo_kn (Brass Contributor)
Solution

@wo_kn 

 

Set-UnifiedGroup is part of the Exchange Module. 

https://docs.microsoft.com/en-us/powershell/module/exchange/set-unifiedgroup?view=exchange-ps 

 

You can install this by running: 

Install-Module -Name ExchangeOnlineManagement

 

Connect by running: 

Connect-ExchangeOnline

 

Be aware that for managing all aspects of Teams you might need 4 PowerShell modules. 

1. AzureAD Module

2. Exchange online module

3. SharePoint module 

4. Teams Module 

View solution in original post