Microsoft Virtualization Discussions

Piping Out To CSV

GEOFFREY_DEAN

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

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

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

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public