Microsoft Tech Community Live:  Microsoft Teams Edition
November 09, 2021, 08:00 AM - 12:00 PM (PST)
SOLVED

how to remove unlicensed people from group chat by powershell?

%3CLINGO-SUB%20id%3D%22lingo-sub-2594847%22%20slang%3D%22en-US%22%3Ehow%20to%20remove%20unlicensed%20people%20from%20group%20chat%20by%20powershell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2594847%22%20slang%3D%22en-US%22%3E%3CP%3Ehi%20gents%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20have%20a%20request%20to%20bulk%20remove%20unlicensed%20people%20from%20chat%20group%2C%20which%20is%20self-organized%20by%20random%20users%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Esince%20unlicensed%20people%20are%20in%20many%20chat%20groups%2C%20manual%20way%20costs%20too%20much%20time%2C%20so%20i%20am%20wondering%20if%20there%20is%20a%20programming%20way%20to%20do%20the%20job%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks%20for%20your%20ideas%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2594847%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2595823%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20remove%20unlicensed%20people%20from%20group%20chat%20by%20powershell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2595823%22%20slang%3D%22en-US%22%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F169605%22%20target%3D%22_blank%22%3E%40Christopher%20Hoard%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20for%20your%20replies%2C%20similar%20result%20as%20my%20guess%20and%20researches.%20It%20is%20very%20helpful.%3CBR%20%2F%3E%3CBR%20%2F%3EI'll%20go%20to%20uservoice%20to%20raise%20the%20request.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2595092%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20remove%20unlicensed%20people%20from%20group%20chat%20by%20powershell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2595092%22%20slang%3D%22en-US%22%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F753143%22%20target%3D%22_blank%22%3E%40StanleyHao%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3ESorry%2C%20nothing%20in%20the%20PowerShell%20cmdlets%20which%20point%20to%20being%20able%20to%20do%20this%20programmatically.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fteams%2Fintro%3Fview%3Dteams-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fteams%2Fintro%3Fview%3Dteams-ps%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EI%20would%20recommend%20raising%20it%20on%20uservoice%20(%3CA%20href%3D%22https%3A%2F%2Fmicrosoftteams.uservoice.com%2Fforums%2F555103-public%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmicrosoftteams.uservoice.com%2Fforums%2F555103-public%3C%2FA%3E)%20whilst%20it%20is%20still%20around%20in%20order%20to%20raise%20it%20as%20a%20new%20feature.%20As%20far%20as%20I%20know%20this%20is%20the%20only%20possible%20way%20is%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-gb%2Foffice%2Fleave-or-remove-someone-from-a-group-chat-7db55a67-0ba4-4409-a399-5ed502a1d094%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fen-gb%2Foffice%2Fleave-or-remove-someone-from-a-group-chat-7db55a67-0ba4-4409-a399-5ed502a1d094%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3ENote%20-%20If%20someone%20leaves%20or%20is%20removed%20from%20a%20group%20chat%2C%20their%20messages%20will%20remain%20in%20the%20group%20chat%20history%3CBR%20%2F%3E%3CBR%20%2F%3EHope%20that%20answers%20your%20question%3CBR%20%2F%3E%3CBR%20%2F%3EBest%2C%20Chris%3C%2FLINGO-BODY%3E
Occasional Contributor

hi gents,

 

i have a request to bulk remove unlicensed people from chat group, which is self-organized by random users

 

since unlicensed people are in many chat groups, manual way costs too much time, so i am wondering if there is a programming way to do the job

 

thanks for your ideas

2 Replies
best response confirmed by adam deltinger (MVP)
Solution
Hi @StanleyHao

Sorry, nothing in the PowerShell cmdlets which point to being able to do this programmatically.

https://docs.microsoft.com/en-us/powershell/teams/intro?view=teams-ps

I would recommend raising it on uservoice (https://microsoftteams.uservoice.com/forums/555103-public) whilst it is still around in order to raise it as a new feature. As far as I know this is the only possible way is

https://support.microsoft.com/en-gb/office/leave-or-remove-someone-from-a-group-chat-7db55a67-0ba4-4...

Note - If someone leaves or is removed from a group chat, their messages will remain in the group chat history

Hope that answers your question

Best, Chris
Hi @Christopher Hoard

Thanks for your replies, similar result as my guess and researches. It is very helpful.

I'll go to uservoice to raise the request.