There is a limit to how much data can be sitting in the pipe at a given time. I’d have to look up the number, but it’s fairly large.
From: [email protected] [mailto:[email protected]] On Behalf Of Micheal Espinola Jr Sent: Wednesday, November 18, 2015 1:52 PM To: [email protected] Subject: Re: [Exchange] Help w/ Powershell script and distribution lists :-) This is exactly why I limited my initial response to "incorporate". I'm assuming that the multiple pipings will be an issue. I thought I recalled something about a limitation in piping when using -Resultsize - does that ring a bell for you, Michael? -- Espi On Wed, Nov 18, 2015 at 7:10 AM, Michael B. Smith <[email protected]<mailto:[email protected]>> wrote: This is because your output is being fed from get-distributiongroupmember. Empty groups have zero members and therefore the cmdlet returns no results. You can make this work, but it’s gonna be more complicated. You have to examine the result from get-distributiongroupmember and if it is zero, have some kind of default output. From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Mazzaccaro, David Sent: Wednesday, November 18, 2015 9:15 AM To: [email protected]<mailto:[email protected]> Subject: RE: [Exchange] Help w/ Powershell script and distribution lists Thanks, I tried inserting “-resultsize unlimited” after get-distributiongroup as well as after get-distributiongroup member $group but it still won’t give me empty DLs. foreach ($group in Get-DistributionGroup –resultsize unlimited) {get-distributiongroupmember $group –resultsize unlimited | sort displayname | ft @{expression={$_.displayname};Label=”$group”}, @{expression={$_.PrimarySmtpAddress};Label=”Emailaddress”} | Out-File c:\output\DLMembers.txt -append} Any other ideas? From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Micheal Espinola Jr Sent: Tuesday, November 17, 2015 9:32 PM To: [email protected]<mailto:[email protected]> Subject: Re: [Exchange] Help w/ Powershell script and distribution lists You need to incorporate '-Resultsize Unlimited' -- Espi On Tue, Nov 17, 2015 at 6:22 PM, Mazzaccaro, David <[email protected]<mailto:[email protected]>> wrote: Hi all, I am trying to get this Powershell script to include empty distribution lists. Any ideas? foreach ($group in Get-DistributionGroup) {get-distributiongroupmember $group | sort displayname | ft @{expression={$_.displayname};Label=”$group”}, @{expression={$_.PrimarySmtpAddress};Label=”Emailaddress”} | Out-File c:\output\DLMembers.txt -append} Thanks!
