AnsweredAssumed Answered

Volume Collection Powershell Script

Question asked by Paul Ramkumar on May 27, 2014
Latest reply on Mar 20, 2015 by aquaman

Does anyone know how to create a volume collection snapshot through powershell, for individual volumes looks ok but I cant seem to get the syntax right to snap a volume collection and replicate it.

 

Im trying to use the Nimble powershell kit.

 

Thanks

 

 

 

<#

 

 

.Synopsis

 

 

   Creates a new
snapshot

 

 

.DESCRIPTION

 

 

   Takes a new
snapshot of a specified volume, allowing you to control if its writeable and if
its online or not.

 

 

.EXAMPLE

 

 

   Get-NSVolume -name testvol | New-NSSnapshot -name Test1
(need something like this for volume collections)

 

 

.EXAMPLE

 

 

   Another example of
how to use this cmdlet

 

 

#>

 

 

function New-NSSnapshot

 

 

{

 

 

  
[CmdletBinding()]

 

 

  
[OutputType([snap])]

 

 

    Param

 

 

    (

 

 

      
# New name for snapshot

 

 

      
[Parameter(Mandatory=$true,Position=0)]

 

 

      
[string]

 

 

      
$Name,

 

 

      
# volume you'd like to take a snapshot of. This uses a Vol objecct, for
pipeline use with other cmdlets

 

 

      
[Parameter(Mandatory=$true,Position=1,ValueFromPipeLine=$true,ParameterSetName="inobj")]

 

 

      
[vol]

 

 

      
$InputObject,

 

 

      
# Volume you'd like to take a snapshot of

 

 

      
[Parameter(Mandatory=$true,Position=1,ParameterSetName="volume")]

 

 

      
[string]

 

 

      
$Volume,

 

 

      
# Volume collection you'd like to take a snapshot of.

 

 

      
[Parameter(Mandatory=$true,Position=1,ParameterSetName="volumeCollection")]

 

 

      
[string]

 

 

      
$VolumeCollection,

 

 

      
$Description,

 

 

      
[switch]

 

 

      
$Online,

 

 

      
[switch]

 

 

      
$Writable

 

 

    )

 

 

 

 

 

    Begin

Outcomes