Data Backup and Recovery Discussions

How to export to csv the Get-SMSchedule command you can run on Snapcenter?

philipb

A customer wants to know how to export to CSV the Get-SMSchedule command from SnapCenter

I am looking to export objects such as Scheduled start and end time, databases involved, and retention into columns. Not sure if there is an advanced guide on getting this info populated into columns since currently it is a mess populating that into a spreadsheet.

1 ACCEPTED SOLUTION

donny_lang

The most basic way would be something like this:

 

Get-SMSchedule | Select-Object <list of PowerShell properties that you want to include in your exported CSV> | Export-CSV C:\path\to\your\CSV\file

You can run "Get-SMSchedule | Get-Member" to get a list of all available properties (there are usually a large number of properties available that aren't displayed by default).  

 

Some light reading:

 

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/select-object?view=powershell-6

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-member?view=powershell-6

View solution in original post

2 REPLIES 2

donny_lang

The most basic way would be something like this:

 

Get-SMSchedule | Select-Object <list of PowerShell properties that you want to include in your exported CSV> | Export-CSV C:\path\to\your\CSV\file

You can run "Get-SMSchedule | Get-Member" to get a list of all available properties (there are usually a large number of properties available that aren't displayed by default).  

 

Some light reading:

 

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/select-object?view=powershell-6

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-member?view=powershell-6

View solution in original post

philipb

I believe this is the answer that the customer has needed.  They will be testing shortly.  THanks!

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