- Community Home
- >
- Storage
- >
- HPE Nimble Storage
- >
- Array Performance and Data Protection
- >
- Re: Powershell script to sell all Snapshot
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2017 11:39 AM
тАО06-09-2017 11:39 AM
I want to use powershell to list all snapshot beginning by Ncss on all volumes
I can't find how to do it for all volumes but I am able to do it for one volumes with this command
Get-NSSnapshot -vol_name "NMBL-DBEX-SIEGESOCIAL" | where {$_.name -match "NSs"}
Is it possible to achieve my goal
thanks
Solved! Go to Solution.
- Tags:
- powershell script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2017 12:42 PM
тАО06-09-2017 12:42 PM
Re: Powershell script to sell all Snapshot
Hello Francois,
There are several ways to script this. Here is an example, where we first get volumes, and then pass the output through a foreach loop. In the sample below, I am focusing on volumes that have 2017-06-09 in the snapshot name.
Dianne
Sample script |
---|
Connect-NSGroup -Credential $nm_cred -group $nsarray $volname = Get-NSVolume | Select-Object -Property "name" $snaplist = @() foreach ($name in $volname) { $res = Get-NSSnapshot -vol_name $name.name | where { $_.name -like "*2017-06-09*" } | select name, id $snaplist += $res } Write-Output $snaplist |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2017 12:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2017 01:06 PM
тАО06-09-2017 01:06 PM
Re: Powershell script to sell all Snapshot
thanks it is working!! If I could put 2 solutions as the correct answer you will be marked as that too
thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2017 01:07 PM
тАО06-09-2017 01:07 PM
Re: Powershell script to sell all Snapshot
Thanks also working!!!