Group owner

%3CLINGO-SUB%20id%3D%22lingo-sub-1392112%22%20slang%3D%22en-US%22%3EGroup%20owner%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1392112%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20guys%2C%3C%2FP%3E%3CP%3EI%20would%20require%20advice%20on%20PS%20cmdlet.%3C%2FP%3E%3CP%3EI%20need%20to%20find%20out%20%26amp%3B%20export%20a%20list%20of%20O365%20groups%20that%20are%20owned%20by%201%20specific%20user.%3C%2FP%3E%3CP%3EAll%20groups%20are%20cloud-only.%3C%2FP%3E%3CP%3EI%20imagined%20it%20will%20go%20something%20like%3A%3C%2FP%3E%3CP%3EGet-UnifiedGroup%20%7C%20WhereObject%20eq.%20managed%20by....%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20regards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1392112%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1392173%22%20slang%3D%22en-US%22%3ERe%3A%20Group%20owner%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1392173%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F390770%22%20target%3D%22_blank%22%3E%40DiVojich%3C%2FA%3E%26nbsp%3BTake%20a%20look%20at%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoftDocs%2Foffice-docs-powershell%2Fissues%2F1668%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ethis%20issue%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGood%20luck!%3C%2FP%3E%3CP%3EGrtz%2C%20Manfred%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1393241%22%20slang%3D%22en-US%22%3ERe%3A%20Group%20owner%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1393241%22%20slang%3D%22en-US%22%3E%3CP%3EServer-side%20filtering%20is%20always%20a%20better%20approach%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EGet-Recipient%20-Filter%20%22ManagedBy%20-eq%20'CN%3Duser%2COU%3Dtenant.onmicrosoft.com%2COU%3DMicrosoft%20Exchange%20Hosted%20Organizations%2CDC%3DEURPR03A001%2CDC%3Dprod%2CDC%3Doutlook%2CDC%3Dcom'%22%20-RecipientTypeDetails%20GroupMailbox%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Ewhere%20you%20have%20to%20provide%20the%20DN%20of%20the%20user%20you%20want%20to%20check%20against.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hi guys,

I would require advice on PS cmdlet.

I need to find out & export a list of O365 groups that are owned by 1 specific user.

All groups are cloud-only.

I imagined it will go something like:

Get-UnifiedGroup | WhereObject eq. managed by....

 

Kind regards

2 Replies

@DiVojich Take a look at this issue

 

Good luck!

Grtz, Manfred

 

Server-side filtering is always a better approach:

 

Get-Recipient -Filter "ManagedBy -eq 'CN=user,OU=tenant.onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations,DC=EURPR03A001,DC=prod,DC=outlook,DC=com'" -RecipientTypeDetails GroupMailbox

where you have to provide the DN of the user you want to check against.