Welcome › Forums › General PowerShell Q&A › Export-CSV InputObject value
- This topic has 2 replies, 2 voices, and was last updated 1 week, 3 days ago by
Participant.
-
AuthorPosts
-
-
January 10, 2021 at 2:21 am #284998
Hello,
I have a script to get quota usage on my server:
PowerShell1234Get-FsrmQuota | Select-Object Path,@{Label="Size GB"; Expression = { "{0:F0}" -f ($_.Size/1GB) }},@{Label="Usage GB"; Expression = { "{0:F0}" -f ($_.Usage/1GB) }} |Format-Table -AutoSizewhat 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.
-
This topic was modified 1 week, 3 days ago by
-
January 10, 2021 at 6:27 am #285013
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.
-
January 10, 2021 at 7:01 am #285019
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.
-
-
AuthorPosts
- You must be logged in to reply to this topic.