Microsoft Virtualization Discussions

Piping Out To CSV

GEOFFREY_DEAN
3,541 Views

If i take a command such as: get-navol | get-nasnapshotschedule

It works fine and outputs to screen the snapshot schedules of the filer i have connected to, but if i try and pipe it out to a csv file by amending the command it doesn't like it:

PS C:\WINDOWS\system32> get-navol | get-nasnapshotschedule ¦ export-csv -path c:\output.csv

Get-NaSnapshotSchedule : A positional parameter cannot be found that accepts argument 'export-csv'.

At line:1 char:35

+ get-navol | get-nasnapshotschedule <<<<  ¦ export-csv -path c:\output.csv

    + CategoryInfo          : InvalidArgument: (:) [Get-NaSnapshotSchedule], P   arameterBindingException

    + FullyQualifiedErrorId : PositionalParameterNotFound,DataONTAP.PowerShell   .SDK.Cmdlets.Snapshot.GetNaSnapshotSchedule

I have tried to follow online guides across the web with various options for the commands but i cannot get past the error.  I appreciate I am new to all this but can anyone explain how you can get around this?

Thanks.

1 ACCEPTED SOLUTION

bsti
3,541 Views

The character Get-NaSnapshotSchedule and Export-Csv does not look like a Pipe character.  I think that's your issue.

View solution in original post

1 REPLY 1

bsti
3,542 Views

The character Get-NaSnapshotSchedule and Export-Csv does not look like a Pipe character.  I think that's your issue.

Public