Convertto-HTML output issue

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of vova vova 1 year, 9 months ago.

  • Author
    Posts
  • #22604
    Profile photo of vova
    vova
    Participant

    Hello all,

    I use Get-ADUser to get all users account (more than 10k) from my AD DS and i select only user login name , then i use Format-Wide -column 5 to output in 5 column. In my PS console i get result of my query nicely formatted in 5 columns, but when i use Convertto-Html i get nothing just a empty withe page with H2 tittle, and when i use my query without formatting i get a list of my 10k users account in my HTML page but in one single table.

    I used Don Jones writhed eBook about html reports and it help me to perform different reporting projects, but i never used Format-wide before...
    So i would like to know if it is possible to output the result of my query in multiple columns using Convertto-html cmdlet.

    Thanks in advance for help and sorry for my bad English

  • #22606
    Profile photo of Don Jones
    Don Jones
    Keymaster

    See "The Big Book of PowerShell Gotchas" (Resources tab on this site, then ebooks).

    Once you format something, you can basically only display it on the screen. If you want it somewhere else, don't format it.

    What you probably want to do is just use ConvertTo-HTML. It can accept a -Properties list to pick the properties you want, and it can create "-As List" or "-As Table" format if that's the display format you want. ConvertTo-HTML doesn't support a "wide" list, however.

  • #22609
    Profile photo of vova
    vova
    Participant

    Ok i see now, thank you for response.

You must be logged in to reply to this topic.