Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
User Guide
Storage Center Command Set 4.1 for Windows PowerShell
680-037-001 A
Disclaimers
Trademarks used in this text are property of Compellent Technologies or their respective owners
Compellent Technologies
7625 Smetana Lane
Eden Prairie, Minnesota 55344
© 2008 Compellent Technologies. All rights reserved.
Contents
Preface
Purpose vii
Related Publications vii
Contacting Copilot Services vii
Submitting Comments viii
1 Getting Started
Requirements 2
Installation and Setup 2
Installing the Storage Center Command Set 2
Using the Storage Center Command Set 3
Increasing PowerShell Speed (Optional) 3
Command Formats 4
PowerShell Objects 5
About PowerShell Objects 5
Storing Objects in Variables 5
Accessing Object Information 5
Object Descriptions 5
Connecting to a Storage Center 7
Creating SecureString Passwords 7
Establishing a Connection 8
Executing Commands 9
Executing Single Commands 9
Executing a Script 9
Formatting and Exporting Command Output 10
Getting Command Line Help 11
Common Command Parameters 12
Standard Common Parameters 12
—WhatIf 12
—Confirm 12
2 Command Reference
Acknowledge-SCAlert 15
Add-SCServerPort 17
Add-VolumeAccessPath 19
Expand-SCVolume 22
Get-DiskDevice 25
Get-NextFreeDriveLetter 28
Get-SCAlert 29
3 Example Scripts
About Storage Center Command Set Examples 154
Add New Database 155
Add New Storage Group 159
Create New User Account for Everyone in User Group 162
Push to Tape 163
Compellent Technologies v
vi Storage Center Command Set 4.1 for Windows PowerShell
Preface
Purpose
This guide contains instructions for using the Storage Center Command Set. The Storage
Center Command Set provides access to cmdlets and scripting object that interact with the
Compellent Storage Center via the PowerShell interactive shell, scripts, and PowerShell
hosting applications.
Related Publications
In addition to this guide, users may need to refer to the following related publications:
• Storage Center System Setup Guide Provides instructions for installing and set-
ting up Storage Center System Manager.
• Storage Center Connections Guide Describes cabling for single and dynamic
controllers, as well as cabling for multipathing.
• Storage Center System Upgrade Guide Provides instructions for upgrading from
previous versions of Storage Center.
• Storage Center System Manager User Guide Provides instructions for using
Storage Center System Manager to manage storage.
• support@compellent.com
• 1-866-397-8673
For downloads and technical tips, log on to the Compellent Knowledge Center at the fol-
lowing address:
http://knowledgecenter.compellent.com
Submitting Comments
Compellent Technologies uses customer input to improve our products and documenta-
tion. If you have comments or suggestions, email Compellent Technical Communications
at the following address: documentation@compellent.com
Requirements 2
Installation and Setup 2
Command Formats 4
PowerShell Objects 5
Connecting to a Storage Center 7
Executing Commands 9
Getting Command Line Help 11
Common Command Parameters 12
Compellent Technologies 1
Getting Started
Requirements
To use the Storage Center Command Set you need:
• Storage Center 4.0 and later. For information on setting up a Storage Center, see
the Storage Center System Setup Guide.
1. If necessary, download and install Windows PowerShell from the Microsoft Website.
a. Double-click the Storage Center Command Set setup file. The InstallShield
Wizard appears:
To use the Storage Center Command Set Shell, click Start > All Programs > Compellent
Technologies > Storage Center Command Set > Storage Center Command Set Shell.
This is a shortcut to a PowerShell console with the Storage Center Command Set already
loaded. It is recommended you use the Storage Center Command Set Shell.
PowerShell Console
To use the Storage Center Command Set cmdlets in the standard PowerShell console
(Start > All Programs > Windows Powershell 1.0 > Windows Powershell), open the
console and type the following command:
Add-PSSnapin Compellent.StorageCenter.Scripting
This command must be entered each time the PowerShell console is opened prior to
using Storage Center Command Set cmdlets.
http://blogs.msdn.com/powershell/archive/2008/09/02/speeding-up-powershell-startu
p-updating-update-gac-ps1.aspx
Then, run this script from the PowerShell command prompt (see Executing Commands on
page 9).
Compellent Technologies 3
Getting Started
Command Formats
This document uses Microsoft PowerShell command syntax formatting conventions:
Item Description
\ (backslash) In command examples, the backslash (\) indicates that the
command continues to the next line. This convention is for dis-
play purposes only. When using commands at a prompt or in a
script, enter the entire command and all parameters on one
line.
braces { } Surround a choice of multiple required parameters values.
brackets [] Surround optional parameters and positional parameter
names.
italics Indicate a variable.
vertical line | Indicates mutually exclusive parameters within braces or
brackets.
PowerShell Objects
This SCVolume object can then be used with the Move-SCVolume command parameter,
SCVolume:
Get-SCVolume|Get-Member
This will return a list of methods and properties for the SCVolume object.
Object Descriptions
The following table lists and describes common PowerShell objects as well as Storage
Center-specific objects.
Object Description
Boolean Represents a true or false value. For true, type 1 or
$true. For false, type 1 or $false.
DataVolume Represents a logical volume in Windows.
DiskDeviceObject Represents a disk drive in Windows.
Int32 Represents a 32-bit signed integer. Signed integers
can be either positive or negative.
Int64 Represents a 64-bit signed integer. Signed integers
can be either positive or negative.
SCAlert Represents a Storage Center alert.
Compellent Technologies 5
Getting Started
Object Description
SCCmm Represents a Storage Center Copy/Mirror/Migrate
operation.
SCConnection Represents Storage Center connection information.
SCDisk Represents a Storage Center disk.
SCDiskFolder Represents a Storage Center disk folder.
SCPort Represents a Storage Center controller port.
SCReplay Represents a Storage Center replay.
SCServer Represents a Storage Center server.
SCServerFolder Represents a Storage Center server folder.
SCStorageType Represents a Storage Center storage type.
SCUser Represents a Storage Center Storage Center user
account.
SCVolume Represents a Storage Center volume.
SCVolumeFolder Represents a Storage Center volume folder.
SCVolumeMap Represents a Storage Center volume to server map-
ping.
SecureString Represents an encrypted string for private data (see
Creating SecureString Passwords on page 7).
String Represents a combination of alphanumeric charac-
ters. Strings that contain the space character must be
enclosed by quotation marks. For example:
Interactive Input
You can create a variable with SecureString content by entering the following command in
the PowerShell console:
The password you enter is obscured by asterisks (*). It is now stored in the variable.
Direct Input
If security is less of a concern the password can be directly entered on the command line
without obscuring the text:
Stored Values
The value of a secure string can be stored for later access. The encryption used for the
SecureString is based on the logged on user's credentials. This helps prevent someone
else from accessing the stored value and deriving the password. However, the saved data
should be kept in a secure location and NTFS permissions may also be used to further
protect it from unwanted access.
Compellent Technologies 7
Getting Started
A script can now access this file using the following command:
Establishing a Connection
All Storage Center-related cmdlets require a connection to a physical Storage Center sys-
tem. This is accomplished in multiple ways using the Get-SCConnection cmdlet (see
Get-SCConnection on page 34).
You can store Storage Center connection information in a variable. For example:
You can then use a command’s -Connection option to connect to a Storage Center. For
example:
You can use the -Save parameter with Get-SCConnection to store connection informa-
tion as a connection name. For example:
To create a default Storage Center connection, use the -Save and -Default parameters
with Get-SCConnection. For example:
Executing Commands
Open the Storage Center Command Set Shell and type a single command. For example:
Executing a Script
Note The Storage Center Command Set does not support running multiple scripts con-
currently.
A script is a text file that contains one or more Windows PowerShell commands. Follow
these guidelines for creating script files:
• Use the pound sign (#) as the first character on a line to denote a comment.
Scripts must be run from the Storage Center Command Set Shell or from the PowerShell
console with the Storage Center Command Set snapin loaded (for more information, see
Using the Storage Center Command Set on page 3).
Note By default, the Windows PowerShell script execution policy is set to restricted. For
information on enabling scripts, enter Get-Help about_signing.
C:\scripts\myscript.ps1
• If the path to your script includes blank spaces, type an ampersand (&) followed
by the path enclosed it in quotation marks.
&“C:\my scripts\myscript.ps1”
.\myscript.ps1
• Include the folder containing your script in your Windows PATH, then type the
name of the script.
myscript.ps1
Compellent Technologies 9
Getting Started
By default, Storage Center Command Set cmdlets print information to the console in a
table. The Format-List command will format information outputted to the console as a
list. For example, the following command will display a list of all properties for a Storage
Center volume named MyVolume:
For more information on displaying information in the console, type the following:
Get-Help about_display
Command output can be stored in various file formats. The examples below show how to
save the information of a Storage Center volume named MyVolume as an xml, csv, or text
file.
Get-Help Get-SCVolume
• Name
• Synopsis
• Syntax
• Detailed description
• Related Links
• Remarks
You can view additional information for a command by using the -detailed option. For
example:
• Parameters
• Examples
To view all help information available for a command, use the -full option. For example:
To view a list of all available Storage Center Command Set cmdlets, type the following:
Compellent Technologies 11
Getting Started
• —Verbose
• —Debug
• —ErrorAction
• —ErrorVariable
• —OutVariable
Get-Help about_commonparameters
—WhatIf
The -WhatIf parameter can be used with some Storage Center Command Set commands
as a way to test commands and scripts without performing the specified action.
For example, the following command tests the results of a Remove-SCVolume command
without deleting any volumes on the Storage Center:
—Confirm
Using the -Confirm parameter with a command causes PowerShell to prompt you for con-
firmation before entering a command, depending on your system $ConfirmPreference set-
ting and the impact of a command on the system.
For more information on the $ConfirmPreference setting, visit the Microsoft PowerShell
Team Blog at the following link:
http://blogs.msdn.com/powershell/archive/2006/12/15/confirmpreference.aspx
Acknowledge-SCAlert 15
Add-SCServerPort 17
Add-VolumeAccessPath 19
Expand-SCVolume 22
Get-DiskDevice 25
Get-NextFreeDriveLetter 28
Get-SCAlert 29
Get-SCCmm 31
Get-SCCommandSetVersion 33
Get-SCConnection 34
Get-SCDisk 36
Get-SCDiskFolder 39
Get-SCPort 41
Get-SCReplay 43
Get-SCServer 45
Get-SCServerFolder 47
Get-SCStorageType 49
Get-SCUser 51
Get-SCVolume 53
Get-SCVolumeFolder 56
Get-SCVolumeMap 58
Get-Volume 61
Move-SCServer 63
Move-SCServerFolder 65
Move-SCVolume 67
Move-SCVolumeFolder 69
New-SCCmmCopy 71
New-SCCmmMigrate 73
New-SCCmmMirror 76
New-SCReplay 78
New-SCServer 80
New-SCServerFolder 82
New-SCUser 84
Compellent Technologies 13
Command Reference
New-SCVolume 87
New-SCVolumeFolder 90
New-SCVolumeMap 92
New-Volume 95
Remove-SCCmm 97
Remove-SCConnection 99
Remove-SCReplay 100
Remove-SCServer 102
Remove-SCServerFolder 104
Remove-SCServerPort 106
Remove-SCUser 108
Remove-SCVolume 110
Remove-SCVolumeFolder 112
Remove-SCVolumeMap 114
Remove-VolumeAccessPath 117
Rename-SCServer 119
Rename-SCServerFolder 121
Rename-SCVolume 123
Rename-SCVolumeFolder 125
Rescan-DiskDevice 127
Set-DiskDevice 128
Set-SCCmm 131
Set-SCDisk 133
Set-SCServer 135
Set-SCServerFolder 138
Set-SCUser 141
Set-SCVolume 144
Set-SCVolumeFolder 147
Set-Volume 150
Acknowledge-SCAlert
Description
The Acknowledge-SCAlert cmdlet will mark a Storage Center alert as acknowledged. The
alert will no longer be returned by the Get-SCAlert cmdlet, but it still can be viewed
through the Storage Center System Manager user interface in the Alert Monitor view.
Syntax
Parameters
—Index String
—Controller UInt32
—Status String
—Message String
—Category String
—AlertObject String
—Type String
—Connection SCConnection
Compellent Technologies 15
Command Reference
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
Examples
Example 1
Example 2
This command will acknowledge all alerts on the controller with serial number 3302 that
are categorized as System.
Related Links
Get-SCAlert 29
Add-SCServerPort
Description
This cmdlet can be used to add additional world wide names or iSCSI addresses to an
existing server definition. This cmdlet performs the same functionality as the Add HBAs to
Server option in the Storage Center System Manager.
Syntax
Parameters
—Name String
—WorldWideNames String
—iSCSIAddresses String
Specifies the iSCSI addresses to be added to the server. Note that this cmdlet will not
establish an iSCSI connection. iSCSI sessions must be configured and initiated between
the server and the Storage Center prior to executing the cmdlet with these values.
—Connection SCConnection
—ConnectionName String
Compellent Technologies 17
Command Reference
—Index UInt32
—LogicalPath String
Specifies the logical path to the server. This can be used to uniquely identify a server
based on its position within server folders.
—SCServer SCServer
Return Type
SCServer
Examples
Example 1
This command adds two world wide names to the server definition of the server named
"MX01".
Example 2
This command adds the iSCSI address 10.10.1.240 to the server definition of the server
with the index of 4.
Related Links
Get-SCServer 45
New-SCServer 80
Remove-SCServerPort 106
Add-VolumeAccessPath
Description
This cmdlet can be used to add a drive letter or mount point to an existing volume. This
cmdlet adds either additional access through a mount point or adds a drive letter to an
existing recovery volume. Windows allows volumes to have multiple mount points, but
only one drive letter. Attempting to add a second drive letter to a volume will fail.
Syntax
Parameters
—Server String
—AccessPath String
Adds the specified drive letter or mount point to the volume. Drive letters must be in the
format "D:" or "D:\". Mount points must be the full path to the folder where you want to
mount the volume. This path must exist and be an empty folder on an NTFS volume.
—Label String
Specifies the label of the volume to be configured with the new access path.
—Status String
Specifies the status of the volume to be configured with the new access path.
—Health String
Specifies the health of the volume to be configured with the new access path.
—State String
Specifies the state of the volume to be configured with the new access path.
—FileSystemType String
Specifies the file system type of the volume to be configured with the new access path.
—Flag String
Specifies one of the flags of the volume to be configured with the new access path.
Compellent Technologies 19
Command Reference
—Size String
Specifies the byte size or display size of the volume to be configured with the new access
path. Values can be in megabytes (m), gigabytes (g), or terabytes (t).
—SerialNumber String
Specifies the serial number of the disk that the volume is on.
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
Return Type
DataVolume
Examples
Example 1
This command adds the mount point C:\StorageGroups\VIP\Logs to the volume using the
disk with the serial number 0000012d-00001fcf on the server MX01. This command will
return errors and may result in the wrong volume being modified if multiple volumes use
the same disk.
AccessPaths : {C:\StorageGroups\VIP\Logs\}
Label : Data Volume
ByteCount : 79996911616
Size : 74.50 GB
FileSystemType : NTFS
Status : Online
Health : Healthy
State : Stable
DiskSerialNumber : 0000012d-00001fcf
Flags : {}
Related Links
Remove-VolumeAccessPath 117
New-Volume 95
Set-Volume 150
Get-SCVolume 53
Compellent Technologies 21
Command Reference
Expand-SCVolume
Description
Syntax
Parameters
—Name String
—NewSize String
Specifies the new final size of the volume in blocks. Values can be in megabytes (m),
gigabytes (g), or terabytes (t).
—ExpandBy String
Specifies the amount of additional space, in blocks, to add to the volume. Values can be in
megabytes (m), gigabytes (g), or terabytes (t).
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—SerialNumber String
—SCVolume SCVolume
Return Type
SCVolume
Examples
Example 1
Example 2
This command expands a Storage Center volume named "SQL Data" located in the
"DB01 Volumes" by 5G.
Related Links
New-SCVolume 87
Compellent Technologies 23
Command Reference
Remove-SCVolume 110
Get-DiskDevice
Description
This cmdlet retrieves disk drive information from the Windows Virtual Disk Service.
Syntax
Parameters
—Server String
—BusType String
Outputs information for disks with the specified storage bus type. Available storage bus
types include SCSI, FC, and iSCSI
—Vendor String
—ProductID String
—ProductRevision String
—SerialNumber String
—Status String
—Health String
Compellent Technologies 25
Command Reference
—Size String
Outputs information for disks with the specified size. Values can be in megabytes (m),
gigabytes (g), or terabytes (t).
—Name String
—AdapterName String
Outputs information for disks with the specified storage adapter name.
—DeviceName String
Outputs information for a disk with the specified Windows disk device name that uniquely
identifies the disk.
—Flag String
Return Type
DiskDeviceObject
Examples
Example 1
This command retrieves the disk device with the disk serial number of
0000012d-000021f7. This can be used to match up the Windows disk device with the Stor-
age Center volume.
Related Links
Rescan-DiskDevice 127
New-SCVolume 87
Compellent Technologies 27
Command Reference
Get-NextFreeDriveLetter
Description
This cmdlet will query the Windows Virtual Disk Service for the next available drive letter
that can be used to assign as a volume access path.
Syntax
Parameters
—Server String
Return Type
String
Examples
Example 1
The command will get the next available drive letter on the server MX01. G:
Get-SCAlert
Description
This cmdlet retrieves alerts from the Storage Center similar to what is displayed on the
Alert Monitor tab of the Storage Center System Manager.
Syntax
Parameters
—Index String
—Controller UInt32
—Status String
—Message String
—Category String
—AlertObject String
—Type String
—Connection SCConnection
—ConnectionName String
Compellent Technologies 29
Command Reference
Return Type
SCAlert
Examples
Example 1
This command will return information for all alerts that were generated on the controller
with serial number 3301.
Related Links
Acknowledge-SCAlert 15
Get-SCCmm
Description
This cmdlet will retrieve Copy, Mirror, and Migrate operations from the Storage Center.
Syntax
Parameters
—Index UInt32
—SourceVolumeIndex UInt32
Specifies the index for the volume that is the source of the CMM operation.
—DestinationVolumeIndex UInt32
Specifies the index for the volume that is the destination of the CMM operation.
—ActiveController UInt32
—State String
—SourceVolumeName String
Specifies the name of the volume that is the source of the CMM operation.
—DestinationVolumeName String
Specifies the name of the volume that is the destination of the CMM operation.
—SourceSCVolume SCVolume
Specifies the volume object representing the volume that is the source of the CMM opera-
tion.
Compellent Technologies 31
Command Reference
—DestinationSCVolume SCVolume
Specifies the volume object representing the volume that is the destination of the CMM
operation.
—Type String
—Priority String
—Connection SCConnection
—ConnectionName String
Return Type
SCCmm
Notes
Examples
Example 1
C:\PS>Get-SCCmm -SourceVolumeIndex 54
The command will output the CMM information with the source volume index of 54.
Related Links
Set-SCCmm 131
Remove-SCCmm 97
New-SCCmmCopy 71
New-SCCmmMirror 76
New-SCCmmMigrate 73
Get-SCCommandSetVersion
Description
Returns a System.Version object containing the version number of the loaded Storage
Center Command Set snapin.
Syntax
Get-SCCommandSetVersion
Return Type
System.Version
Compellent Technologies 33
Command Reference
Get-SCConnection
Description
Syntax
Parameters
—HostName String
—User String
Specifies the user name of an active Storage Center user for this connection.
—Password SecureString
Specifies the user password of active Storage Center user for this connection.
—Save String
Specifies the connection name to save this connection as for future named reference.
—Default
Sets this connection as the default connection to use if no connection is specified. This
allows other Storage Center cmdlets to be executed without supplying connection informa-
tion each time.
—Name String
Return Type
SCConnection
Examples
Example 1
This command establishes a connection to the Storage Center with the host name of
comp1. This connection is stored in a variable that can be passed to other Storage Center
cmdlets with the -Connection parameter.
Example 2
This command establishes a connection to the Storage Center with the host name of
comp1. This connection is saved with the name "comp1". Other Storage Center cmdlets
can use this connection with the -ConnectionName parameter.
Example 3
This command will set the previously saved connection "comp1" as the default connec-
tion. Storage Center cmdlets that do not have a connection specified in the -Connection or
-ConnectionName parameters will use this connection information for communicating with
the Storage Center.
Related Links
Remove-SCConnection 99
Compellent Technologies 35
Command Reference
Get-SCDisk
Description
The cmdlet will retrieve disk information from the Storage Center. The disk information
includes all Managed, Spared, and Unassigned disks in attached disk enclosures as well
as "disks" from other systems mapped to the Storage Center for replication.
Syntax
Parameters
—Position String
—Index UInt32
—Status String
—Health String
—ControlType String
—DiskFolder String
—LogicalPath String
—Classification String
—Notes String
—Enclosure String
—TotalBlocks UInt64
—UnallocatedBlocks UInt64
—Vendor String
—Product String
—SerialNumber String
—Connection SCConnection
—ConnectionName String
Return Type
SCDisk
Examples
Example 1
This command will get all disks from the Storage Center that are in the External disk folder
(replications).
Example 2
Compellent Technologies 37
Command Reference
This command will get all disks in the Storage Center that have not been managed.
Related Links
Set-SCDisk 133
Get-SCDiskFolder 39
Get-SCDiskFolder
Description
This cmdlet gets disk folder information from the Storage Center. Disk folders are logical
containers for disk objects.
Syntax
Parameters
—Name String
—Notes String
—Connection SCConnection
—ConnectionName String
—Index UInt32
Return Type
SCDiskFolder
Compellent Technologies 39
Command Reference
Examples
Example 1
This command gets the disk folder with the name "Assigned".
Related Links
Get-SCDisk 36
Get-SCPort
Description
This cmdlet will get all front-end primary port information from the Storage Center. This
information can be used for determining volume mapping information or iSCSI connection
information.
Syntax
Parameters
—Index UInt32
—WorldWideName String
Outputs information for a port with the specified world wide port name of the controller
port.
—Type String
Outputs information for a port with the specified type. Allowed values are FibreChannel,
FC, and iSCSI.
—Description String
Outputs information for ports with the specified descriptive name of the port adapter.
—Status String
—FaultDomain UInt32
—MapCount UInt32
Outputs information for ports with the specified number of existing volume maps.
—Slot UInt32
Compellent Technologies 41
Command Reference
—Port UInt32
Outputs information for a port with the specified port number within the slot on the control-
ler.
—Controller UInt32
Outputs information for ports on a controller with the specified serial number.
—OriginalController UInt32
Outputs information for ports that belonged to the specified original controller.
—Connection SCConnection
—ConnectionName String
Return Type
SCPort
Examples
Example 1
This command will get all iSCSI target ports from the Storage Center.
Example 2
This command will get all port information on the controller with serial number 3301.
Related Links
New-SCVolumeMap 92
Get-SCReplay
Description
This cmdlet gets replay information from the Storage Center. This replay information can
be used to view volume replay information or retrieve replays that can be used for the cre-
ation of Local Recovery volumes.
Syntax
Parameters
—Index String
—FreezeTime String
Outputs information for a replay with the specified time the replay was frozen.
—ExpireTime String
Outputs information for a replay with the specified time the replay is set to expire.
—SourceVolumeIndex UInt32
Outputs information for replays with the specified index of the volume that is the source of
the replays.
—SourceVolumeName String
Outputs information for replays with the specified name of the volume that is the source of
the replays.
—CreateSource String
Outputs information for replays with the specified creation source. This is the means by
which the replay was created, such as System or Application.
—Description String
Compellent Technologies 43
Command Reference
—State String
—ActiveController UInt32
Outputs information for replays on the specified controller where the replay is active.
—SourceSCVolume SCVolume
—Connection SCConnection
—ConnectionName String
Return Type
SCReplay
Examples
Example 1
This command will output the frozen (not currently active) replays for the "SQL Data" vol-
ume.
Example 2
This command can be used to get all frozen replays created by the Replay Manager ser-
vice. These snapshots would be created in conjunction with the Windows Volume Shadow
Copy Service (VSS) and would therefore have consistent application data. Returned
replays could then be used in conjunction with the New-SCVolume cmdlet to create a
Local Recovery view volume that could be mapped to another server for processes such
as backing up to tape.
Related Links
Remove-SCReplay 100
New-SCVolume 87
New-SCReplay 78
Get-SCServer
Description
Syntax
Parameters
—Name String
—Index UInt32
—ParentFolder String
—LogicalPath String
—Notes String
—WorldWideName String
Outputs information for a server with the specified world wide port name.
—IPAddress String
Outputs information for a server with the specified IP address. Note that this is not the
iSCSI IP address.
—Connection SCConnection
—ConnectionName String
Compellent Technologies 45
Command Reference
Return Type
SCServer
Examples
Example 1
This command gets the server definition for the server named "MX01".
Related Links
New-SCServer 80
Add-SCServerPort 17
Remove-SCServerPort 106
Remove-SCServer 102
Get-SCServerFolder
Description
This cmdlet gets server folder definitions from the Storage Center. Server folders are logi-
cal containers for server definitions and other server folders.
Syntax
Parameters
—Name String
—Index UInt32
—ParentFolder String
Outputs information for server folders within the specified server folder.
—LogicalPath String
Outputs information for a server folder with the specified logical path.
—Notes String
—Connection SCConnection
—ConnectionName String
Return Type
SCServerFolder
Compellent Technologies 47
Command Reference
Examples
Example 1
Related Links
New-SCServerFolder 82
Remove-SCServerFolder 104
Rename-SCServerFolder 121
Set-SCServerFolder 138
Get-SCStorageType
Description
This cmdlet retrieves the available storage types from the Storage Center. These storage
types can be used when creating new volumes to control the redundancy, page size, and
collections of disks that are used for the new volume's storage.
Syntax
Parameters
—Index String
—DiskFolderIndex String
Specifies the index of the disk folder used for this storage type.
—Name String
—PageSize String
—DiskFolderName String
Specifies the name of the disk folder used for this storage type.
—Redundancy String
—Connection SCConnection
—ConnectionName String
Compellent Technologies 49
Command Reference
Return Type
SCStorageType
Examples
Example 1
The command will get all available storage types using the disk folder "Assigned" for its
storage.
Related Links
Get-SCDiskFolder 39
Get-SCUser
Description
This cmdlet allows Admin level users to get information for all users from the Storage Cen-
ter. Volume Manager users are able to get their own user information.
Syntax
Parameters
—Name String
—FullName String
—Privileges String
—UserGroup String
—Title String
—Location String
—Department String
—Connection SCConnection
Compellent Technologies 51
Command Reference
—ConnectionName String
—Index UInt32
Return Type
SCUser
Examples
Example 1
This command will get user information for all Volume Manager users.
Related Links
New-SCUser 84
Remove-SCUser 108
Set-SCUser 141
Get-SCVolume
Description
The cmdlet can be used to retrieve volume object information from the Storage Center.
Syntax
Parameters
—Name String
—Index UInt32
—ParentFolder String
—LogicalPath String
—Notes String
—Size String
Outputs information for volumes with the specified block count or display size. Values can
be in megabytes (m), gigabytes (g), or terabytes (t).
—ReadCacheEnabled Boolean
Outputs information for volumes with the specified read cache status.
—ReadAheadCacheEnabled Boolean
Outputs information for volumes with the specified read ahead cache status.
Compellent Technologies 53
Command Reference
—WriteCacheEnabled Boolean
Outputs information for volumes with the specified write cache status.
—ActiveController UInt32
Outputs information for volumes on a controller with the specified serial number.
—Status String
Outputs information for volumes with the specified status. Allowed values are Up and
Down.
—SerialNumber String
—StorageType String
—IsReplicated Boolean
Outputs information for volumes being replicated ($true) or not being replicated ($false).
—IsCopying Boolean
Outputs information for volumes being copied ($true) or not being copied ($false).
—IsMirrored Boolean
Outputs information for volumes being mirrored ($true) or not being mirrored ($false).
—Connection SCConnection
—ConnectionName String
Return Type
SCVolume
Examples
Example 1
This command will get all volumes that are being replicated to another system.
Example 2
This command will get the volume named "SQL Data" in the "DB01" volume folder.
Related Links
New-SCVolume 87
Move-SCVolume 67
Remove-SCVolume 110
Rename-SCVolume 123
Set-SCVolume 144
Compellent Technologies 55
Command Reference
Get-SCVolumeFolder
Description
This cmdlet gets volume folder definitions from the Storage Center.
Syntax
Parameters
—Name String
—ParentFolder String
—LogicalPath String
—Notes String
—Connection SCConnection
—ConnectionName String
—Index UInt32
Return Type
SCVolumeFolder
Examples
Example 1
Related Links
Move-SCVolumeFolder 69
New-SCVolumeFolder 90
Remove-SCVolumeFolder 112
Rename-SCVolumeFolder 125
Set-SCVolumeFolder 147
Compellent Technologies 57
Command Reference
Get-SCVolumeMap
Description
This cmdlet gets volume to server mappings from the Storage Center.
Syntax
Get-SCVolumeMap[[—Index]String][—VolumeIndex UInt32][—ServerIndex
UInt32][—ActiveController UInt32][—LUN UInt32][—ReadOnly Boolean]
[—Status String][—ControllerWWN String][—ServerWWN String]
[—ServerName String][—VolumeName String][—SCVolume SCVolume]
[—SCPort SCPort][—SCServer SCServer][—Connection SCConnection]
[—ConnectionName String]
Parameters
—Index String
Outputs information for mappings with the specified index of the map.
—VolumeIndex UInt32
Outputs information for mappings with the specified index of the volume of the map.
—ServerIndex UInt32
Outputs information for mappings with the specified index of the server to which the vol-
ume is mapped.
—ActiveController UInt32
Outputs information for active mappings on the controller with the specified serial number.
—LUN UInt32
—ReadOnly Boolean
Outputs information for mappings that are read only ($true) or not read only ($false).
—Status String
—ControllerWWN String
Outputs information for mappings that go through a controller with the specified world wide
port name.
—ServerWWN String
Outputs information for mappings that go to a server with the specified world wide port
name.
—ServerName String
Outputs information for mappings with the specified name of the server to which the vol-
ume is mapped.
—VolumeName String
Outputs information for mappings with the specified name of the volume that is mapped.
—SCVolume SCVolume
Outputs information for mappings with the specified volume object that is mapped.
—SCPort SCPort
Outputs information for mappings with the specified controller port through which the vol-
ume is mapped.
—SCServer SCServer
Outputs information for mappings with the specified server object to which the volume is
mapped.
—Connection SCConnection
—ConnectionName String
Return Type
SCVolumeMap
Examples
Example 1
C:\PS>Get-SCVolumeMap -VolumeIndex 4
This command gets all volume mappings for the volume with the index of 4.
Compellent Technologies 59
Command Reference
Related Links
New-SCVolumeMap 92
Remove-SCVolumeMap 114
Get-SCVolume 53
Get-SCServer 45
Get-SCPort 41
Get-Volume
Description
The cmdlet communicates with the Windows Virtual Disk Service to get volume informa-
tion.
Syntax
Parameters
—Server String
—AccessPath String
—Label String
—Status String
—Health String
—State String
—FileSystemType String
—Flag String
—Size String
Compellent Technologies 61
Command Reference
—DiskSerialNumber String
Return Type
DataVolume
Examples
Example 1
This command will get the volume(s) that are on the disk with serial number
0000012d-00001ffc.
Related Links
New-Volume 95
Set-Volume 150
Get-DiskDevice 25
Rescan-DiskDevice 127
Move-SCServer
Description
This cmdlet is used to move a server definition from one server folder to another.
Syntax
Parameters
—Name String
—WorldWideName String
—ParentFolder String
Specifies the name of the server folder in which to move the server.
—ParentSCServerFolder SCServerFolder
—Connection SCConnection
Compellent Technologies 63
Command Reference
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—SCServer SCServer
Return Type
SCServer
Examples
Example 1
This command will move the server "MX01 Node 1" into the "MX01Cluster" server folder.
Related Links
New-SCServerFolder 82
New-SCServer 80
Remove-SCServerFolder 104
Move-SCServerFolder 65
Set-SCServer 135
Move-SCServerFolder
Description
This cmdlet is used to move a server folder from one folder to another.
Syntax
Parameters
—Name String
—Index UInt32
—LogicalPath String
—ParentFolder String
—ParentSCServerFolder SCServerFolder
Specifies the server folder object representing the server folder in which to move this
server folder.
—Connection SCConnection
—ConnectionName String
Compellent Technologies 65
Command Reference
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—SCServerFolder SCServerFolder
Specifies the server folder object representing the server folder to be moved.
Return Type
SCServerFolder
Examples
Example 1
This command moves the server folder named "MX01Cluster" under the "Exchange Serv-
ers" server folder.
Related Links
Move-SCServer 63
Rename-SCServerFolder 121
New-SCServerFolder 82
Set-SCServerFolder 138
Move-SCVolume
Description
The cmdlet is used to move a volume from one volume folder to another.
Syntax
Parameters
—Name String
—ParentFolder String
—ParentSCVolumeFolder SCVolumeFolder
—Connection SCConnection
—ConnectionName String
Compellent Technologies 67
Command Reference
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—SerialNumber String
—SCVolume SCVolume
Return Type
SCVolume
Examples
Example 1
This command moves the volume with the name "MX01 Storage Group 1" into the "MX01
Volumes" volume folder.
Related Links
New-SCVolumeFolder 90
Set-SCVolume 144
Move-SCVolumeFolder 69
Move-SCVolumeFolder
Description
This cmdlet is used to move a volume folder from one folder to another.
Syntax
Parameters
—Name String
—ParentFolder String
Specifies the name of the volume folder in which to move this volume folder.
—ParentSCVolumeFolder SCVolumeFolder
Specifies the volume folder object in which to move this volume folder.
—Connection SCConnection
—ConnectionName String
Compellent Technologies 69
Command Reference
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—SCVolumeFolder SCVolumeFolder
Return Type
SCVolumeFolder
Examples
Example 1
This command moves the "MX01 Volumes" folder into the "Exchange Volumes" folder.
Related Links
Rename-SCVolumeFolder 125
New-SCVolumeFolder 90
Set-SCVolumeFolder 147
Move-SCVolume 67
New-SCCmmCopy
Description
This cmdlet will create a CMM operation on the Storage Center to copy all data from one
volume to another.
Syntax
New-SCCmmCopy[—SourceVolumeName]String
[—DestinationVolumeName]String[—Priority String]
[—CopyReplayHistory][—Connection SCConnection][—ConnectionName
String]
New-SCCmmCopy[—SourceVolumeIndex]UInt32
[—DestinationVolumeIndex]UInt32[—Priority String]
[—CopyReplayHistory][—Connection SCConnection][—ConnectionName
String]
New-SCCmmCopy[—SourceSCVolume]SCVolume
[—DestinationSCVolume]SCVolume[—Priority String]
[—CopyReplayHistory][—Connection SCConnection][—ConnectionName
String]
Parameters
—SourceVolumeName String
—DestinationVolumeName String
—Priority String
Sets the priority of the copy operation. Allowed values are High, Medium, and Low.
—CopyReplayHistory
Whether to copy the replay history or just the current active data.
—Connection SCConnection
—ConnectionName String
Compellent Technologies 71
Command Reference
—SourceVolumeIndex UInt32
—DestinationVolumeIndex UInt32
—SourceSCVolume SCVolume
—DestinationSCVolume SCVolume
Return Type
SCCmm
Examples
Example 1
This command will copy all data from the "SQL Data" volume to the "Copy of SQL Data"
volume.
Related Links
New-SCCmmMigrate 73
New-SCCmmMirror 76
New-SCVolume 87
Set-SCCmm 131
Get-SCCmm 31
Remove-SCCmm 97
New-SCCmmMigrate
Description
This cmdlet will create a CMM operation on the Storage Center to migrate all data from
one volume to another.
Syntax
Parameters
—SourceVolumeName String
—DestinationVolumeName String
—Priority String
Sets the priority of the copy operation. Allowed values are High, Medium, and Low.
—CopyReplayHistory
Specifies whether to copy the replay history or just the current active data.
—DeleteSourceAfterMigrate
Specifies whether to delete the source volume after the migrate has completed.
Compellent Technologies 73
Command Reference
—ReverseMirrorAfterMigrate
—Connection SCConnection
—ConnectionName String
—SourceVolumeIndex UInt32
—DestinationVolumeIndex UInt32
—SourceSCVolume SCVolume
—DestinationSCVolume SCVolume
Return Type
SCCmm
Examples
Example 1
C:\PS>New-SCCmmMigrate -SourceVolumeIndex 5 \
-DestinationVolumeIndex 30 -CopyReplayHistory \
-DeleteSourceAfterMigrate
This command will migrate all data from the volume with index 5 to the volume with the
index 30. Replay information will be migrated to the new volume and the original source
volume will be deleted after all data has been migrated.
Related Links
New-SCCmmCopy 71
New-SCCmmMirror 76
New-SCVolume 87
Set-SCCmm 131
Get-SCCmm 31
Remove-SCCmm 97
Compellent Technologies 75
Command Reference
New-SCCmmMirror
Description
This cmdlet will create a CMM operation on the Storage Center to mirror all data from one
volume to another.
Syntax
Parameters
—SourceVolumeName String
—DestinationVolumeName String
—Priority String
Sets the priority of the copy operation. Allowed values are High, Medium, and Low.
—CopyReplayHistory
Specifies whether to mirror the replay information or just the currently active data.
—Connection SCConnection
—ConnectionName String
—SourceVolumeIndex UInt32
—DestinationVolumeIndex UInt32
—SourceSCVolume SCVolume
—DestinationSCVolume SCVolume
Return Type
SCCmm
Examples
Example 1
This command will mirror data from the volume object stored in the variable $sourceVol-
ume to the volume object stored in the variable $destVolume. Replay information will not
be copied from the source volume to the destination.
Related Links
New-SCCmmCopy 71
New-SCCmmMigrate 73
New-SCVolume 87
Set-SCCmm 131
Get-SCCmm 31
Remove-SCCmm 97
Compellent Technologies 77
Command Reference
New-SCReplay
Description
Syntax
Parameters
—SourceVolumeName String
—MinutesToLive UInt32
—Description String
Specifies a descriptive string to set on the replay. This can be used to help locate replays
at a later time.
—Connection SCConnection
—ConnectionName String
—SourceSCVolume SCVolume
Specifies the volume object representing the volume on which to create the replay.
—SourceVolumeIndex UInt32
Return Type
SCReplay
Examples
Example 1
This command will create a replay on the volume named "SQL Data" and set it to expire in
24 hours.
Related Links
Get-SCReplay 43
Remove-SCReplay 100
Compellent Technologies 79
Command Reference
New-SCServer
Description
Syntax
Parameters
—Name String
—ParentFolder String
Specifies the name of the server folder in which to place this server.
—ParentSCServerFolder SCServerFolder
Specifies the server folder object representing the folder in which to place this folder.
—Notes String
—IPAddress String
Specifies the information IP address to set on the server. Note that this address is not
used for iSCSI connections.
—WorldWideNames String
—iSCSIAddresses String
—Connection SCConnection
—ConnectionName String
Return Type
SCServer
Examples
Example 1
This command will create a new server named "Test Lab Server" and place it in the "Test
Lab" server folder. The iSCSI address 10.10.5.23 will be added to the server. This iSCSI
connection between the server and the Storage Center must occur prior to using the iSCSI
address to define the server.
Related Links
Add-SCServerPort 17
Move-SCServer 63
Remove-SCServer 102
Rename-SCServer 119
Remove-SCServerPort 106
Set-SCServer 135
Get-SCServer 45
Compellent Technologies 81
Command Reference
New-SCServerFolder
Description
The cmdlet is used to create new server folder objects to hold other servers and folders.
Syntax
Parameters
—Name String
—ParentFolder String
Specifies the name of the server folder in which to create this server folder.
—ParentSCServerFolder SCServerFolder
Specifies the server folder object representing the folder in which to create this server
folder.
—Notes String
—Connection SCConnection
—ConnectionName String
Return Type
SCServerFolder
Examples
Example
This command creates a new server folder named "Virtual Servers" in the root of the
server folder tree.
Related Links
Get-SCServerFolder 47
Set-SCServerFolder 138
Remove-SCServerFolder 104
Rename-SCServerFolder 121
Move-SCServer 63
Move-SCServerFolder 65
Compellent Technologies 83
Command Reference
New-SCUser
Description
Allows Admin level users to create new user accounts on the Storage Center.
Syntax
Parameters
—Name String
—Password SecureString
—FullName String
—Privileges String
Specifies the privilege level of the user. Allowed values are Administrator, VolumeMan-
ager, and Reporter.
—UserGroup String
—SessionTimeout UInt32
Sets the System Manager session timeout in minutes. Allowed values are 15, 30, 45, 60,
120, 240, 480, 720, 1440, and 2880.
—Notes String
—BusinessPhone String
—MobilePhone String
—HomePhone String
—Email String
—Email2 String
—Email3 String
—Title String
—Location String
—Department String
—Connection SCConnection
—ConnectionName String
Return Type
SCUser
Examples
Example 1
This command creates a new Volume Manager user account named "dba2" and assigns it
to the "DBAs" user group with a session timeout of two hours.
Compellent Technologies 85
Command Reference
Related Links
Get-SCUser 51
Set-SCUser 141
Remove-SCUser 108
New-SCVolume
Description
Syntax
Parameters
—Name String
—Size String
Specifies the block count or display size to give the volume. Values can be in megabytes
(m), gigabytes (g), or terabytes (t).
—ParentFolder String
Specifies the name of the volume folder in which to create this volume.
—ParentSCVolumeFolder SCVolumeFolder
Specifies the volume folder object representing the folder in which to create this volume.
—Notes String
Compellent Technologies 87
Command Reference
—ReadCacheEnabled Boolean
—ReadAheadCacheEnabled Boolean
—WriteCacheEnabled Boolean
—StorageType String
—SCStorageType SCStorageType
Specifies an SCStorageType object representing the storage type to use for creating the
volume.
—SourceSCReplay SCReplay
—Connection SCConnection
—ConnectionName String
—SourceReplayIndex String
Specifies the index of the replay from which to create this volume.
Return Type
SCVolume
Examples
Example 1
This command creates a new volume named "Backup Data" with the size of 10G.
Example 2
This command creates a new volume from the replay with the index of 8195-655 and
names the volume "Backup volume for SQL Data".
Related Links
Get-SCVolume 53
Get-SCReplay 43
New-SCReplay 78
Move-SCVolume 67
Remove-SCVolume 110
Rename-SCVolume 123
Set-SCVolume 144
New-SCVolumeMap 92
Compellent Technologies 89
Command Reference
New-SCVolumeFolder
Description
This cmdlet creates a new volume folder that can contain other volumes and folders.
Syntax
Parameters
—Name String
—ParentFolder String
Specifies the name of the volume folder in which to create this volume folder.
—ParentSCVolumeFolder SCVolumeFolder
Specifies the volume folder object representing the folder in which to create this volume
folder.
—Notes String
—Connection SCConnection
—ConnectionName String
Return Type
SCVolumeFolder
Examples
Example 1
This command creates a new volume folder named "Test Volumes" in the root of the vol-
ume folders.
Related Links
Get-SCVolumeFolder 56
Remove-SCVolumeFolder 112
Rename-SCVolumeFolder 125
Set-SCVolumeFolder 147
Move-SCVolumeFolder 69
Compellent Technologies 91
Command Reference
New-SCVolumeMap
Description
This cmdlet exposes volumes to servers by creating a path and LUN assignment for a vol-
ume between a controller port and server port.
Syntax
Parameters
—ServerName String
—VolumeName String
—ControllerPorts String
Specifies the controller world wide port name(s) to use for mapping.
—SCPorts SCPort
—ServerWWNs String
—ControllerIndex UInt32
—ReadOnly Boolean
—LUN Int32
—SinglePath
—Connection SCConnection
—ConnectionName String
Compellent Technologies 93
Command Reference
—SCVolume SCVolume
—VolumeIndex UInt32
—ServerIndex UInt32
—SCServer SCServer
Return Type
SCVolumeMap
Examples
Example 1
This command maps the "SQL Data" volume to the "DB01" server.
Related Links
Get-SCVolumeMap 58
Remove-SCVolumeMap 114
Get-SCVolume 53
Get-SCServer 45
Get-SCPort 41
New-Volume
Description
This cmdlet communicates with the Windows Virtual Disk Manager service to create a
new volume on a disk.
Syntax
Parameters
—Server String
—AccessPath String
—DeviceName String
—Size String
Specifies the size of the volume, in blocks, to create. Values can be in megabytes (m),
gigabytes (g), or terabytes (t).
—Label String
—AllocationSize Int32
Sets the allocation size to use when formatting the volume. Allowed values are 512, 1024,
2048, 4096, 8192, 16384, 32768, and 65536.
Return Type
DataVolume
Examples
Example 1
Compellent Technologies 95
Command Reference
This command creates a new volume on the "\\?\PhysicalDrive2" disk device and the label
"Data Volume" is applied to the volume. The next available drive letter will be assigned to
the volume. The volume will use all available space on the disk. The default allocation size
will be used when formatting the volume.
AccessPaths : {F:\}
Label : Data Volume
ByteCount : 10736337408
Size : 10.00 GB
FileSystemType : NTFS
Status : Online
Health : Healthy
State : Stable
DiskSerialNumber : 0000012d-000021f7
Related Links
Get-Volume 61
Set-Volume 150
Get-DiskDevice 25
Rescan-DiskDevice 127
Add-VolumeAccessPath 19
Remove-VolumeAccessPath 117
Get-SCVolume 53
Remove-SCCmm
Description
This cmdlet removes a Copy/Mirror/Migrate from the Storage Center by aborting the oper-
ation.
Syntax
Parameters
—Index UInt32
—SourceVolumeIndex UInt32
Aborts the CMM operation(s) on the source volume with the specied index.
—DestinationVolumeIndex UInt32
Aborts the CMM operation(s) on the destination volume with the specified index.
—ActiveController UInt32
Aborts the CMM operation(s) that are active on the controller with the specified serial num-
ber.
—State String
—SourceVolumeName String
Aborts the CMM operation(s) on the source volume with the specified name.
—DestinationVolumeName String
Aborts the CMM operation(s) on the destination volume with the specified name.
—SourceSCVolume SCVolume
Aborts the CMM operation(s) on the source volume represented by the SCVolume object.
Compellent Technologies 97
Command Reference
—DestinationSCVolume SCVolume
Aborts the CMM operation(s) on the destination volume represented by the SCVolume
object.
—Type String
—Priority String
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
Examples
Example 1
C:\PS>Remove-SCCmm -SourceVolumeIndex 5
This command will abort CMM operations where the source volume index is 5.
Related Links
Get-SCCmm 31
New-SCCmmCopy 71
New-SCCmmMigrate 73
New-SCCmmMirror 76
Set-SCCmm 131
Remove-SCConnection
Description
This cmdlet will remove Storage Center connection settings saved using the -Save param-
eter from Get-SCConnection.
Syntax
Parameters
—Name String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
Examples
Example 1
Related Links
Get-SCConnection 34
Compellent Technologies 99
Command Reference
Remove-SCReplay
Description
This cmdlet will set replays on the Storage Center to expire immediately. The actual expi-
ration time of the replay depends on the state of the replay and whether anything is cur-
rently using that replay.
Syntax
Parameters
—Index String
—FreezeTime String
—ExpireTime String
—SourceVolumeIndex UInt32
Expires the replay(s) on the source volume with the specified index.
—SourceVolumeName String
Expires the replay(s) on the source volume with the specified name.
—CreateSource String
Expires the replay(s) with the specified creation source. The creation source is the means
by which the replay was created, such as System or Application.
—Description String
—State String
—ActiveController UInt32
—SCReplay SCReplay
Expires the replay(s) specified by the replay object representing the replay(s).
—SourceSCVolume SCVolume
Expires the replay(s) specified by the volume object representing the source volume of the
replay.
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
Examples
Example 1
This command will expire the replay with the index of 3468-1531.
Related Links
Get-SCReplay 43
New-SCReplay 78
Remove-SCServer
Description
This cmdlet removes server object definitions from the Storage Center.
Syntax
Parameters
—Name String
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—WorldWideName String
—SCServer SCServer
Return Type
SCServer
Examples
Example 1
This command will delete the server named MX01 in the "Exchange Servers" folder.
Example 2
This command will delete the server definition that contains the world wide name
AC1F642600000000.
Related Links
Add-SCServerPort 17
Get-SCServer 45
New-SCServer 80
Rename-SCServer 119
Remove-SCServerPort 106
Set-SCServer 135
Remove-SCServerFolder
Description
This cmdlet will delete an empty server folder. All server definitions contained by the
server folder must be moved or deleted before a server folder may be deleted.
Syntax
Parameters
—Name String
—Recursive
Deletes all subfolders of the specified folder. Note that all folders must be empty of server
definitions.
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—SCServerFolder SCServerFolder
Examples
Example 1
Example 2
This command will delete the server folder with the index of 3 and any subfolders con-
tained by it.
Related Links
Get-SCServerFolder 47
Move-SCServerFolder 65
Rename-SCServerFolder 121
Set-SCServerFolder 138
Remove-SCServerPort
Description
This cmdlet will remove a fibre channel or iSCSI port from a server definition.
Syntax
Parameters
—Name String
—WorldWideNames String
—iSCSIAddresses String
—Force
Forces the removal. If there are existing volume maps to the port(s) to be removed, they
will be deleted.
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—SCServer SCServer
Removes the port(s) from the specified server represented by the SCServer object.
Examples
Example 1
This command will remove the world wide names AC1F642600000000 and
AC1F642700000000 from the server with the index of 30. Existing volume mappings to
these WWNs will be removed.
Related Links
Add-SCServerPort 17
Get-SCServer 45
Remove-SCServer 102
New-SCServer 80
Set-SCServer 135
Remove-SCUser
Description
This cmdlet allows Admin level users to remove user accounts from the Storage Center.
Syntax
Parameters
—Name String
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
Examples
Example 1
Related Links
New-SCUser 84
Set-SCUser 141
Remove-SCVolume
Description
This cmdlet will delete a volume, removing volume mappings if necessary. The volume
can be placed in the Recycle Bin (default) or permanently deleted.
Syntax
Parameters
—Name String
—SkipRecycleBin
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—SerialNumber String
—SCVolume SCVolume
Examples
Example 1
This command will permanently delete the "LoadSim Volume" in the "Test Lab" volume
folder.
Related Links
Get-SCVolume 53
New-SCVolume 87
Get-SCVolumeMap 58
New-SCVolumeMap 92
Remove-SCVolumeMap 114
Remove-SCVolumeFolder
Description
This cmdlet will delete an empty volume folder. All server definitions contained by the
server folder must be moved or deleted before a server folder may be deleted.
Syntax
Parameters
—Name String
—Recursive
Deletes all subfolders of this folder. Note that all folders must be empty of volumes in order
to be deleted.
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—SCVolumeFolder SCVolumeFolder
Examples
Example 1
This command will delete the volume folder "Test Volumes" and any subfolders within it.
Related Links
Get-SCVolumeFolder 56
Get-SCVolume 53
New-SCVolumeFolder 90
Move-SCVolume 67
Move-SCVolumeFolder 69
Remove-SCVolume 110
Set-SCVolume 144
Set-SCVolumeFolder 147
Remove-SCVolumeMap
Description
Syntax
Parameters
—Index String
—VolumeIndex UInt32
Deletes the map from the volume with the specified index.
—ServerIndex UInt32
—ActiveController UInt32
Deletes the map(s) on the controller with the specified serial number.
—LUN UInt32
—ReadOnly Boolean
Deletes the map(s) that are read only ($true) or are not read only ($false).
—Status String
—ControllerWWN String
Deletes the map(s) using the specified controller word wide port name.
—ServerWWN String
Deletes the map(s) with the specified server world wide port name.
—ServerName String
—VolumeName String
Deletes the map(s) from the volume with the specified name.
—SCVolume SCVolume
Deletes the map(s) from the volume represented by the specified SCVolume object.
—SCPort SCPort
Deletes the map(s) on the specified controller port through which the volume is mapped.
—SCServer SCServer
Deletes the map(s) to the server represented by the specified SCServer object.
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
Examples
Example 1
This command will remove all volume mappings between the volume object is the $vol-
ume variable and the server object in the $server variable.
Example 2
This command will remove all maps to the server with the index of 5 that are in the down
state.
Related Links
Get-SCVolumeMap 58
New-SCVolumeMap 92
Get-SCVolume 53
Get-SCServer 45
Get-SCPort 41
Remove-VolumeAccessPath
Description
This cmdlet communicates with the Virtual Disk Service to remove a volume drive letter or
mount point from a volume.
Syntax
Parameters
—Server String
—AccessPath String
Specifies the drive letter or full path to an empty folder on an NTFS formatted file system.
—Label String
—Status String
—Health String
—State String
—FileSystemType String
—Flag String
—Size String
Specifies the size of the volume in blocks. Values can be in megabytes (m), gigabytes (g),
or terabytes (t).
—Force
Specifies whether to force the path removal even if it is currently being used.
—SerialNumber String
Specifies the source disk drive serial number the volume is on.
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
Return Type
DataVolume
Examples
Example 1
This command will remove the G: drive letter from the volume using the disk with serial
number 0000012d-000021a3 that is 10G in size on the server MX01.
Related Links
Add-VolumeAccessPath 19
Get-Volume 61
Get-DiskDevice 25
New-Volume 95
Rescan-DiskDevice 127
Set-Volume 150
Rename-SCServer
Description
Syntax
Parameters
—Name String
—NewName String
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—WorldWideName String
—SCServer SCServer
Return Type
SCServer
Examples
Example 1
This command will change the name of the "Test Server" server definition to "Production
Server".
Related Links
Get-SCServer 45
New-SCServer 80
Set-SCServer 135
Rename-SCServerFolder
Description
Syntax
Parameters
—Name String
—NewName String
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—SCServerFolder SCServerFolder
Specifies the server folder object representing the server folder to rename.
Return Type
SCServerFolder
Examples
Example 1
This command will rename the server folder "Test Servers" to "Production Servers".
Related Links
Get-SCServerFolder 47
New-SCServerFolder 82
Set-SCServerFolder 138
Rename-SCVolume
Description
Syntax
Parameters
—Name String
—NewName String
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—SerialNumber String
—SCVolume SCVolume
Return Type
SCVolume
Examples
Example 1
This command will rename the "Test Volume" volume to "Production Volume".
Related Links
Get-SCVolume 53
New-SCVolume 87
Set-SCVolume 144
Rename-SCVolumeFolder
Description
Syntax
Parameters
—Name String
—NewName String
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—SCVolumeFolder SCVolumeFolder
Specifies the volume folder object representing the volume folder to rename.
Return Type
SCVolumeFolder
Examples
Example 1
This command will rename the volume folder "Test Volumes" to "Production Volumes".
Related Links
Get-SCVolumeFolder 56
New-SCVolumeFolder 90
Set-SCVolumeFolder 147
Rescan-DiskDevice
Description
This cmdlet communicates with the Virtual Disk Server to cause a rescan for changes to
the disk devices attached to the server.
Syntax
Parameters
—Server String
—RescanDelay Int32
Specifies the number of seconds to wait after initiating the rescan before refreshing disk
information.
Examples
Example 1
C:\PS>Recan-DiskDevice -RescanDelay 20
This command will cause the cmdlet to wait 20 seconds after initiating the rescan before
requesting that the disk information is refreshed.
Related Links
Get-DiskDevice 25
Get-Volume 61
New-Volume 95
Set-DiskDevice
Description
This cmdlet sets the online status of a disk device. Depending on the server's SAN policy
a new disk device may be either online or offline. Set-DiskDevice allows you to switch
between these states.
Syntax
Parameters
—Server String
—BusType String
Specifies the storage bus type of the disk. Some available types are SCSI, FC, and iSCSI.
—Vendor String
—ProductID String
—ProductRevision String
—SerialNumber String
—Status String
—Health String
—Size String
Specifies the size of the disk. Values can be in megabytes (m), gigabytes (g), or terabytes
(t).
—Name String
—AdapterName String
—DeviceName String
Specifies the Windows disk device name used to uniquely identify the disk.
—Online
—ReadOnly Boolean
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Offline
—Flag String
Return Type
DiskDeviceObject
Examples
Example 1
The command will set the disk status of the disk with serial number 0000012d-0000334f to
Offline.
Example 2
The command will set the disk status of the disk with the device name \\?\PhysicalDrive3
to Online.
Related Links
Get-DiskDevice 25
Set-SCCmm
Description
Syntax
Parameters
—Index UInt32
—SourceVolumeIndex UInt32
Specifies the index of the volume that is the source of the CMM.
—DestinationVolumeIndex UInt32
Specifies the index of the volume that is the destination of the CMM.
—ActiveController UInt32
Specifies the controller serial number where the CMM operation is active.
—State String
—SourceVolumeName String
Specifies the name of the volume that is the source of the CMM.
—DestinationVolumeName String
Specifies the name of the volume that is the destination of the CMM.
—SourceSCVolume SCVolume
Specifies the volume object representing the volume that is the source of the CMM.
—DestinationSCVolume SCVolume
Specifies the volume object representing the volume that is the destination of the CMM.
—Type String
—Priority String
Specifies the priority of the CMM. Allowed values are High, Medium, and Low.
—NewPriority String
Sets the new priority to give the CMM. Allowed values are High, Medium, and Low.
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
Return Type
SCCmm
Examples
Example 1
This sets the priority of the CMM with the index of 857 to High.
Related Links
Get-SCCmm 31
Remove-SCCmm 97
Set-SCDisk
Description
This cmdlet sets the attributes of a disk object on the Storage Center.
Syntax
Parameters
—Index UInt32
—Manage
—Unmanage
—ManageSpare
—DiskFolderName String
—DiskFolder SCDiskFolder
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Position String
—SCDisk SCDisk
Return Type
SCDisk
Examples
Example 1
This command will make the disk with index 16 a spare in the Assigned disk folder.
Related Links
Get-SCDisk 36
Set-SCServer
Description
This cmdlet sets attributes of a server definition such as name and its notes.
Syntax
Parameters
—Name String
—NewName String
—ParentFolder String
—ParentSCServerFolder SCServerFolder
Specifies the parent folder object representing the parent folder containing the server.
—Notes String
—IPAddress String
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—WorldWideName String
—SCServer SCServer
Return Type
SCServer
Examples
Example 1
This command will set the notes for the server with the index of 4.
Related Links
Get-SCServer 45
New-SCServer 80
Move-SCServer 63
Rename-SCServer 119
Remove-SCServer 102
Set-SCServerFolder
Description
This cmdlet sets attributes of a server folder object such as name and parent folder.
Syntax
Parameters
—Name String
—NewName String
—ParentFolder String
Specifies the name of the server folder containing this server folder.
—ParentSCServerFolder SCServerFolder
Specifies the server folder object representing the server folder that contains this server
folder.
—Notes String
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—SCServerFolder SCServerFolder
Specifies the server folder object representing the server folder to modify.
Return Type
SCServerFolder
Examples
Example 1
This command will move the "Test Servers" folder under the "Lab Servers" folder.
Related Links
Get-SCServerFolder 47
Move-SCServerFolder 65
New-SCServerFolder 82
Rename-SCServerFolder 121
Remove-SCServerFolder 104
Set-SCUser
Description
This cmdlet sets attributes of user accounts on the Storage Center. This can be used to
set full names, email addresses, and phone numbers.
Syntax
Parameters
—Name String
—FullName String
—Privileges String
Sets the specified privilege level for the user. Allowed values are Administrator, VolumeM-
anager, and Reporter.
—SessionTimeout UInt32
Sets the System Manager session timeout in minutes. Allowed values are 15, 30, 45, 60,
120, 240, 480, 720, 1440, and 2880.
—Notes String
—BusinessPhone String
—MobilePhone String
—HomePhone String
—Email String
—Email2 String
—Email3 String
—Title String
—Location String
—Department String
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
Return Type
SCUser
Examples
Example 1
This command will set the full name, notes, and email address of the user named "jdoe".
Related Links
Get-SCUser 51
New-SCUser 84
Remove-SCUser 108
Set-SCVolume
Description
Syntax
Parameters
—Name String
—NewName String
—Notes String
—ReadCacheEnabled Boolean
When true, enables read cache on the volume. When false, disables read cache on the
volume.
—ReadAheadCacheEnabled Boolean
When true, enables read ahead cache on the volume. When false, disables read ahead
cache on the volume.
—WriteCacheEnabled Boolean
When true, enables write cache on the volume. When false, disables write cache on the
volume.
—ParentFolder String
—ParentSCVolumeFolder SCVolumeFolder
Specifies the SCVolumeFolder object representing the folder under which to move the vol-
ume.
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—SerialNumber String
—SCVolume SCVolume
Return Type
SCVolume
Examples
Example 1
This command will rename the "Test Volume" volume in the "Lab Volumes" folder to "Test
Results".
Related Links
Get-SCVolume 53
Move-SCVolume 67
Rename-SCVolume 123
Remove-SCVolume 110
New-SCVolume 87
Set-SCVolumeFolder
Description
This cmdlets sets attributes of a volume folder such as name and parent folder.
Syntax
Parameters
—Name String
—NewName String
—ParentFolder String
Specifies the name or logical path of the volume folder to place this folder under.
—ParentSCVolumeFolder SCVolumeFolder
Specifies the volume folder object representing the volume folder to place this folder
under.
—Notes String
—Connection SCConnection
—ConnectionName String
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
—Index UInt32
—LogicalPath String
—SCVolumeFolder SCVolumeFolder
Specifies the volume folder object representing the volume folder to modify.
Return Type
SCVolumeFolder
Examples
Example 1
This command sets the notes field of the volume folder named "Test Volumes".
Related Links
Get-SCVolumeFolder 56
Move-SCVolumeFolder 69
New-SCVolumeFolder 90
Rename-SCVolumeFolder 125
Remove-SCVolumeFolder 112
Set-Volume
Description
Syntax
Parameters
—Server String
—AccessPath String
Specifies one of the drive letters or mount points of the volume to modify.
—Label String
—Status String
—Health String
—State String
—FileSystemType String
—Flag String
—Size String
Specifies the size of the volume in blocks. Values can be in megabytes (m), gigabytes (g),
or terabytes (t).
—ReadOnly Boolean
—Hidden Boolean
—ClearShadowFlag
—DiskSerialNumber String
Specifies the serial number of the disk that the volume is on.
—WhatIf
Describes what would happen if you executed the command without actually executing
the command.
—Confirm
Return Type
DataVolume
Examples
Example 1
This command will clear the ReadOnly, Hidden, and ShadowCopy flags from the volume
with drive letter G:\.
Example 2
This command will set the ReadOnly flag on the volume(s) using the disk with serial num-
ber 0000012d-000021a3.
Related Links
Add-VolumeAccessPath 19
Remove-VolumeAccessPath 117
Get-Volume 61
New-Volume 95
Rescan-DiskDevice 127
Get-DiskDevice 25
Get-SCVolume 53
For more information on how to execute a script, see Executing a Script on page 19.
#
# DESC: PowerShell script to create new volumes and a SQL Server database.
#
# NOTE: This script assumes a default Storage Center connection has been
set using the
# cmdlet Get-SCConnection with the -Default switch parameter.
#
param
(
[string] $dbName = (Read-Host -Prompt "Please enter the new database
name"),
[string] $dbScVolumeSize = "100G",
[string] $logScVolumeSize = "10G",
[string] $serverName = (get-wmiobject win32_computersystem).Name,
[string] $storageCenterServerName = $serverName
)
$sqlDataDirectory = "C:\SqlData"
#
# How to handle errors
#
# "SilentlyContinue": do not print, continue
# "Continue": Print, continue (this is the default)
# "Stop": Halt the command or script
# "Inquire": Ask the user what to do
$ErrorActionPreference = "Inquire"
#
# Make sure the necessary snapins are loaded
#
$compSnapinLoaded = $FALSE
$currentSnapins = Get-PSSnapin
#
# Create the database volumes
#
Write-Host "Creating new volume: $dbName DB Volume..." -ForegroundColor
Green
$dbScVolume = New-SCVolume -Name "$dbName DB Volume" -Size $dbScVolumeSize
Write-Host "Creating new volume: $dbName Log Volume..." -ForegroundColor
Green
$logScVolume = New-SCVolume -Name "$dbName Log Volume" -Size
$logScVolumeSize
#
# Map the volumes to the server
#
$null = New-SCVolumeMap -ServerName $storageCenterServerName -VolumeName
$dbScVolume.Name
$null = New-SCVolumeMap -ServerName $storageCenterServerName -VolumeName
$logScVolume.Name
#
# Set up the DB path
#
if (!(Test-Path -Path $sqlDataDirectory))
{
$null = New-Item $sqlDataDirectory -Type Directory
}
#
# Rescan to pick up the changes
#
Write-Host "Rescanning to pick up new device..." -ForegroundColor Green
# Sometimes it takes a couple of rescans before Windows picks up the
# device changes. Retry a few times to give it a chance to find it.
$scancount = 0
do
{
# Rescan the disk
Write-Host "Rescanning server for new volume..." -ForegroundColor Green
Rescan-DiskDevice -Server $servername -RescanDelay 5
$scancount ++
# We can assume if the last one found its device it will have picked up
this one too
$logDisk = Get-DiskDevice -SerialNumber $logScVolume.SerialNumber
# Sometimes Windows gives us multiple disk devices for the same LUN
if ($dbDisk.Count -ne $null)
{
$dbDisk = $dbDisk[0]
}
#
# Create the database
#
Write-Host "Creating database $dbName..." -ForegroundColor Green
$sqlServer = New-Object Microsoft.SqlServer.Management.Smo.Server(".")
$database = New-Object
Microsoft.SqlServer.Management.Smo.Database($sqlServer, $dbName)
#
# DESC: PowerShell script to create new volumes and an Exchange 2007 mailbox
storage group.
#
# NOTE: This script assumes a default Storage Center connection has been
set using the
# cmdlet Get-SCConnection with the -Default switch parameter.
#This script will currently only work with a non-clustered Exchange server.
#
param
(
[string] $storageGroupName = (Read-Host -Prompt "Please enter the new
storage group name"),
[string] $databaseName = "$storageGroupName DB 1",
[string] $dbScVolumeSize = "200G",
[string] $logScVolumeSize = "20G",
[string] $serverName = (get-wmiobject win32_computersystem).Name,
[string] $storageCenterServerName = $serverName
)
#
# How to handle errors
#
# "SilentlyContinue": do not print, continue
# "Continue": Print, continue (this is the default)
# "Stop": Halt the command or script
# "Inquire": Ask the user what to do
$ErrorActionPreference = "Inquire"
#
# Make sure the necessary snapins are loaded
#
$compSnapinLoaded = $FALSE
$exchSnapinLoaded = $FALSE
$currentSnapins = Get-PSSnapin
#
# Create the storage group volumes
#
Write-Host "Creating new volume: $storageGroupName DB Volume..." -
ForegroundColor Green
$dbScVolume = New-SCVolume -Name "$storageGroupName DB Volume" -Size
$dbScVolumeSize
Write-Host "Creating new volume: $storageGroupName Log Volume..." -
ForegroundColor Green
$logScVolume = New-SCVolume -Name "$storageGroupName Log Volume" -Size
$logScVolumeSize
#
# Map the volumes to the server
#
$null = New-SCVolumeMap -ServerName $storageCenterServerName -VolumeName
$dbScVolume.Name
$null = New-SCVolumeMap -ServerName $storageCenterServerName -VolumeName
$logScVolume.Name
#
# Set up the DB path
#
if (!(Test-Path -Path "C:\ExchangeData"))
{
$null = New-Item "C:\ExchangeData" -Type Directory
}
#
# Rescan to pick up the changes
#
Write-Host "Rescanning to pick up new device..." -ForegroundColor Green
# Sometimes it takes a couple of rescans before Windows picks up the
# device changes. Retry a few times to give it a chance to find it.
$scancount = 0
do
{
# Rescan the disk
Write-Host "Rescanning server for new volume..." -ForegroundColor Green
Rescan-DiskDevice -Server $servername -RescanDelay 5
$scancount ++
# We can assume if the last one found its device it will have picked up
this one too
$logDisk = Get-DiskDevice -SerialNumber $logScVolume.SerialNumber
# Sometimes Windows gives us multiple disk devices for the same LUN
if ($dbDisk.Count -ne $null)
{
$dbDisk = $dbDisk[0]
}
#
# Create the storage group
#
Write-Host "Creating storage group $storageGroupName..." -ForegroundColor
Green
$sg = new-StorageGroup -Server $serverName -Name $storageGroupName -
LogFolderPath "C:\ExchangeData\$storageGroupName\Logs" -SystemFolderPath
"C:\ExchangeData\$storageGroupName"
#
# DESC: PowerShell script to create new user account for everyone in a user
group.
#
# NOTE: This script assumes a default Storage Center connection has been
set using the
# cmdlet Get-SCConnection with the -Default switch parameter.
#
param
(
[string] $groupName = "Domain Admins"
)
$root = [adsi]""
$rootdn = $root.distinguishedName
$group = [adsi]("LDAP://cn=$groupName, cn=Users," + $rootdn)
Push to Tape
# Copyright (c) 2008 Compellent Technologies. All rights reserved.
#
# THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE
ENTIRE RISK
# OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.
#
#
# DESC: PowerShell script to expose replay to a backup server for offloading
backup to tape.
#
param
(
[string] $servername = $(Read-Host -Prompt "Please enter the server name"),
[string] $volumename = $(Read-Host -Prompt "Please enter the name of the
volume"),
[string] $accesspath = $(Read-Host -Prompt "Please enter the drive letter
or mount point to use")
)
# Create View
$newreplayname = "$volumename View " + $latestreplay.Index
Write-Host "Creating view from replay..."
$replayview = New-SCVolume -SourceReplay $latestreplay -Name
$newreplayname
# Rescan Server
Write-Host "Rescanning server for new replay volume..."
Rescan-DiskDevice -Server $servername -RescanDelay 5