Application Integration
Showing results for 
Search instead for 
Did you mean: 

Re: Nimble Powershell and Clone

Occasional Contributor

Nimble Powershell and Clone

Hi guys,

I'm the process of trying to put a script together that will allow me to do the following:

1. Retrieve the latest or most recent snapshot from a replicated volume
2. Create a clone from this snapshot and grant the proper access control

The area I'm struggling with is using variables instead of absolute values. If I try to use variables for the snap id and initiator id, the script errors out but if I use the actual ID's then it works.

##Getting the latest snapshot
GEt-NSsnapshot -vol_name REPL01 | Sort-Object -Property id | Select-Object -Last 1

##Creating a clone from the snapshot and bringing it online
New-NSVolume -name RestoreTest -base_snap_id 0442bd909b20a3747a0000000000000076000084f5 -clone $true -online $true

##Getting initiator group and granting access
New-NSAccessControlRecord -initiator_group_id 02581d5d1291f8331b000000000000000000000001 -vol_id 06581d5d1291f8331b00000000000000000000002b

How can I get the latest snapshot's ID and place that into a variable so then I can create a new clone from that variable? I would also like to do the same for the initiator group.



Re: Nimble Powershell and Clone


Kindly contact Nimble Support @ 1-877-364-6253, and open a service request to get the details.




Accept or Kudo