none
Powershell - O365 - How to print the full output of ManagedByDetails

    Question

  • Hello,

    when I run:

    Get-UnifiedGroup -resultsize Unlimited | select Alias, AccessType, Managedbydetails, WelcomeMessageEnabled, SharePointSiteUrl|ft|out-string -width 4096 |out-file C:\Teams\Get-UnifiedGroup.txt

    and the output of ManagedByDetails is too long, it displays "..." at the end of its output.

    I tried with

    .. |ft -property * -autosize | ..

    but this unfortunately didn't help.

    How to print the full output of ManagedByDetails

    Monday, February 11, 2019 8:19 AM

Answers

  • First of all you should never use "ft" or any of the other formatting cmdlets when exporting to a file. Next, it's best to just expand the ManagedByDetails array, as in do something like this:

    Get-UnifiedGroup -resultsize Unlimited | select Alias, AccessType, @{n='Managedbydetails';e={$_.ManagedByDetails -join ","}}

    Then you can export to CSV or use Out-File or whatever.

    • Marked as answer by SharePointer_ Tuesday, February 12, 2019 2:33 PM
    Monday, February 11, 2019 6:21 PM

All replies

  • Hi SharePointer,

    Please try to replace the out-file to export-csv in the command you provided, and then check this issue again:
    Get-UnifiedGroup -resultsize Unlimited | select Alias, AccessType, Managedbydetails, WelcomeMessageEnabled, SharePointSiteUrl|ft|out-string -width 4096 |export-csv C:\Teams\Get-UnifiedGroup.csv

    Best Regards,
    Evan Jiang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.


    Monday, February 11, 2019 9:46 AM
    Moderator
  • I did try your command, but unfortunately I'm getting this within the output file:

    #TYPE System.String
    "Length"
    "20014"
    Monday, February 11, 2019 2:05 PM
  • First of all you should never use "ft" or any of the other formatting cmdlets when exporting to a file. Next, it's best to just expand the ManagedByDetails array, as in do something like this:

    Get-UnifiedGroup -resultsize Unlimited | select Alias, AccessType, @{n='Managedbydetails';e={$_.ManagedByDetails -join ","}}

    Then you can export to CSV or use Out-File or whatever.

    • Marked as answer by SharePointer_ Tuesday, February 12, 2019 2:33 PM
    Monday, February 11, 2019 6:21 PM