Output of PowerShell command is truncated

Surya kumar 340 Reputation points
2023-05-18T14:14:11.1433333+00:00

Hi,

I am trying to view the settings of a distribution group using powershell, however the results are truncated.

I ran the below command:
get-distributiongroup -identity < > | format-list
or
get-distributiongroup -identity < > | format-table -property <AcceptMessagesOnlyFrom> -wrap
or
get-distributiongroup -identity < > | format-table -property <AcceptMessagesOnlyFrom > -wrap | clip

Could you please let me know how to view complete output

Microsoft Exchange Online
Microsoft Exchange
Microsoft Exchange
Microsoft messaging and collaboration software.
456 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,310 questions
0 comments No comments
{count} votes

Accepted answer
  1. Dezhi Li-MSFT 780 Reputation points
    2023-05-19T05:48:02.8366667+00:00

    Hi Surya kumar

    You can try to check the value of $FormatEnumerationLimit and change it to -1.

    下载

    下载 (1)

    Best Regards,

    Dezhi


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation](https://aka.ms/msftqanotifications)"https://aka.ms/msftqanotifications)") to enable e-mail notifications if you want to receive the related email notification for this thread.   

    2 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Rodrigo Ribeiro 1 Reputation point
    2023-05-18T14:25:45.0433333+00:00

    You can try adding the "-Autosize " to a format table command, as bellow:

    Get-EventLog -LogName Application -Newest 10 | Format-Table -Wrap -Autosize

    Hope it helps!