SOLVED

How do i change Properties of teams using powershell?

%3CLINGO-SUB%20id%3D%22lingo-sub-1528565%22%20slang%3D%22en-US%22%3EHow%20do%20i%20change%20Properties%20of%20teams%20using%20powershell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1528565%22%20slang%3D%22en-US%22%3E%3CP%3EI%20was%20setting%20up%20a%20new%20team%20for%20my%20organisation%20and%20I%20wanted%20to%20add%20a%20calendar%20to%20the%20team%20by%20importing%20it%20as%20a%20site.%20For%20the%20calendar%2C%20i%20planned%20on%20using%20the%20Office%20365%20group%20calendar%20but%20the%20group%20didn't%20pop%20up%20in%20my%20outlook%20groups.%20Here%20(%3CA%20href%3D%22https%3A%2F%2Fwww.synigopulse.com%2Fblog%2Fitem%2Foffice-365-groups-created-from-microsoft-teams-will-be-hidden-from-outlook-by-default%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Elink%20to%20article%3C%2FA%3E)%20I%20found%20out%20that%20Office%20groups%20aren't%20visible%20by%20default%20when%20creating%20a%20team.%3C%2FP%3E%3CP%3EIn%20the%20article%20they%20state%20that%20by%20changing%20%22%3CSPAN%3EHiddenFromExchangeClientsEnabled%22%20property%2C%20you%20can%20make%20the%20group%20appear%20as%20a%20office%20365%20group.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ESo%20i%20did%20some%20research%20on%20how%20to%20use%20Powershell.%20I%20installed%20the%20Microsoft%20Teams%20module%20(install-module%20-name%20MicrosoftTeams).%20I%20then%20tried%20to%20connect%20to%20ms%20teams%20(connect-microsoftteams)%20but%20this%20gave%20an%20error.%20The%20error%20said%20I%20need%20to%20run%20'import-module%20MicrosoftTeams'%20but%20this%20command%20didn't%20give%20any%20result%20when%20entering.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI'm%20really%20new%20to%20PowerShell%20and%20don't%20know%20if%20this%20is%20the%20only%20and%20perfect%20solution%20to%20my%20problem.%20Anyone%20who%20could%20provide%20some%20help%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1528565%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdministrator%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ECommunity%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1528586%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20i%20change%20Properties%20of%20teams%20using%20powershell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1528586%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22lia-spoiler-container%22%3E-ERR%3AREF-NOT-FOUND-Spoiler%3CNOSCRIPT%3E(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%26nbsp%3B%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F567359%22%20target%3D%22_blank%22%3E%40wo_kn%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20try%20to%20run%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EGet-Module%20-ListAvailable%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EAnd%20check%20if%20you%20see%20the%20MicrosoftTeams%20module.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20install%20the%20module%20with%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EInstall-Module%20MicrosoftTeams%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3Bmake%20sure%20you%20are%20running%20the%20PowerShell%20as%20Administrator.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20installing%20the%20module%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EImport-Module%20MicrosoftTeams%20%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Ewill%20make%20the%20command%20available%20to%20you.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1528664%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20i%20change%20Properties%20of%20teams%20using%20powershell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1528664%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F463705%22%20target%3D%22_blank%22%3E%40ShellBlazer%3C%2FA%3E%26nbsp%3B%20thank%20you%20for%20your%20(very%20fast)%20reply!%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20checked%20the%20list%20of%20modules%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22wo_kn_0-1594977537865.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F206012i61B6B067A32D3500%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22wo_kn_0-1594977537865.png%22%20alt%3D%22wo_kn_0-1594977537865.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20then%20tried%20to%20install%20the%20module%20by%20using%20the%20command%20provided%20by%20you.%20Funny%20enough%2C%20nothing%20happened...%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22wo_kn_1-1594977579464.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F206013iFE5C6A420F3CBE7F%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22wo_kn_1-1594977579464.png%22%20alt%3D%22wo_kn_1-1594977579464.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20then%20tried%20the%20last%20command%20u%20provided%2C%20which%20also%20gave%20an%20error.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22wo_kn_2-1594977682914.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F206014i725F94C081F6D491%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22wo_kn_2-1594977682914.png%22%20alt%3D%22wo_kn_2-1594977682914.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1528735%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20i%20change%20Properties%20of%20teams%20using%20powershell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1528735%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F567359%22%20target%3D%22_blank%22%3E%40wo_kn%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20check%20your%20current%20execution%20policy.%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EGet-ExecutionPolicy%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EI'm%20guessing%20it%20is%20set%20to%20restricted.%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20set%20the%20execution%20policy%20to%20be%20bypassed%20for%20your%20current%20PowerShell%20session%20by%20running%3A%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3ESet-ExecutionPolicy%20Bypass%20-Scope%20Process%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1529013%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20i%20change%20Properties%20of%20teams%20using%20powershell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1529013%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F463705%22%20target%3D%22_blank%22%3E%40ShellBlazer%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%20for%20your%20reply!%3C%2FP%3E%3CP%3EIt%20took%20some%20time%20for%20me%20to%20figure%20out%20but%20it%20finally%20worked.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20used%20the%20bypass%20you%20suggested%20and%20was%20able%20to%20use%20the%20connect%20command%20which%20led%20me%20to%20Office%20365%20login.%20I%20entered%20my%20credentials%20(I'm%20also%20an%20admin%20on%20the%20tenant).%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22wo_kn_0-1594989597310.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F206040iE4C248B4832966D3%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22wo_kn_0-1594989597310.png%22%20alt%3D%22wo_kn_0-1594989597310.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%2C%20I%20tried%20to%20use%20this%20command%20but%20didn't%20work%20unfortunatly%3A%3C%2FP%3E%3CP%3ESet-UnifiedGroup%20%3CEM%3ETeam%20name%3C%2FEM%3E%26nbsp%3B-HiddenFromExchangeClientsEnabled%3A%24false%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22wo_kn_1-1594989735074.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F206043i66DEC108B40841FF%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22wo_kn_1-1594989735074.png%22%20alt%3D%22wo_kn_1-1594989735074.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20guessing%20there's%20something%20Powershell%20needs%20before%20I'll%20be%20able%20to%20use%20this%20command%20as%20Powershell%20doesn't%20recognize%20this%20command.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1529060%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20i%20change%20Properties%20of%20teams%20using%20powershell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1529060%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F567359%22%20target%3D%22_blank%22%3E%40wo_kn%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESet-UnifiedGroup%20is%20part%20of%20the%20Exchange%20Module.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fexchange%2Fset-unifiedgroup%3Fview%3Dexchange-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fexchange%2Fset-unifiedgroup%3Fview%3Dexchange-ps%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20install%20this%20by%20running%3A%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EInstall-Module%20-Name%20ExchangeOnlineManagement%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EConnect%20by%20running%3A%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EConnect-ExchangeOnline%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBe%20aware%20that%20for%20managing%20all%20aspects%20of%20Teams%20you%20might%20need%204%20PowerShell%20modules.%26nbsp%3B%3C%2FP%3E%3CP%3E1.%20AzureAD%20Module%3C%2FP%3E%3CP%3E2.%20Exchange%20online%20module%3C%2FP%3E%3CP%3E3.%20SharePoint%20module%26nbsp%3B%3C%2FP%3E%3CP%3E4.%20Teams%20Module%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1529145%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20i%20change%20Properties%20of%20teams%20using%20powershell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1529145%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F463705%22%20target%3D%22_blank%22%3E%40ShellBlazer%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20a%20lot!%3C%2FP%3E%3CP%3EI've%20just%20done%20your%20last%202%20commands%20and%20I%20was%20able%20to%20use%20the%20command%3C%2FP%3E%3CP%3ESet-UnifiedGroup%26nbsp%3B%3CEM%3ETeamname%3C%2FEM%3E%20-HiddenFromExchangeClientsEnabled%3A%24false%3C%2FP%3E%3CP%3EInstead%20of%20the%20Teamname%20I%20used%20the%20group%20e-mail%20which%20I%20got%20out%20of%20the%20office%20admincenter.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20able%20to%20enter%20the%20command%20and%20some%20moments%20later%2C%20the%20Office-group%20was%20visible%20in%20Outlook!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20so%20much%20for%20taking%20time%20to%20answer%20this!%26nbsp%3B%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Fhtml%2Fimages%2Femoticons%2Fsmile_40x40.gif%22%20alt%3D%22%3Asmile%3A%22%20title%3D%22%3Asmile%3A%22%20%2F%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional 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
Highlighted
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.  

Highlighted

@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

 

 

Highlighted

@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

 

Highlighted

@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.

Highlighted
Best Response confirmed by wo_kn (Occasional 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 

Highlighted

@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: