Export-CSV InputObject value

Welcome Forums General PowerShell Q&A Export-CSV InputObject value

Viewing 2 reply threads
  • Author
    Posts
    • #284998
      Participant
      Topics: 13
      Replies: 17
      Points: 193
      Rank: Participant

      Hello,

       

      I have a script to get quota usage on my server:

       

      what I wanted is to export it to .csv file.

      tried:

      | Export-Csv -Path “C:\Users\123.csv” – output was strange (like a SID instead of data)

      Export-Csv -Path “C:\Users\123.csv” (no pipeline) – message received:

      Supply values for the following parameters:
      InputObject:

       

      I also tried Google search and add -NoTypeInformation

      please help

       

      • This topic was modified 1 week, 3 days ago by Atx750k.
    • #285013
      Participant
      Topics: 4
      Replies: 425
      Points: 748
      Helping Hand
      Rank: Major Contributor

      The Format-* cmdlets should not be followed by other cmdlets as the formatting instructions they produce cannot be interpreted by most cmdlets (there are a few exceptions).  Remove the Format-Table command and pipe your data straight to Export-CSV.

    • #285019
      Participant
      Topics: 13
      Replies: 17
      Points: 193
      Rank: Participant

      The Format-* cmdlets should not be followed by other cmdlets as the formatting instructions they produce cannot be interpreted by most cmdlets (there are a few exceptions). Remove the Format-Table command and pipe your data straight to Export-CSV.

      Sir, thank you.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.