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.
This topic is 3 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
Reddrgn2
Posts: 49
Last visit: Wed Nov 08, 2023 10:34 am
Answers: 1

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. 033ecb2bc074ed5a35d280              Microsoft.PowerShell.Commands.Internal.Format.TableHeaderInfo  
  3. 9e210fe47d041769c78b8a3                
  4. 27c87ef9bbdf6b4002fa4af63c                 
The script I am using is:
  1. $FTE = Get-DynamicDistributionGroup "testhdq"
  2. 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: 8472
Last visit: Mon Mar 18, 2024 2:59 pm
Answers: 19
Been upvoted: 37 times

Re: O365 Dynamic Group Export issue

Post by Alexander Riedel »

[Topic moved by moderator]
Alexander Riedel
SAPIEN Technologies, Inc.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 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.
This topic is 3 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked