locked
Export config using powershell RRS feed

  • Question

  • All,

    I want to export the transport server config using get-transportconfig command but one of the field "TLSSendDomainSecureList " is too long and cannot export to file correctly. Any way to export full list of this.

    thanks

    Keith

    Sunday, January 8, 2012 5:56 AM

Answers

  • You are right Rich, forgot it is a multi-value attribute... In this case it would have to be:

    Get-TransportConfig | Select {$_.TLSSendDomainSecureList} | Export-Csv C:\TLS.csv -NoType
    

    But it is probably better the way you suggested!


    http://LetsExchange.blogspot.com
    • Marked as answer by Keith Ho Tuesday, January 10, 2012 4:12 AM
    Monday, January 9, 2012 11:19 PM

All replies

  • Hi,

    not sure this will help you or not.. just give a try..

    Get-TransportConfig | FL TLSSendDomainSecureList >c:\export.txt


    Thanks & Regards, Kottees **** Please mark as an answer if it is really helps you.
    Sunday, January 8, 2012 10:46 AM
  • The following will definately export everything in that field:

    Get-TransportConfig | Select TLSSendDomainSecureList | Export-Csv C:\TLS.csv -NoType
    


    http://LetsExchange.blogspot.com
    Sunday, January 8, 2012 2:18 PM
  • On Sun, 8 Jan 2012 05:56:20 +0000, Keith Ho wrote:
     
    >I want to export the transport server config using get-transportconfig command but one of the field "TLSSendDomainSecureList " is too long and cannot export to file correctly. Any way to export full list of this.
     
    get-transportconfig | export-clixml transportconfig.xml
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP
    Sunday, January 8, 2012 4:51 PM
  • Hi,

    How about to use -autosize with ft?

    Get-transportconfig |Ft TLSSendDomainSecureLis -autosize

     


    Xiu Zhang

    TechNet Community Support


    • Edited by Xiu Zhang Monday, January 9, 2012 8:57 AM
    Monday, January 9, 2012 8:56 AM
  • On Mon, 9 Jan 2012 08:56:01 +0000, Xiu Zhang - MSFT wrote:
     
    >
    >
    >Hi,
    >
    >How about to use -autosize with ft?
    >
    >Get-transportconfig |Ft TLSSendDomainSecureLis -autosize
     
    The format-table will still truncate the printable representation of
    an attribute's values.
     
    And exporting to CSV files is a PITA for multi-valued properties like
    these:
    InternalSMTPServers
    TLSReceiveDomainSecureList
    TLSSendDomainSecureList
     
    If the purpose of the export is to provide a way to document the
    configuration, or to be able to return som property to its former
    value, the XML file is really the way to go.
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP
    Monday, January 9, 2012 10:28 PM
  • You are right Rich, forgot it is a multi-value attribute... In this case it would have to be:

    Get-TransportConfig | Select {$_.TLSSendDomainSecureList} | Export-Csv C:\TLS.csv -NoType
    

    But it is probably better the way you suggested!


    http://LetsExchange.blogspot.com
    • Marked as answer by Keith Ho Tuesday, January 10, 2012 4:12 AM
    Monday, January 9, 2012 11:19 PM
  • I used Nuno Mota provided solution that it can show all correctly. Thanks

    Get-TransportConfig | Select {$_.TLSSendDomainSecureList} | Export-Csv C:\TLS.csv -NoType

    Tuesday, January 10, 2012 4:12 AM