Snap Creator PowerShell Toolkit: Getting Started

A new feature of Snap Creator 4.0 is a complete API layer on the rewritten server.  Snap Creator thrives in clouds, which are typically highly automated environments.  We envision cloud administrators and portal engineers building backup/recovery operations into their custom provisioning workflows.  That may be done by scripting the Snap Creator CLI or API layers.  A fundamental technology for managing Windows environments is PowerShell, so to simplify the task of orchestrating Snap Creator in Windows, we have wrapped the APIs in a PowerShell module.


This module--the Snap Creator PowerShell Toolkit--is freely available here, is provided under the NetApp SDK license, is supported by the Snap Creator Community, and benefits from over two years’ experience building the Data ONTAP PowerShell Toolkit.


To install the module, unzip the downloaded file to a temporary location and run the simple installation script.  The installer will ask where to install the module, using the locations contained in the PowerShell module path ($Env:PSModulePath).  To make the module available to all users on the system, run PowerShell with elevated privileges (‘Run as Administrator’) and choose the system directory as shown in the example below.


PS C:\Software\Temp> dir


    Directory: C:\Software\Temp


Mode LastWriteTime     Length Name

---- -------------     ------ ----

-a--- 5/19/2013   4:35 PM       5552 Install-ScModule.ps1

-a--- 5/19/2013   4:56 PM        827 README.txt

-a--- 6/5/2013    3:53 PM    1369227

-a--- 5/19/2013   4:39 PM       2523 Uninstall-ScModule.ps1



PS C:\Software\Temp> .\Install-ScModule.ps1


Choose an installation destination:


  1: C:\Users\cknight\Documents\WindowsPowerShell\Modules

  2: C:\Windows\system32\WindowsPowerShell\v1.0\Modules


Install to directory: [2]: 2


Installed successfully; run "Import-Module SnapCreator" to make the cmdlets available.


This initial release of the Snap Creator module contains 80 cmdlets, most of which wrap Snap Creator server APIs.  To explore the module, use Get-ScCommand, which lists the available cmdlets along with their API category and a brief synopsis.


PS C:\> Get-ScCommand -Category Engine


Name                   Category Synopsis

----                   -------- --------

Get-ScAgentStatus      Engine   Return the status of the agents the Snap Creator server is monitoring.

Get-ScEngineApiVersion Engine   Get the version of the Engine API available on the server.

Get-ScFile             Engine   List files on a storage controller.

Get-ScSnapmirror       Engine   List SnapMirror relationships for a given Snap Creator profile / config.

Get-ScSnapshot         Engine   List available snapshots for a given Snap Creator profile / config.

Get-ScSnapvault        Engine   List SnapVault relationships for a given Snap Creator profile / config.

Get-ScVolume           Engine   List volumes for a given Snap Creator profile / config.

Get-ScVolumeClone      Engine   List volume clones for a given Snap Creator profile / config.

Get-ScWorkflowHistory  Engine   Get one or more workflows Snap Creator executed on this server.

Get-ScWorkflowStatus   Engine   Get the status of a Snap Creator workflow.

Invoke-ScDump          Engine   Start an SCDump operation.

Ping-ScAgent           Engine   Check whether a Snap Creator agent is reachable at the specified address.

Remove-ScSnapshot      Engine   Delete a snapshot that is referenced by a Snap Creator config.

Remove-ScVolumeClone   Engine   Delete a volume clone for a given Snap Creator profile / config.

Restore-ScVolume       Engine   Restore a volume from a snapshot.

Start-ScWorkflow       Engine   Start a workflow.

Stop-ScWorkflow        Engine   Stop a workflow.


Most of the cmdlets interact with a Snap Creator server instance (local or remote), so the first step is to establish a connection using Connect-ScServer.  If a hostname or address is not provided, Connect-ScServer will connect to a server on the local host.  The connection context is saved in the session variable $CurrentScServer for use by the other cmdlets.


PS C:\> Connect-ScServer -Credential sc


Hostname     Address          ApiVersion

--------     -------          ----------

localhost    ::1                 1.0


Once connected, it’s a simple matter to create, retrieve, update and delete Snap Creator profiles, configs, users, snapshots, schedules, etc.  Future posts will cover more of these in greater detail, but here is a sample:


PS C:\> Get-ScProfile | Get-ScConfig


ProfileName          ConfigName           Type       Agent                Application          Volumes

-----------          ----------           ----       -----                -----------          -------

test                 test                 STANDARD   NetApp.SnapCreato... none                 {smoradata_src3, smor...

sm                   sm1                  STANDARD   NetApp.SnapCreato... none                 {v2}

oracle               oracle_aix           STANDARD        oracle               {nfs_aix_oracle_datab...

oracle               oracle_hpux_risc     STANDARD        oracle               {nfs_hpux_risc_oracle...

oracle               oracle_linux         STANDARD       oracle               {nfs_rhel6_oracle_dat...

oracle               oracle_solaris       STANDARD        oracle               {nfs_solaris_oracle_l...

oracle               oracle_keith         STANDARD   scrhel5.muccbc.hq... oracle               {sc_oracle_bin, sc_or...

siva_vcenter         vcloud               STANDARD   localhost            vibe                 {detect}

none                 ossv                 STANDARD   localhost            none                 {C\ossv_test}

none                 none                 STANDARD   localhost            none                 {sc_none}

none                 oracle               STANDARD         oracle               {nfs_oracle_gautcher_...

dfm                  dfm                  STANDARD   localhost            none                 {v3, v1}

siva                 snapvaultcfg_7m      STANDARD   localhost            none                 {siva_source1, siva_s...

siva                 powershell_plugin    STANDARD        tester.ps1           {snapcreator_builds}

siva                 test                 STANDARD   NetApp.SnapCreato... none                 {siva_gold}

siva                 cascade_7m           STANDARD   NetApp.SnapCreato... none                 {siva_source2, siva_v...

siva                 clonecfg_7m          STANDARD   NetApp.SnapCreato... none                 {siva_gold}

siva                 snapmirrorcfg_7m     STANDARD   localhost            none                 {siva_db, siva_log, s...

siva                 test2                STANDARD   NetApp.SnapCreato... none                 {siva_gold}

mysql                mysql_linux          STANDARD         mysql                {nfs_linux_mysql_data...


Happy Snap Creating!


Hi. Where can I download Snap Creator PowerShell Toolkit?
The link dead.



Connect-ScServer : The HTTP request was forbidden with client authentication scheme 'Basic'.