1 Reply Latest reply: Mar 20, 2015 9:01 AM by Ryan Blundon RSS

    Volume Collection Powershell Script

    Paul Ramkumar Newbie

      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