White Papers

Example scripts
43 Dell EMC SC Series: VMware Site Recovery Manager Best Practices | 2007-M-BP-V
A.3 SC Series command set PowerShell script: TakeSnapshot.ps1
This script leverages the SC Series command set to take a snapshot of the source replication system volume
in an effort to make sure that the most current snapshot is replicated to the DR site.
$SCHostname = "sc12.techsol.local"
$SCUsername = "srmadmin"
$SCPassword = ConvertTo-SecureString "mmm" -AsPlainText Force
$SCConnection = Get-SCConnection -HostName $SCHostname -User $SCUsername -
Password
$SCPassword
New-SCReplay (Get-SCVolume -Name "lun40" -Connection $SCConnection) -
MinutesToLive 1440 - Description "Snapshot w/ 1 day retention" -Connection
$SCConnection
This PowerShell script will connect to an SC Series system with a host name sc12.techsol.local, a username
srmadmin, and a password mmm to take a snapshot of lun40 with a snapshot expiration set to 1 day. Run
this PowerShell script from the SC Series command set shell to automatically load the
Compellent.StorageCenter.PSSnapin snap-in. This script can also be run from any PowerShell prompt
provided the Compellent.StorageCenter.PSSnapin snap-in is manually loaded or loaded as part of the
PowerShell profile.
A.4 Dell Storage PowerShell SDK script: TakeSnapshot.ps1
This script leverages the Dell Storage PowerShell SDK to take a snapshot of the source replication system
volume in an effort to make sure that the most current snapshot is replicated to the DR site.
# Import the module for the Dell Storage PowerShell SDK
Import-Module "C:\PS_SDK\DellStorage.ApiCommandSet.psd1"
# Assign variables
$EmHostName = "em1.techsol.local"
$EmUserName = "srmadmin"
# Prompt for the password
$EmPassword = Read-Host -AsSecureString `
-Prompt "Please enter the password for $EmUserName"
# Create the connection
$Connection = Connect-DellApiConnection -HostName $EmHostName `
-User $EmUserName `
-Password $EmPassword
# Assign variables
$ScName = "SC 12"
$VolumeName = "lun40"
$VolumeFolderPath = "VMware/Demo/SRM 6.x/"
$SnapshotDescription = "Created by PowerShell SDK"