Export-CSV InputObject value

Hello,

 

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

Get-FsrmQuota | Select-Object Path,
@{Label="Size GB"; Expression = { "{0:F0}" -f ($_.Size/1GB) }},
@{Label="Usage GB"; Expression = { "{0:F0}" -f ($_.Usage/1GB) }} |
Format-Table -AutoSize

 

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

 

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.

[quote quote=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.

[/quote]

Sir, thank you.