locked
Format Out-File a txt RRS feed

  • Question

  • Hi team

    when I out-file email property from AD it takes different format , need to tidy aesthetic only, I am ok to do formatting post getting result (in same ps script but as next line of code) or at same time when doing out-file.

    Need to store result as

    Mail

    email1

    email2

    email3

    here is sample from out file (not sure if you copy it will have tab/spaces or not)

    1. Need to remove Mail , ----

    2. All tab/spaces

    3.each email should be one below other


    Mail                                                                                                                                                                                         
    ----                                                                                                                                                                                         
    email1                                                                                                                                                                             

    Mail                                                                                                                                                                                         
    ----                                                                                                                                                                                         
    email2                                                                                                                                                                             

    Mail                                                                                                                                                                                         
    ----                                                                                                                                                                                         
    email3                                                                                               

    • Moved by Bill_Stewart Monday, April 3, 2017 7:45 PM Unanswerable drive-by question
    Friday, February 17, 2017 11:18 PM

All replies

  • without your script we have no idea what you are trying to ask.


    \_(ツ)_/

    Saturday, February 18, 2017 12:33 AM
  • out-file command simply send whatever objects you have in pipeline to file, i suppose you can use format-list command before sending output to a file.

    Saturday, February 18, 2017 4:43 AM