Avatar of danbrown_
danbrown_
Flag for United States of America asked on

Powershell output is being truncated

Hello Experts - I am trying to export a list of domains that a user has on the Outlook spam list but the output from this command is truncated after the first few entries:

Get-MailboxJunkEmailConfiguration -Identity user@domain.com | Out-File C:\filename.txt

What additional switches do I need here so the output is not truncated?
PowershellExchangeOutlookEmail Servers

Avatar of undefined
Last Comment
Qlemo

8/22/2022 - Mon
Qlemo

You'll have to be more sepecific with what you want to get. As you do now you get the complete object containing a lot of information including two collections with undefined member count ;-).
E.g. you can export only the blocked addresses:
(Get-MailboxJunkEmailConfiguration user@domain.com).BlockedSendersAndDomains | Out-File C:\filename.txt

Open in new window

ASKER CERTIFIED SOLUTION
danbrown_

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Qlemo

Please note that that is in general a bad way to handle your issue. It might help you in this particular case, but fail if you try to do similar stuff later. However, from a KISS POV, it is a quick workaround.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy