O365 Dynamic Group Export issue

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
Reddrgn2
Posts: 40
Joined: Wed May 23, 2018 6:13 am

O365 Dynamic Group Export issue

Post by Reddrgn2 »

Product, version and build: primalscript 2021 - 7.7.146
Operating system: win 10 - 20H2 - 64b - enterprise
PowerShell version(s): 5.1

Trying to get export from Office365 - Dynamic DL members and details of members.

I am able to get members and details to display on the console window (sorted by name), when trying to export is the actual issue. The export is blanks-ish. File lists :
  1. 1dd47eClassId2e4f51ef299d918aff9cd  pageHeaderEntry pageFooterEntry autosizeInfo    shapeInfo   groupingEntry
  2.  
  3. 033ecb2bc074ed5a35d280              Microsoft.PowerShell.Commands.Internal.Format.TableHeaderInfo  
  4.  
  5. 9e210fe47d041769c78b8a3                
  6.  
  7. 27c87ef9bbdf6b4002fa4af63c                 
The script I am using is:
  1. $FTE = Get-DynamicDistributionGroup "testhdq"
  2.  
  3. Get-Recipient -ResultSize Unlimited -RecipientPreviewFilter $FTE.RecipientFilter -OrganizationalUnit $FTE.RecipientContainer | Format-Table Name,Primary*,title | Export-Csv E:\scripts\Exports\$FTE.$((Get-Date).ToString('MM.dd.yy')).csv -NoTypeInformation

It is a little strange, i know it will be something simple, like adding a little something (always is :D )

User avatar
Alexander Riedel
Posts: 7603
Joined: Tue May 29, 2007 4:43 pm
Answers: 2
Been upvoted: 6 times

Re: O365 Dynamic Group Export issue

Post by Alexander Riedel »

[Topic moved by moderator]
Alexander Riedel
SAPIEN Technologies, Inc.

jvierra
Posts: 14697
Joined: Tue May 22, 2007 9:57 am
Answers: 8
Has voted: 2 times
Been upvoted: 5 times

Re: O365 Dynamic Group Export issue

Post by jvierra »

You cannot export from the output of Format-Table. The output from Format-Table is a set of formatter objects and not the objects you are trying to export. Remove that from the pipeline and try again.

Locked