Link to home
Start Free TrialLog in
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?
Avatar of Qlemo
Qlemo
Flag of Germany image

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
Avatar of danbrown_
danbrown_
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.