Sei sulla pagina 1di 174

Storage Center

Command Set 4.1


for Windows PowerShellTM

User Guide
Storage Center Command Set 4.1 for Windows PowerShell

680-037-001 A

Revision Date Description


A 10/16/08 Initial Release.

Disclaimers

Information in this document is subject to change without notice.

Trademarks and Copyright

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

Compellent Technologies iii


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
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

iv Storage Center Command Set 4.1 for Windows PowerShell


Set-Volume 150

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.

Contacting Copilot Services


If you need assistance, contact Copilot Services by phone or email:

• support@compellent.com
• 1-866-397-8673

For general information on Compellent products, visit www.compellent.com

For downloads and technical tips, log on to the Compellent Knowledge Center at the fol-
lowing address:

http://knowledgecenter.compellent.com

Compellent Technologies vii


Preface

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

viii Storage Center Command Set 4.1 for Windows PowerShell


1 Getting Started

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:

• Windows Vista, Windows Server 2003, or Windows Server 2008

• .Net Framework 2.0

• Windows PowerShell 1.0

• Storage Center 4.0 and later. For information on setting up a Storage Center, see
the Storage Center System Setup Guide.

Installation and Setup

Installing the Storage Center Command Set


To install the Storage Center Command Set:

1. If necessary, download and install Windows PowerShell from the Microsoft Website.

2. Run the Storage Center Command Set InstallShield Wizard.

a. Double-click the Storage Center Command Set setup file. The InstallShield
Wizard appears:

b. Follow the instructions in the InstallShield Wizard to complete Installation.

2 Storage Center Command Set 4.1 for Windows PowerShell


Using the Storage Center Command Set

Using the Storage Center Command Set


There are two ways to use the Storage Center Command Set.

Storage Center Command Set Shell

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.

Increasing PowerShell Speed (Optional)


The Microsoft PowerShell team blog provides a script that can be used to increase the
speed of PowerShell. Download the script from the following link:

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.

4 Storage Center Command Set 4.1 for Windows PowerShell


PowerShell Objects

PowerShell Objects

About PowerShell Objects


Windows PowerShell command parameters, including those available with the Storage
Center Command Set, accept objects as arguments. These include standard objects such
as string and integer objects, as well as Storage Center-specific objects.

Storing Objects in Variables


Objects can be created and stored in variables. For example, an SCVolume object can be
created and stored in a variable using the Get-SCVolume command:

$myvolume = Get-SCVolume -Name “My Volume”

This SCVolume object can then be used with the Move-SCVolume command parameter,
SCVolume:

Move-SCVolume -ParentFolder “My Volume Folder” -SCVolume \


$myvolume

Accessing Object Information


You can use the Get-Member command to access object information. The Get-Member
command accepts pipeline input from commands that return objects. For example, the
Get-SCVolume command returns an SCVolume object. To view SCVolume object infor-
mation, type the following:

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:

Get-SCVolume -Name “My Volume 1”


UInt32 Represents a 32-bit unsigned integer. Unsigned inte-
gers cannot be negative.
UInt64 Represents a 64-bit unsigned integer. Unsigned inte-
gers cannot be negative.

6 Storage Center Command Set 4.1 for Windows PowerShell


Connecting to a Storage Center

Connecting to a Storage Center

Creating SecureString Passwords


SecureString objects are used in PowerShell cmdlets as a security measure. Secure-
Strings are encrypted in memory and the content of SecureString variables cannot be
printed. For this reason SecureString objects are commonly used for sensitive information
like passwords. Below are some ways to create SecureStrings objects for use with Power-
Shell cmdlets.

Interactive Input

You can create a variable with SecureString content by entering the following command in
the PowerShell console:

$pass = Read-Host -AsSecureString -Prompt "Please provide \


password"

The PowerShell console will return the following:

Please provide password:

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:

$pass = ConvertTo-SecureString "mypassword" -AsPlainText -Force

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.

To store your password in an encrypted file:

1. Enter the following command:

$pass = Read-Host -AsSecureString -Prompt "Please provide\


password"

2. PowerShell prompts you for a password.

Please provide password:

3. Enter your password.

Compellent Technologies 7
Getting Started

4. Save your password to a text file.

ConvertFrom-SecureString $pass > C:\password.txt

A script can now access this file using the following command:

$pass = ConvertTo-SecureString (Get-Content C:\password.txt)

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).

Storing Connection Information in a Variable

You can store Storage Center connection information in a variable. For example:

$connection = Get-SCConnection -HostName mmt1 -User Admin \


-Password $pass

You can then use a command’s -Connection option to connect to a Storage Center. For
example:

Get-SCVolume -Connection $connection

Specifying a Connection Name

You can use the -Save parameter with Get-SCConnection to store connection informa-
tion as a connection name. For example:

Get-SCConnection -HostName mmt1 -User Admin -Password $pass \


-Save connectionname

You can then use a command’s -ConnectionName parameter to connect to a Storage


Center. For example:

Get-SCVolume -ConnectionName connectionname

Entering Connection Information Interactively

If you use Get-SCConnection without certain required parameters (-HostName, -User,


-Password), you will be prompted to enter this information. This method still requires stor-
ing connection information in a variable or as a connection name.

Using the Default Connection

To create a default Storage Center connection, use the -Save and -Default parameters
with Get-SCConnection. For example:

Get-SCConnection -HostName mmt1 -User Admin -Password $pass \


-Save defaultconnection -Default

8 Storage Center Command Set 4.1 for Windows PowerShell


Executing Commands

Executing Commands

Executing Single Commands


Windows PowerShell provides an interactive command prompt that can be used to exe-
cute single commands.

Open the Storage Center Command Set Shell and type a single command. For example:

Get-SCConnection -HostName mmt1 -User Admin -Password $pass

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:

• Include one command per line.

• 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.

Follow these guidelines for running a script:

• Specify the entire file path of your script.

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”

• To run a script from the current directory, use .\:

.\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

Formatting and Exporting Command Output


Windows PowerShell provides commands that can either format the way information
appears in the console or export information to an xml, csv, or text file. These commands
accept the output of other commands as input via the pipeline.

Formatting Command Output in the Console

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:

Get-SCVolume -Name MyVolume|Format-List

For more information on displaying information in the console, type the following:

Get-Help about_display

Exporting Command Output to a File

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.

Saving information in an xml file:

Get-SCVolume -Name MyVolume|Export-Clixml -path \


“C:\volumeInformation\MyVolume.xml”

Saving information in a csv file:

Get-SCVolume -Name MyVolume|Export-Csv -path \


“C:\volumeInformation\MyVolume.csv”

Saving information as a text file:

Get-SCVolume -Name MyVolume|Format-List|Out-File -filePath \


“C:\volumeInformation\MyVolume.txt”

10 Storage Center Command Set 4.1 for Windows PowerShell


Getting Command Line Help

Getting Command Line Help


You can get help information for each cmdlet in the Storage Center Command Set Shell by
using the Get-Help command. For example:

Get-Help Get-SCVolume

This will return the following information:

• Name

• Synopsis

• Syntax

• Detailed description

• Related Links

• Remarks

You can view additional information for a command by using the -detailed option. For
example:

Get-Help Get-SCVolume -detailed

This will return the following additional information:

• Parameters

• Examples

To view all help information available for a command, use the -full option. For example:

Get-Help Get-SCVolume -full

To view a list of all available Storage Center Command Set cmdlets, type the following:

Get-Command -PSSnapin Compellent.StorageCenter.Scripting

Compellent Technologies 11
Getting Started

Common Command Parameters


Storage Center Command Set commands make use of some common Windows Power-
Shell parameters.

Standard Common Parameters


Some Storage Center Command Set commands as well as some Windows PowerShell
commands make use of the following common parameters:

• —Verbose

• —Debug

• —ErrorAction

• —ErrorVariable

• —OutVariable

For more information on these parameters, type the following:

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:

Remove-SCVolume -Name MyVolume -WhatIf

The following message is then printed to the console:

What if: Performing operation “remove volume object” on Target


“MyVolume [1729]”

—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

12 Storage Center Command Set 4.1 for Windows PowerShell


2 Command Reference

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

14 Storage Center Command Set 4.1 for Windows PowerShell


Acknowledge-SCAlert

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

Acknowledge-SCAlert [[—Index] String] [—Controller UInt32] [—Status


String] [—Message String] [—Category String] [—AlertObject String ]
[—Type String] [—Connection SCConnection] [—ConnectionName String]
[—WhatIf] [—Confirm]

Parameters

—Index String

Specifies the object index of the alert to acknowledge.

—Controller UInt32

Acknowledges alerts on the source controller specified.

—Status String

Acknowledges alerts with the specified status.

—Message String

Acknowledges alerts with the specified message.

—Category String

Acknolwedges alerts in the specified category.

—AlertObject String

Acknolwedges alerts with the specified alert object.

—Type String

Acknolwedges alerts with the specified alert type.

—Connection SCConnection

Specifies a Storage Center connection object.

Compellent Technologies 15
Command Reference

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

Examples

Example 1

C:\PS>Acknowledge-SCAlert -Index 3302-19

This command acknowledges the specific alert identified by index 3302-19.

Example 2

C:\PS>Acknowledge-SCAlert -Category System -Controller 3302

This command will acknowledge all alerts on the controller with serial number 3302 that
are categorized as System.

Related Links

Get-SCAlert 29

16 Storage Center Command Set 4.1 for Windows PowerShell


Add-SCServerPort

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

Add-SCServerPort [—Name] String [—WorldWideNames String]


[—iSCSIAddresses String] [—Connection SCConnection]
[—ConnectionName String]

Add-SCServerPort [—Index] UInt32 [—WorldWideNames String]


[—iSCSIAddresses String] [—Connection SCConnection]
[—ConnectionName String]

Add-SCServerPort [—LogicalPath] String [—WorldWideNames String]


[—iSCSIAddresses String] [—Connection SCConnection]
[—ConnectionName String]

Add-SCServerPort —SCServer SCServer [—WorldWideNames String]


[—iSCSIAddresses String] [—Connection SCConnection]
[—ConnectionName String]

Parameters

—Name String

Specifies the name of the server definition to be modified.

—WorldWideNames String

Specifies the WWNs to be added to the server.

—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

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Compellent Technologies 17
Command Reference

—Index UInt32

Specifies the server index of the server definition to be modified.

—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

Specifies a server definition object returned by New-SCServer or Get-SCServer.

Return Type

SCServer

Examples

Example 1

C:\PS>Add-SCServerPort -Name MX01 -WorldWideNames \


"2000000E08B19871A,200100E8B39871A"

This command adds two world wide names to the server definition of the server named
"MX01".

Example 2

C:\PS>Add-SCServerPort -Index 4 -iSCSIAddresses 10.10.1.240

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

18 Storage Center Command Set 4.1 for Windows PowerShell


Add-VolumeAccessPath

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

Add-VolumeAccessPath [—Server String] [—AccessPath String] [—Label


String] [—Status String] [—Health String] [—State String]
[—FileSystemType String] [—Flag String] [—Size String]
[—SerialNumber String] [—WhatIf] [—Confirm]

Parameters

—Server String

Specifies the server on which to perform the operation.

—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

Prompts you for confirmation before executing the command.

Return Type

DataVolume

Examples

Example 1

C:\PS>Add-VolumeAccessPath -Server MX01 -SerialNumber \


0000012d-00001fcf -AccessPath C:\StorageGroups\VIP\Logs

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 : {}

20 Storage Center Command Set 4.1 for Windows PowerShell


Related Links

Related Links

Remove-VolumeAccessPath 117
New-Volume 95
Set-Volume 150
Get-SCVolume 53

Compellent Technologies 21
Command Reference

Expand-SCVolume

Description

This cmdlet expands a Storage Center by adding additional reported capacity.

Syntax

Expand-SCVolume [—Name] String [[—NewSize] String][[—ExpandBy]


String] [—Connection SCConnection] [—ConnectionName String]
[—WhatIf] [—Confirm]

Expand-SCVolume —Index UInt32 [[—NewSize] String] [[—ExpandBy]


String] [—Connection SCConnection] [—ConnectionName String]
[—WhatIf] [—Confirm]

Expand-SCVolume —LogicalPath String [[—NewSize] String]


[[—ExpandBy] String] [—Connection SCConnection] [—ConnectionName
String] [—WhatIf] [—Confirm]

Expand-SCVolume —SerialNumber String [[—NewSize] String]


[[—ExpandBy] String] [—Connection SCConnection] [—ConnectionName
String] [—WhatIf] [—Confirm]

Expand-SCVolume —SCVolume SCVolume [[—NewSize] String] [[—ExpandBy]


String] [—Connection SCConnection] [—ConnectionName String]
[—WhatIf] [—Confirm]

Parameters

—Name String

Specifies the name of the volume to expand.

—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

Specifies a Storage Center connection object.

22 Storage Center Command Set 4.1 for Windows PowerShell


—ConnectionName String

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

—Index UInt32

Specifies the index of the volume to expand.

—LogicalPath String

Specifies the logical path to the volume to expand.

—SerialNumber String

Specifies the serial number of the volume to expand.

—SCVolume SCVolume

Specifies an SCVolume object representing the volume to expand.

Return Type

SCVolume

Examples

Example 1

C:\PS>Expand-SCVolume -Name "SQL Data" -NewSize 50g

This command expands the volume named "SQL Data" to 50G.

Example 2

C:\PS>Expand-SCVolume -LogicalPath "DB01 Volumes\SQL Data" \


-ExpandBy 5G

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

24 Storage Center Command Set 4.1 for Windows PowerShell


Get-DiskDevice

Get-DiskDevice

Description

This cmdlet retrieves disk drive information from the Windows Virtual Disk Service.

Syntax

Get-DiskDevice [—Server String] [—BusType String] [—Vendor String]


[—ProductID String] [—ProductRevision String]
[[—SerialNumber]String] [—Status String] [—Health String] [—Size
String] [—Name String] [—AdapterName String] [—DeviceName String]
[—Flag String]

Parameters

—Server String

Outputs information for disks on the specified server.

—BusType String

Outputs information for disks with the specified storage bus type. Available storage bus
types include SCSI, FC, and iSCSI

—Vendor String

Outputs information for disks reporting the specified vendor name.

—ProductID String

Outputs information for a disk reporting the specified product ID.

—ProductRevision String

Outputs information for disks reporting the specified product revision.

—SerialNumber String

Outputs information for a disk with the specified serial number.

—Status String

Outputs information for disks with the specified status.

—Health String

Outputs information for disks with the specified health.

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

Outputs information for a disk with the specified name.

—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

Outputs information for disks with the specified flag.

Return Type

DiskDeviceObject

Examples

Example 1

C:\PS>Get-DiskDevice -SerialNumber 0000012d-000021f7

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.

Name : COMPELNT Compellent Vol SCSI Disk Device


DeviceName : \\?\PhysicalDrive2
Vendor : COMPELNT
ProductID : Compellent Vol
ProductRevision : 0400
SerialNumber : 0000021d-000032f7
Status : Online
Health : Healthy
ByteCount : 10737418240
Size : 10.00 GB
FreeByteCount : 10737418240
FreeSize : 10.00 GB
AdapterName : Microsoft iSCSI Initiator
BusType : iSCSI

26 Storage Center Command Set 4.1 for Windows PowerShell


Related Links

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

Get-NextFreeDriveLetter [[—Server] String]

Parameters

—Server String

Specifies the server on which to perform the operation.

Return Type

String

Examples

Example 1

C:\PS>Get-NextFreeDriveLetter -Server MX01

The command will get the next available drive letter on the server MX01. G:

28 Storage Center Command Set 4.1 for Windows PowerShell


Get-SCAlert

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

Get-SCAlert [[—Index] String] [—Controller UInt32] [—Status String]


[—Message String] [—Category String] [—AlertObject String] [—Type
String] [—Connection SCConnection] [—ConnectionName String]

Parameters

—Index String

Outputs information on an alert with the specified index.

—Controller UInt32

Outputs information on alerts generated from the specified controller.

—Status String

Outputs information on alerts with the specified status.

—Message String

Outputs information on alerts with the specified message.

—Category String

Outputs information on alerts in the specified category.

—AlertObject String

Outputs information on alerts generated for the specified object.

—Type String

Outputs information on alerts of a specified type.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Compellent Technologies 29
Command Reference

Return Type

SCAlert

Examples

Example 1

C:\PS>Get-SCAlert -Controller 3301

This command will return information for all alerts that were generated on the controller
with serial number 3301.

Related Links

Acknowledge-SCAlert 15

30 Storage Center Command Set 4.1 for Windows PowerShell


Get-SCCmm

Get-SCCmm

Description

This cmdlet will retrieve Copy, Mirror, and Migrate operations from the Storage Center.

Syntax

Get-SCCmm [[—Index] UInt32] [—SourceVolumeIndex UInt32]


[—DestinationVolumeIndex UInt32] [—ActiveController UInt32] [—State
String] [—SourceVolumeName String] [—DestinationVolumeName String]
[—SourceSCVolume SCVolume] [—DestinationSCVolume SCVolume] [—Type
String] [—Priority String] [—Connection SCConnection]
[—ConnectionName String]

Parameters

—Index UInt32

Specifies the CMM index.

—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

Specifies the controller serial number on which the CMM is active.

—State String

Specifies the state of the CMM.

—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

Specifies the type of CMM.

—Priority String

Specifies the priority of the CMM.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Return Type

SCCmm

Notes

The Get-SCCmm command returns a SCCmm object while a CMM operation is in


progress. However, this command returns nothing if the CMM operation has completed by
the time the Get-SCCmm command runs.

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

32 Storage Center Command Set 4.1 for Windows PowerShell


Get-SCCommandSetVersion

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

The Get-SCConnection cmdlet is used to establish connection credentials to a Storage


Center system. This connection is used for all other Storage Center cmdlets that commu-
nicate with the Storage Center. Connection information can be named and saved for future
named reference.

Syntax

Get-SCConnection [—HostName] String [—User] String [—Password]


SecureString [[—Save] String] [—Default]

Get-SCConnection [—Name] String [—Default]

Parameters

—HostName String

Specifies the fully qualified DNS name or IP Address of Storage Center.

—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

Specifies the name of a saved connection configuration.

Return Type

SCConnection

34 Storage Center Command Set 4.1 for Windows PowerShell


Examples

Examples

Example 1

C:\PS>$connection = Get-SCConnection -HostName comp1 -User \


Admin -Password $password

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

C:\PS>Get-SCConnection -HostName comp1 -User Admin -Password \


$pass -Save comp1

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

C:\PS>Get-SCConnection -Name comp1 -Default

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

Get-SCDisk [—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]

Parameters

—Position String

Specifies the position of the disk.

—Index UInt32

Specifies the disk object index.

—Status String

Specifies the status of the disk.

—Health String

Specifies the health of the disk.

—ControlType String

Specifies the control type of the disk (Managed, Unmanaged, etc.).

—DiskFolder String

Specifies the disk folder that contains the disk.

—LogicalPath String

Specifies the logical path of the disk.

—Classification String

Specifies the classification of the disk.

36 Storage Center Command Set 4.1 for Windows PowerShell


—Notes String

—Notes String

Specifies the notes set on the disk.

—Enclosure String

Specifies the enclosure that contains the disk.

—TotalBlocks UInt64

Specifies the total number of blocks on the disk.

—UnallocatedBlocks UInt64

Specifies the total number of unallocated blocks on the disk.

—Vendor String

Specifies the disk vendor.

—Product String

Specifies the disk product name.

—SerialNumber String

Specifies the disk serial number.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Return Type

SCDisk

Examples

Example 1

C:\PS>Get-SCDisk -DiskFolder External

This command will get all disks from the Storage Center that are in the External disk folder
(replications).

Example 2

C:\PS>Get-SCDisk -ControlType Unassigned

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

38 Storage Center Command Set 4.1 for Windows PowerShell


Get-SCDiskFolder

Get-SCDiskFolder

Description

This cmdlet gets disk folder information from the Storage Center. Disk folders are logical
containers for disk objects.

Syntax

Get-SCDiskFolder [[—Name] String] [—Notes String] [—Connection


SCConnection] [—ConnectionName String]

Get-SCDiskFolder [—Index UInt32] [—Notes String] [—Connection


SCConnection] [—ConnectionName String]

Get-SCDiskFolder [—Notes String] [—Connection SCConnection]


[—ConnectionName String]

Parameters

—Name String

Outputs information for a disk folder with the specified name.

—Notes String

Outputs information for a disk folder with the specified notes.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—Index UInt32

Outputs information for a disk folder with the specified index.

Return Type

SCDiskFolder

Compellent Technologies 39
Command Reference

Examples

Example 1

C:\PS>Get-SCDiskFolder -Name Assigned

This command gets the disk folder with the name "Assigned".

Related Links

Get-SCDisk 36

40 Storage Center Command Set 4.1 for Windows PowerShell


Get-SCPort

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

Get-SCPort [—Index UInt32] [—WorldWideName String] [—Type String]


[—Description String] [—Status String] [—FaultDomain UInt32]
[—MapCount UInt32] [—Slot UInt32] [—Port UInt32] [—Controller
UInt32] [—OriginalController UInt32] [—Connection SCConnection]
[—ConnectionName String]

Parameters

—Index UInt32

Outputs information for a port with the specified index.

—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

Outputs information for ports with the specified status.

—FaultDomain UInt32

Outputs information for ports with the specified fault domain.

—MapCount UInt32

Outputs information for ports with the specified number of existing volume maps.

—Slot UInt32

Outputs information for ports on the specified controller slot.

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

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Return Type

SCPort

Examples

Example 1

C:\PS>Get-SCPort -Type iSCSI

This command will get all iSCSI target ports from the Storage Center.

Example 2

C:\PS>Get-SCPort -Controller 3301

This command will get all port information on the controller with serial number 3301.

Related Links

New-SCVolumeMap 92

42 Storage Center Command Set 4.1 for Windows PowerShell


Get-SCReplay

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

Get-SCReplay [—Index String] [—FreezeTime String] [—ExpireTime


String] [—SourceVolumeIndex UInt32] [—SourceVolumeName String]
[—CreateSource String] [—Description String] [—State String]
[—ActiveController UInt32] [—SourceSCVolume SCVolume] [—Connection
SCConnection] [—ConnectionName String]

Parameters

—Index String

Outputs information for a replay with the specified index.

—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

Outputs information for replays with the specified description.

Compellent Technologies 43
Command Reference

—State String

Outputs information for replays in the specified state.

—ActiveController UInt32

Outputs information for replays on the specified controller where the replay is active.

—SourceSCVolume SCVolume

Outputs information for replays with the specified source volume.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Return Type

SCReplay

Examples

Example 1

C:\PS>Get-SCReplay -SourceVolumeName "SQL Data" -State Frozen

This command will output the frozen (not currently active) replays for the "SQL Data" vol-
ume.

Example 2

C:\PS>Get-SCReplay -CreateSource Application -State Frozen /


-SourceVolumeIndex 8195 | where { $_.Description -match /
"VSSSnapshot" }

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

44 Storage Center Command Set 4.1 for Windows PowerShell


Get-SCServer

Get-SCServer

Description

This cmdlet gets server definitions from the Storage Center.

Syntax

Get-SCServer [[—Name]String] [—Index UInt32] [—ParentFolder


String] [—LogicalPath String] [—Notes String] [—WorldWideName
String] [—IPAddress String] [—Connection SCConnection]
[—ConnectionName String]

Parameters

—Name String

Outputs information for a server with the specified name.

—Index UInt32

Outputs information for a server with the specified index.

—ParentFolder String

Outputs information for servers within the specified server folder.

—LogicalPath String

Outputs information for a server with the specified logical path.

—Notes String

Outputs information for servers with the specified notes.

—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

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Compellent Technologies 45
Command Reference

Return Type

SCServer

Examples

Example 1

C:\PS>Get-SCServer -Name MX01

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

46 Storage Center Command Set 4.1 for Windows PowerShell


Get-SCServerFolder

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

Get-SCServerFolder [[—Name]String] [—Index UInt32] [—ParentFolder


String] [—LogicalPath String] [—Notes String] [—Connection
SCConnection] [—ConnectionName String]

Parameters

—Name String

Outputs information for a server folder with the specified name.

—Index UInt32

Outputs information for a server folder with the specified index.

—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

Outputs information for server folders with the specified notes.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Return Type

SCServerFolder

Compellent Technologies 47
Command Reference

Examples

Example 1

C:\PS>Get-SCServerFolder -Name "MX01 Cluster"

This command gets the server folder named "MX01 Cluster".

Related Links

New-SCServerFolder 82
Remove-SCServerFolder 104
Rename-SCServerFolder 121
Set-SCServerFolder 138

48 Storage Center Command Set 4.1 for Windows PowerShell


Get-SCStorageType

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

Get-SCStorageType [—Index String] [—DiskFolderIndex String]


[[—Name]String] [—PageSize String] [—DiskFolderName String]
[—Redundancy String] [—Connection SCConnection] [—ConnectionName
String]

Parameters

—Index String

Specifies the index of the storage type.

—DiskFolderIndex String

Specifies the index of the disk folder used for this storage type.

—Name String

Specifies the name of the storage type.

—PageSize String

Specifies the data page size of the storage type.

—DiskFolderName String

Specifies the name of the disk folder used for this storage type.

—Redundancy String

Specifies the redundancy used for the storage type.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Compellent Technologies 49
Command Reference

Return Type

SCStorageType

Examples

Example 1

C:\PS>Get-SCStorageType -DiskFolderName Assigned

The command will get all available storage types using the disk folder "Assigned" for its
storage.

Related Links

Get-SCDiskFolder 39

50 Storage Center Command Set 4.1 for Windows PowerShell


Get-SCUser

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

Get-SCUser [[—Name] String] [—FullName String] [—Privileges String]


[—UserGroup String] [—Title String] [—Location String] [—Department
String] [—Connection SCConnection] [—ConnectionName String]

Get-SCUser [—Index UInt32] [—FullName String] [—Privileges String]


[—UserGroup String] [—Title String] [—Location String] [—Department
String] [—Connection SCConnection] [—ConnectionName String]

Parameters

—Name String

Outputs information for a user with the specified name.

—FullName String

Outputs information for a user with the specified full name.

—Privileges String

Outputs information for users with the specified priveleges.

—UserGroup String

Outputs information for users belonging to the specified user group.

—Title String

Outputs information for users with the specified title.

—Location String

Outputs information for users with the specified location.

—Department String

Outputs information for users in the specified department.

—Connection SCConnection

Specifies a Storage Center connection object.

Compellent Technologies 51
Command Reference

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—Index UInt32

Outputs information for a user with the specified index.

Return Type

SCUser

Examples

Example 1

C:\PS>Get-SCUser -Privileges VolumeManager

This command will get user information for all Volume Manager users.

Related Links

New-SCUser 84
Remove-SCUser 108
Set-SCUser 141

52 Storage Center Command Set 4.1 for Windows PowerShell


Get-SCVolume

Get-SCVolume

Description

The cmdlet can be used to retrieve volume object information from the Storage Center.

Syntax

Get-SCVolume [[—Name]String] [—Index UInt32] [—ParentFolder String]


[—LogicalPath String] [—Notes String] [—Size String]
[—ReadCacheEnabled Boolean] [—ReadAheadCacheEnabled Boolean]
[—WriteCacheEnabled Boolean] [—ActiveController UInt32] [—Status
String] [—SerialNumber String] [—StorageType String] [—IsReplicated
Boolean] [—IsCopying Boolean] [—IsMirrored Boolean] [—Connection
SCConnection] [—ConnectionName String]

Parameters

—Name String

Outputs information for a volume with the specified name.

—Index UInt32

Outputs information for a volume with the specified index.

—ParentFolder String

Outputs information for volumes within the specified volume folder.

—LogicalPath String

Outputs information for a volume with the specified logical path.

—Notes String

Outputs information for volumes with the specified notes.

—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

Outputs information for a volume with the specified serial number.

—StorageType String

Outputs information for volumes using the specified storage type.

—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

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Return Type

SCVolume

Examples

Example 1

C:\PS>Get-SCVolume -IsReplicated $true

This command will get all volumes that are being replicated to another system.

54 Storage Center Command Set 4.1 for Windows PowerShell


Example 2

Example 2

C:\PS>Get-SCVolume -LogicalPath "DB01\SQL Data"

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

Get-SCVolumeFolder [[—Name]String] [—ParentFolder String]


[—LogicalPath String] [—Notes String] [—Connection SCConnection]
[—ConnectionName String]

Get-SCVolumeFolder [—Index UInt32] [—ParentFolder String]


[—LogicalPath String] [—Notes String] [—Connection SCConnection]
[—ConnectionName String]

Parameters

—Name String

Outputs a volume folder with the specified name.

—ParentFolder String

Outputs volume folders within the specified volume folder.

—LogicalPath String

Outputs a volume folder with the specified logical path.

—Notes String

Outputs volume folders with the specified notes.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—Index UInt32

Outputs a volume folder with the specified index.

Return Type

SCVolumeFolder

56 Storage Center Command Set 4.1 for Windows PowerShell


Examples

Examples

Example 1

C:\PS>Get-SCVolumeFolder -Name DB01

This command will get the volume folder named "DB01".

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

Outputs information for mappings with the specified LUN.

—ReadOnly Boolean

Outputs information for mappings that are read only ($true) or not read only ($false).

—Status String

Outputs information for mappings with the specified status.

—ControllerWWN String

Outputs information for mappings that go through a controller with the specified world wide
port name.

58 Storage Center Command Set 4.1 for Windows PowerShell


—ServerWWN String

—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

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

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

60 Storage Center Command Set 4.1 for Windows PowerShell


Get-Volume

Get-Volume

Description

The cmdlet communicates with the Windows Virtual Disk Service to get volume informa-
tion.

Syntax

Get-Volume [—Server String] [—AccessPath String] [—Label String]


[—Status String] [—Health String] [—State String] [—FileSystemType
String] [—Flag String] [—Size String] [—DiskSerialNumber String]

Parameters

—Server String

Specifies the server on which to perform the operation.

—AccessPath String

Specifies a drive letter or mount point of the volume.

—Label String

Specifies the label on the volume.

—Status String

Specifies the status of the volume.

—Health String

Specifies the health of the volume.

—State String

Specifies the state of the volume.

—FileSystemType String

Specifies the type of file system on the volume.

—Flag String

Specifies a flag set on the volume.

—Size String

Specifies the byte count or display size of the volume.

Compellent Technologies 61
Command Reference

—DiskSerialNumber String

Specifies the disk serial number on which this volume resides.

Return Type

DataVolume

Examples

Example 1

C:\PS>Get-Volume -SerialNumber 0000012d-00001ffc

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

62 Storage Center Command Set 4.1 for Windows PowerShell


Move-SCServer

Move-SCServer

Description

This cmdlet is used to move a server definition from one server folder to another.

Syntax

Move-SCServer [[—Name]String] [—WorldWideName String]


[[—ParentFolder]String] [[—ParentSCServerFolder] SCServerFolder]
[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Move-SCServer —Index UInt32 [—WorldWideName String]


[[—ParentFolder]String] [[—ParentSCServerFolder] SCServerFolder]
[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Move-SCServer—LogicalPath String [—WorldWideName String]


[[—ParentFolder]String] [[—ParentSCServerFolder] SCServerFolder]
[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Move-SCServer [—WorldWideName String] —SCServer SCServer


[[—ParentFolder] String] [[—ParentSCServerFolder] SCServerFolder]
[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Parameters

—Name String

Specifies the name of the server to be moved.

—WorldWideName String

Specifies a world wide port name of the server to be moved.

—ParentFolder String

Specifies the name of the server folder in which to move the server.

—ParentSCServerFolder SCServerFolder

Specifies the server folder object in which to move the server.

—Connection SCConnection

Specifies a Storage Center connection object.

Compellent Technologies 63
Command Reference

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

—Index UInt32

Specifies the index of the server to be moved.

—LogicalPath String

Specifies the current logical path of the server to be moved.

—SCServer SCServer

Specifies the server object of the server to be moved.

Return Type

SCServer

Examples

Example 1

C:\PS>Move-SCServer -Name "MX01 Node 1" -ParentFolder "MX01Cluster"

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

64 Storage Center Command Set 4.1 for Windows PowerShell


Move-SCServerFolder

Move-SCServerFolder

Description

This cmdlet is used to move a server folder from one folder to another.

Syntax

Move-SCServerFolder [[—Name]String] [—Index UInt32] [—LogicalPath


String] [[—ParentFolder] String][[—ParentSCServerFolder]
SCServerFolder] [—Connection SCConnection] [—ConnectionName String]
[—WhatIf] [—Confirm]

Move-SCServerFolder [[—Name] String] [—Index UInt32] [—LogicalPath


String] [—SCServerFolder] SCServerFolder [[—ParentFolder] String]
[[—ParentSCServerFolder] SCServerFolder] [—Connection
SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Parameters

—Name String

Specifies the name of the server folder to move.

—Index UInt32

Specifies the index of the server folder to move.

—LogicalPath String

Specifies the logical path of the server folder to move.

—ParentFolder String

Specifies the server folder in which to move this server folder.

—ParentSCServerFolder SCServerFolder

Specifies the server folder object representing the server folder in which to move this
server folder.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Compellent Technologies 65
Command Reference

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

—SCServerFolder SCServerFolder

Specifies the server folder object representing the server folder to be moved.

Return Type

SCServerFolder

Examples

Example 1

C:\PS>Move-SCServerFolder -Name "MX01Cluster" -ParentFolder \


"Exchange Servers"

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

66 Storage Center Command Set 4.1 for Windows PowerShell


Move-SCVolume

Move-SCVolume

Description

The cmdlet is used to move a volume from one volume folder to another.

Syntax

Move-SCVolume [—Name] String [[—ParentFolder] String]


[—ParentSCVolumeFolder SCVolumeFolder] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Move-SCVolume —Index UInt32 [[—ParentFolder] String]


[—ParentSCVolumeFolder SCVolumeFolder] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Move-SCVolume —LogicalPath String [[—ParentFolder] String]


[—ParentSCVolumeFolder SCVolumeFolder] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Move-SCVolume —SerialNumber String [[—ParentFolder] String]


[—ParentSCVolumeFolder SCVolumeFolder] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Move-SCVolume —SCVolume SCVolume [[—ParentFolder] String]


[—ParentSCVolumeFolder SCVolumeFolder] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Parameters

—Name String

Specifies the name of the volume to move.

—ParentFolder String

Specifies the volume folder in which to move the volume.

—ParentSCVolumeFolder SCVolumeFolder

Specifies the volume folder object in which to move the volume.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Compellent Technologies 67
Command Reference

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

—Index UInt32

Specifies the index of the volume to move.

—LogicalPath String

Specifies the logical path of the volume to move.

—SerialNumber String

Specifies the serial number of the volume to move.

—SCVolume SCVolume

Specifies the volume object to move.

Return Type

SCVolume

Examples

Example 1

C:\PS>Move-SCVolume -Name "MX01 Storage Group 1" -ParentFolder \


"MX01 Volumes"

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

68 Storage Center Command Set 4.1 for Windows PowerShell


Move-SCVolumeFolder

Move-SCVolumeFolder

Description

This cmdlet is used to move a volume folder from one folder to another.

Syntax

Move-SCVolumeFolder [—Name] String [[—ParentFolder] String]


[—ParentSCVolumeFolder SCVolumeFolder] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Move-SCVolumeFolder —Index UInt32 [[—ParentFolder] String]


[—ParentSCVolumeFolder SCVolumeFolder] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Move-SCVolumeFolder —LogicalPath String [[—ParentFolder] String]


[—ParentSCVolumeFolder SCVolumeFolder] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Move-SCVolumeFolder —SCVolumeFolder SCVolumeFolder


[[—ParentFolder]String] [—ParentSCVolumeFolder SCVolumeFolder]
[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Parameters

—Name String

Specifies the name of the volume folder to be moved.

—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

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Compellent Technologies 69
Command Reference

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

—Index UInt32

Specifies the index of the volume folder to move.

—LogicalPath String

Specifies the logical path of the volume folder to move.

—SCVolumeFolder SCVolumeFolder

Specifies the volume folder object to be moved.

Return Type

SCVolumeFolder

Examples

Example 1

C:\PS>Move-SCVolumeFolder -Name "MX01 Volumes" -ParentFolder \


"Exchange Volumes"

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

70 Storage Center Command Set 4.1 for Windows PowerShell


New-SCCmmCopy

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

The name of the volume to copy from.

—DestinationVolumeName String

The name of the volume to copy to.

—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

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Compellent Technologies 71
Command Reference

—SourceVolumeIndex UInt32

Specifies the index of the volume to copy from.

—DestinationVolumeIndex UInt32

Specifies the index of the volume to copy to.

—SourceSCVolume SCVolume

Specifies the volume object to copy from.

—DestinationSCVolume SCVolume

Specifies the volume object to copy to.

Return Type

SCCmm

Examples

Example 1

C:\PS>New-SCCmmCopy -SourceVolumeName "SQL Data" \


-DestinationVolumeName "Copy of SQL Data"

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

72 Storage Center Command Set 4.1 for Windows PowerShell


New-SCCmmMigrate

New-SCCmmMigrate

Description

This cmdlet will create a CMM operation on the Storage Center to migrate all data from
one volume to another.

Syntax

New-SCCmmMigrate [—SourceVolumeName] String


[—DestinationVolumeName] String [—Priority String]
[—CopyReplayHistory] [—DeleteSourceAfterMigrate]
[—ReverseMirrorAfterMigrate] [—Connection SCConnection]
[—ConnectionName String]

New-SCCmmMigrate [—SourceVolumeIndex] UInt32


[—DestinationVolumeIndex] UInt32 [—Priority String]
[—CopyReplayHistory] [—DeleteSourceAfterMigrate]
[—ReverseMirrorAfterMigrate] [—Connection SCConnection]
[—ConnectionName String]

New-SCCmmMigrate [—SourceSCVolume] SCVolume [—DestinationSCVolume]


SCVolume [—Priority String] [—CopyReplayHistory]
[—DeleteSourceAfterMigrate] [—ReverseMirrorAfterMigrate]
[—Connection SCConnection] [—ConnectionName String]

Parameters

—SourceVolumeName String

Specifies the name of the volume to copy from.

—DestinationVolumeName String

Specifies the name of the volume to copy to.

—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

Specifies whether to reverse the mirror after the migrate completes.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—SourceVolumeIndex UInt32

Specifies the index of the volume to migrate from.

—DestinationVolumeIndex UInt32

Specifies the index of the volume to migrate to.

—SourceSCVolume SCVolume

Specifies the volume object representing the volume to migrate from.

—DestinationSCVolume SCVolume

Specifies the volume object representing the volume to migrate to.

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.

74 Storage Center Command Set 4.1 for Windows PowerShell


Related Links

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

New-SCCmmMirror [—SourceVolumeName] String


[—DestinationVolumeName] String[ —Priority String]
[—CopyReplayHistory] [—Connection SCConnection] [—ConnectionName
String]

New-SCCmmMirror [—SourceVolumeIndex] UInt32


[—DestinationVolumeIndex] UInt32 [—Priority String]
[—CopyReplayHistory] [—Connection SCConnection] [—ConnectionName
String]

New-SCCmmMirror [—SourceSCVolume] SCVolume [—DestinationSCVolume]


SCVolume [—Priority String] [—CopyReplayHistory] [—Connection
SCConnection] [—ConnectionName String]

Parameters

—SourceVolumeName String

Specifies the name of the volume to mirror from.

—DestinationVolumeName String

Specifies the name of the volume to mirror to.

—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

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

76 Storage Center Command Set 4.1 for Windows PowerShell


—SourceVolumeIndex UInt32

—SourceVolumeIndex UInt32

Specifies the index of the volume to mirror from.

—DestinationVolumeIndex UInt32

Specifies the index of the volume to mirror to.

—SourceSCVolume SCVolume

Specifies the volume object representing the volume to mirror from.

—DestinationSCVolume SCVolume

Specifies the volume object representing the volume to mirror to.

Return Type

SCCmm

Examples

Example 1

C:\PS>New-SCCmmMirror -SourceSCVolume $sourceVolume \


-DestinationSCVolume $destVolume -CopyReplayHistory:$false

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

This cmdlet creates a new Replay on a volume.

Syntax

New-SCReplay [[—SourceVolumeName]String] [—MinutesToLive] UInt32


[—Description String] [—Connection SCConnection] [—ConnectionName
String]

New-SCReplay [[—SourceSCVolume]SCVolume] [—MinutesToLive] UInt32


[—Description String] [—Connection SCConnection] [—ConnectionName
String]

New-SCReplay [[—SourceVolumeIndex] UInt32] [—MinutesToLive] UInt32


[—Description String] [—Connection SCConnection] [—ConnectionName
String]

Parameters

—SourceVolumeName String

Specifies the name of the volume on which to create the replay.

—MinutesToLive UInt32

Specifies the number of minutes until the replay will expire.

—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

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—SourceSCVolume SCVolume

Specifies the volume object representing the volume on which to create the replay.

—SourceVolumeIndex UInt32

Specifies the index of the volume on which to create the replay.

78 Storage Center Command Set 4.1 for Windows PowerShell


Return Type

Return Type

SCReplay

Examples

Example 1

C:\PS>New-SCReplay -SourceVolumeName "SQL Data" -MinutesToLive \


1440 -Description "Prior to schema change"

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

This cmdlet is used to define a new server.

Syntax

New-SCServer [—Name] String [—ParentFolder String]


[—ParentSCServerFolder SCServerFolder] [—Notes String] [—IPAddress
String] [[—WorldWideNames] String] [—iSCSIAddresses String]
[—Connection SCConnection] [—ConnectionName String]

Parameters

—Name String

Specifies the name to give the server.

—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

Specifies the notes to set on the server.

—IPAddress String

Specifies the information IP address to set on the server. Note that this address is not
used for iSCSI connections.

—WorldWideNames String

Specifies a collection of world wide port names to assign to this server.

—iSCSIAddresses String

Specifies a collection of iSCSI IP addresses to assign to this server.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

80 Storage Center Command Set 4.1 for Windows PowerShell


Return Type

Return Type

SCServer

Examples

Example 1

C:\PS>New-SCServer -Name "Test Lab Server" -ParentFolder \


"Test Lab" -Notes "This server is for testing changes prior to \
deploying to production" -iSCSIAddresses "10.10.5.23"

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

New-SCServerFolder [—Name] String [—ParentFolder String]


[—ParentSCServerFolder SCServerFolder] [—Notes String] [—Connection
SCConnection] [—ConnectionName String]

Parameters

—Name String

Specifies the name for the new server folder.

—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

Specifies the notes to set on this server folder.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Return Type

SCServerFolder

82 Storage Center Command Set 4.1 for Windows PowerShell


Examples

Examples

Example

C:\PS>New-SCServerFolder -Name "Virtual Servers"

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

New-SCUser [—Name] String [—Password] SecureString [—FullName


String] [—Privileges String] [—UserGroup String] [—SessionTimeout
UInt32] [—Notes String] [—BusinessPhone String] [—MobilePhone
String] [—HomePhone String] [—Email String] [—Email2 String]
[—Email3 String] [—Title String] [—Location String] [—Department
String] [—Connection SCConnection] [—ConnectionName String]

Parameters

—Name String

Specifies the user name.

—Password SecureString

Specifies the user's password.

—FullName String

Specifies the full name of the user.

—Privileges String

Specifies the privilege level of the user. Allowed values are Administrator, VolumeMan-
ager, and Reporter.

—UserGroup String

Specifies the user group to assign the user.

—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

Specifies the notes to set on the user.

—BusinessPhone String

Specifies the user's business phone number.

84 Storage Center Command Set 4.1 for Windows PowerShell


—MobilePhone String

—MobilePhone String

Specifies the user's mobile phone number.

—HomePhone String

Specifies the user's home phone number.

—Email String

Specifies the user's primary email address.

—Email2 String

Specifies the user's secondary email address.

—Email3 String

Specifies the user's tertiary email address.

—Title String

Specifies the user's title.

—Location String

Specifies the user's location.

—Department String

Specifies the user's department.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Return Type

SCUser

Examples

Example 1

C:\PS>New-SCUser -Name dba2 -Password $pass -Privileges \


VolumeManager -UserGroup DBAs -SessionTimeout 120

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

86 Storage Center Command Set 4.1 for Windows PowerShell


New-SCVolume

New-SCVolume

Description

The cmdlet creates a new volume on the Storage Center.

Syntax

New-SCVolume [—Name]String [[—Size] String] [—ParentFolder String]


[—ParentSCVolumeFolder SCVolumeFolder] [—Notes String]
[—ReadCacheEnabled Boolean] [—ReadAheadCacheEnabled Boolean]
[—WriteCacheEnabled Boolean] [—StorageType String] [—SCStorageType
SCStorageType] [—SourceSCReplay SCReplay] [—Connection
SCConnection] [—ConnectionName String]

New-SCVolume [—Name] String [—ParentFolder String]


[—ParentSCVolumeFolder SCVolumeFolder] [—Notes String]
[—SourceSCReplay SCReplay] [—Connection SCConnection]
[—ConnectionName String]

New-SCVolume [—ParentFolder String] [—ParentSCVolumeFolder


SCVolumeFolder] [—Notes String] [—SourceSCReplay SCReplay]
—SourceReplayIndex String [—Connection SCConnection]
[—ConnectionName String]

Parameters

—Name String

Specifies the name to give the volume.

—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

Specifies the notes to set on the volume.

Compellent Technologies 87
Command Reference

—ReadCacheEnabled Boolean

Specifies whether the read cache should be enabled or disabled.

—ReadAheadCacheEnabled Boolean

Specifies whether the read ahead cache should be enabled or disabled.

—WriteCacheEnabled Boolean

Specifies whether the write cache should be enabled or disabled.

—StorageType String

Specifies the storage type to use for creating this volume.

—SCStorageType SCStorageType

Specifies an SCStorageType object representing the storage type to use for creating the
volume.

—SourceSCReplay SCReplay

Specifies the replay from which to create the volume.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—SourceReplayIndex String

Specifies the index of the replay from which to create this volume.

Return Type

SCVolume

Examples

Example 1

C:\PS>New-SCVolume -Name "Backup Data" -Size 10g

This command creates a new volume named "Backup Data" with the size of 10G.

Example 2

C:\PS>New-SCVolume -SourceReplayIndex 8195-655 -Name \


"Backup volume for SQL Data"

88 Storage Center Command Set 4.1 for Windows PowerShell


Related Links

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

New-SCVolumeFolder [—Name] String [—ParentFolder String]


[—ParentSCVolumeFolder SCVolumeFolder] [—Notes String] [—Connection
SCConnection] [—ConnectionName String]

Parameters

—Name String

Specifies the name to give the volume folder.

—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

Specifies the notes to set on the volume folder.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Return Type

SCVolumeFolder

90 Storage Center Command Set 4.1 for Windows PowerShell


Examples

Examples

Example 1

C:\PS>New-SCVolumeFolder -Name "Test Volumes"

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

New-SCVolumeMap [[—ServerName] String] [—VolumeName] String


[—ControllerPorts String] [—SCPorts SCPort] [—ServerWWNs String]
[—ControllerIndex UInt32] [—ReadOnly Boolean] [—LUN UInt32]
[—SinglePath] [—Connection SCConnection] [—ConnectionName String]

New-SCVolumeMap [[—ServerName] String] [—SCVolume SCVolume]


[—ControllerPorts String] [—SCPorts SCPort] [—ServerWWNs String]
[—ControllerIndex UInt32] [—ReadOnly Boolean] [—LUN Int32]
[—SinglePath] [—Connection SCConnection] [—ConnectionName String]

New-SCVolumeMap [[—ServerName] String] [—VolumeIndex UInt32]


[—ControllerPorts String] [—SCPorts SCPort] [—ServerWWNs String]
[—ControllerIndex UInt32] [—ReadOnly Boolean] [—LUN Int32]
[—SinglePath] [—Connection SCConnection] [—ConnectionName String]

New-SCVolumeMap [—ServerIndex UInt32] [—SCVolume SCVolume]


[—ControllerPorts String] [—SCPorts SCPort] [—ServerWWNs String]
[—ControllerIndex UInt32] [—ReadOnly Boolean] [—LUN Int32]
[—SinglePath] [—Connection SCConnection] [—ConnectionName String]

New-SCVolumeMap [—ServerIndex UInt32] [—VolumeName] String


[—ControllerPorts String] [—SCPorts SCPort] [—ServerWWNs String]
[—ControllerIndex UInt32] [—ReadOnly Boolean] [—LUN Int32]
[—SinglePath] [—Connection SCConnection] [—ConnectionName String]

New-SCVolumeMap [—ServerIndex UInt32] [—VolumeIndex UInt32]


[—ControllerPorts String] [—SCPorts SCPort] [—ServerWWNs String]
[—ControllerIndex UInt32] [—ReadOnly Boolean] [—LUN Int32]
[—SinglePath] [—Connection SCConnection] [—ConnectionName String]

New-SCVolumeMap [—SCServer SCServer] [—VolumeIndex UInt32]


[—ControllerPorts String] [—SCPorts SCPort] [—ServerWWNs String]
[—ControllerIndex UInt32] [—ReadOnly Boolean] [—LUN Int32]
[—SinglePath] [—Connection SCConnection] [—ConnectionName String]

New-SCVolumeMap [—SCServer SCServer] [—VolumeName] String


[—ControllerPorts String] [—SCPorts SCPort] [—ServerWWNs String]

92 Storage Center Command Set 4.1 for Windows PowerShell


Parameters

[—ControllerIndex UInt32] [—ReadOnly Boolean] [—LUN Int32]


[—SinglePath] [—Connection SCConnection] [—ConnectionName String]

New-SCVolumeMap [—SCServer SCServer] [—SCVolume SCVolume]


[—ControllerPorts String] [—SCPorts SCPort] [—ServerWWNs String]
[—ControllerIndex UInt32] [—ReadOnly Boolean] [—LUN Int32]
[—SinglePath] [—Connection SCConnection] [—ConnectionName String]

Parameters

—ServerName String

Specifies the name of the server to map to.

—VolumeName String

Specifies the name of the volume to map.

—ControllerPorts String

Specifies the controller world wide port name(s) to use for mapping.

—SCPorts SCPort

Specifies the controller port(s) to use for mapping.

—ServerWWNs String

Specifies the server world wide port name(s) to map to.

—ControllerIndex UInt32

Specifies the controller serial number through which to map.

—ReadOnly Boolean

Specifies whether the the mapping should be read only.

—LUN Int32

Specifies the LUN number to use for the map.

—SinglePath

Specifies whether the to map a single path or all available paths.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

Compellent Technologies 93
Command Reference

—SCVolume SCVolume

Specifies the volume object representing the volume to map.

—VolumeIndex UInt32

Specifies the index of the volume to map.

—ServerIndex UInt32

Specifies the index of the server to map to.

—SCServer SCServer

Specifies the server object representing the server to map to.

Return Type

SCVolumeMap

Examples

Example 1

C:\PS>New-SCVolumeMap -VolumeName "SQL Data" -ServerName DB01

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

94 Storage Center Command Set 4.1 for Windows PowerShell


New-Volume

New-Volume

Description

This cmdlet communicates with the Windows Virtual Disk Manager service to create a
new volume on a disk.

Syntax

New-Volume [—Server String] [—AccessPath String] [—DeviceName]


String [—Size String] [—Label String] [—AllocationSize Int32]

Parameters

—Server String

Specifies the server on which to perform the operation.

—AccessPath String

Specifies the drive letter or mount point for the volume.

—DeviceName String

Specifies the disk device name on which to create the volume.

—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

Specifies the label to apply to the volume.

—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

C:\PS>New-Volume -DeviceName \\?\PhysicalDrive2 -Label "Data \


Volume"

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

96 Storage Center Command Set 4.1 for Windows PowerShell


Remove-SCCmm

Remove-SCCmm

Description

This cmdlet removes a Copy/Mirror/Migrate from the Storage Center by aborting the oper-
ation.

Syntax

Remove-SCCmm [—Index UInt32] [—SourceVolumeIndex UInt32]


[—DestinationVolumeIndex UInt32] [—ActiveController UInt32] [—State
String] [—SourceVolumeName String] [—DestinationVolumeName String]
[—SourceSCVolume SCVolume] [—DestinationSCVolume SCVolume] [—Type
String] [—Priority String] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Parameters

—Index UInt32

Aborts the CMM operation with the specified index.

—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

Abort the CMM operation(s) with the specified state.

—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

Aborts the CMM operation(s) with the specified type.

—Priority String

Aborts the CMM operations with the specified priority.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

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

98 Storage Center Command Set 4.1 for Windows PowerShell


Remove-SCConnection

Remove-SCConnection

Description

This cmdlet will remove Storage Center connection settings saved using the -Save param-
eter from Get-SCConnection.

Syntax

Remove-SCConnection [—Name] String[ —WhatIf] [—Confirm]

Parameters

—Name String

Specifies the name of the connection to remove.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

Examples

Example 1

C:\PS>Remove-SCConnection -Name comp1

This command will remove the saved connection named "comp1".

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

Remove-SCReplay [—Index String] [—FreezeTime String] [—ExpireTime


String] [—SourceVolumeIndex UInt32] [—SourceVolumeName String]
[—CreateSource String] [—Description String] [—State String]
[—ActiveController UInt32] [—SCReplay SCReplay] [—SourceSCVolume
SCVolume] [—Connection SCConnection] [—ConnectionName String]
[—WhatIf] [—Confirm]

Parameters

—Index String

Expires the replay with the specified index.

—FreezeTime String

Expires the replay(s) that were frozen at the specified time.

—ExpireTime String

Expires the replay(s) that have the specified expiration time.

—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

Expires the replay(s) with the specified description.

—State String

Expires the replay(s) in the specified state.

100 Storage Center Command Set 4.1 for Windows PowerShell


—ActiveController UInt32

—ActiveController UInt32

Expires the replay(s) that are active on the specified controller.

—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

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

Examples

Example 1

C:\PS>Remove-SCReplay -Index 3468-1531

This command will expire the replay with the index of 3468-1531.

Related Links

Get-SCReplay 43
New-SCReplay 78

Compellent Technologies 101


Command Reference

Remove-SCServer

Description

This cmdlet removes server object definitions from the Storage Center.

Syntax

Remove-SCServer [—Name] String [—Connection SCConnection]


[—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCServer [—Index] UInt32 [—Connection SCConnection]


[—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCServer [—LogicalPath] String [—Connection SCConnection]


[—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCServer [—WorldWideName] String [—Connection SCConnection]


[—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCServer —SCServer SCServer [—Connection SCConnection]


[—ConnectionName String] [—WhatIf] [—Confirm]

Parameters

—Name String

Specifies the name of the server to remove.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

—Index UInt32

Specifies the index of the server to remove.

102 Storage Center Command Set 4.1 for Windows PowerShell


—LogicalPath String

—LogicalPath String

Specifies the logical path of the server to remove.

—WorldWideName String

Specifies the world wide name of the server to remove.

—SCServer SCServer

Specifies the server object representing the server to remove.

Return Type

SCServer

Examples

Example 1

C:\PS>Remove-SCServer -LogicalPath "Exchange Servers\MX01"

This command will delete the server named MX01 in the "Exchange Servers" folder.

Example 2

C:\PS>Remove-SCServer -WorldWideName AC1F642600000000

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

Compellent Technologies 103


Command Reference

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

Remove-SCServerFolder [—Name] String [—Recursive] [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCServerFolder —Index UInt32 [—Recursive] [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCServerFolder —LogicalPath String [—Recursive] [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCServerFolder —SCServerFolder SCServerFolder [—Recursive]


[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Parameters

—Name String

Deletes the server folder with the specified name.

—Recursive

Deletes all subfolders of the specified folder. Note that all folders must be empty of server
definitions.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

104 Storage Center Command Set 4.1 for Windows PowerShell


—Index UInt32

—Index UInt32

Deletes the server folder with the specified index.

—LogicalPath String

Deletes the server folder with the specified logical path.

—SCServerFolder SCServerFolder

Deletes the server folder represented by the SCServerFolder object.

Examples

Example 1

C:\PS>Remove-SCServerFolder "Test Servers"

This command will remove the folder named "Test Servers".

Example 2

C:\PS>Remove-SCServerFolder -Index 3 -Recursive

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

Compellent Technologies 105


Command Reference

Remove-SCServerPort

Description

This cmdlet will remove a fibre channel or iSCSI port from a server definition.

Syntax

Remove-SCServerPort [—Name] String [[—WorldWideNames] String]


[—iSCSIAddresses String] [—Force] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCServerPort —Index UInt32 [[—WorldWideNames] String]


[—iSCSIAddresses String] [—Force] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCServerPort —LogicalPath String [[—WorldWideNames] String]


[—iSCSIAddresses String] [—Force] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCServerPort —SCServer SCServer [[—WorldWideNames] String]


[—iSCSIAddresses String] [—Force] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Parameters

—Name String

Removes the port with the specified name.

—WorldWideNames String

Removes the port with the specified world wide name.

—iSCSIAddresses String

Removes the port with the specified iSCSI address.

—Force

Forces the removal. If there are existing volume maps to the port(s) to be removed, they
will be deleted.

—Connection SCConnection

Specifies a Storage Center connection object.

106 Storage Center Command Set 4.1 for Windows PowerShell


—ConnectionName String

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

—Index UInt32

Removes the port with the specified index.

—LogicalPath String

Removes the port with the specified logical path.

—SCServer SCServer

Removes the port(s) from the specified server represented by the SCServer object.

Examples

Example 1

C:\PS>Remove-SCServerPort -Index 30 -WorldWideNames \


AC1F642600000000,AC1F642700000000 -Force

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

Compellent Technologies 107


Command Reference

Remove-SCUser

Description

This cmdlet allows Admin level users to remove user accounts from the Storage Center.

Syntax

Remove-SCUser [—Name] String [—Connection SCConnection]


[—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCUser —Index UInt32 [—Connection SCConnection]


[—ConnectionName String] [—WhatIf] [—Confirm]

Parameters

—Name String

Removes the user with the specified name.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

—Index UInt32

Removes the user with the specified index.

Examples

Example 1

C:\PS>Remove-SCUser -Name "Test Account"

This command will remove the "Test Account" user.

108 Storage Center Command Set 4.1 for Windows PowerShell


Related Links

Related Links

New-SCUser 84
Set-SCUser 141

Compellent Technologies 109


Command Reference

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

Remove-SCVolume [—Name] String [—SkipRecycleBin] [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCVolume —Index UInt32 [—SkipRecycleBin] [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCVolume —LogicalPath String [—SkipRecycleBin] [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCVolume —SerialNumber String [—SkipRecycleBin] [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCVolume —SCVolume SCVolume [—SkipRecycleBin] [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Parameters

—Name String

Deletes the volume with the specified name.

—SkipRecycleBin

Permanently deletes the volume by bypassing the recycle bin.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

110 Storage Center Command Set 4.1 for Windows PowerShell


—Confirm

—Confirm

Prompts you for confirmation before executing the command.

—Index UInt32

Deletes the volume with the specified index.

—LogicalPath String

Deletes the volume with the specified logical path.

—SerialNumber String

TDeletes the volume with the specified serial number.

—SCVolume SCVolume

Deletes the volume represented by the specified volume object.

Examples

Example 1

C:\PS>Remove-SCVolume -LogicalPath "Test Lab\LoadSim Volume" \


-SkipRecycleBin

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

Compellent Technologies 111


Command Reference

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

Remove-SCVolumeFolder [—Name] String [—Recursive] [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCVolumeFolder [—Index UInt32] [—Recursive] [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Remove-SCVolumeFolder [—LogicalPath String] [—Recursive]


[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Remove-SCVolumeFolder [—SCVolumeFolder SCVolumeFolder]


[—Recursive] [—Connection SCConnection] [—ConnectionName String]
[—WhatIf] [—Confirm]

Parameters

—Name String

Deletes the volume folder with the specified name.

—Recursive

Deletes all subfolders of this folder. Note that all folders must be empty of volumes in order
to be deleted.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

112 Storage Center Command Set 4.1 for Windows PowerShell


—Index UInt32

—Index UInt32

Deletes the volume folder with the specified index.

—LogicalPath String

Deletes the volume folder with the specified logical path.

—SCVolumeFolder SCVolumeFolder

Deletes the volume folder represented by the SCVolumeFolder object.

Examples

Example 1

C:\PS>Remove-SCVolumeFolder -Name "Test Volumes" -Recursive

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

Compellent Technologies 113


Command Reference

Remove-SCVolumeMap

Description

This cmdlet will delete maps between a volume and a server.

Syntax

Remove-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] [—WhatIf]
[—Confirm]

Parameters

—Index String

Deletes the map with the specified index.

—VolumeIndex UInt32

Deletes the map from the volume with the specified index.

—ServerIndex UInt32

Deletes the map to the server with the specified index.

—ActiveController UInt32

Deletes the map(s) on the controller with the specified serial number.

—LUN UInt32

Deletes the map(s) with the specified LUN.

—ReadOnly Boolean

Deletes the map(s) that are read only ($true) or are not read only ($false).

—Status String

Deletes the map(s) with the specified status.

—ControllerWWN String

Deletes the map(s) using the specified controller word wide port name.

114 Storage Center Command Set 4.1 for Windows PowerShell


—ServerWWN String

—ServerWWN String

Deletes the map(s) with the specified server world wide port name.

—ServerName String

Deletes the map(s) to the server with the specified name.

—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

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

Examples

Example 1

C:\PS>Remove-SCVolumeMap -SCVolume $volume -SCServer $server

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

C:\PS>Remove-SCVolumeMap -ServerIndex 5 -Status Down

Compellent Technologies 115


Command Reference

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

116 Storage Center Command Set 4.1 for Windows PowerShell


Remove-VolumeAccessPath

Remove-VolumeAccessPath

Description

This cmdlet communicates with the Virtual Disk Service to remove a volume drive letter or
mount point from a volume.

Syntax

Remove-VolumeAccessPath [—Server String] [—AccessPath] String


[—Label String] [—Status String] [—Health String] [—State String]
[—FileSystemType String] [—Flag String] [—Size String] [—Force]
[—SerialNumber String] [—WhatIf] [—Confirm]

Parameters

—Server String

Specifies the server on which to perform the operation.

—AccessPath String

Specifies the drive letter or full path to an empty folder on an NTFS formatted file system.

—Label String

Specifies the label on the volume.

—Status String

Specifies the status of the volume.

—Health String

Specifies the health of the volume.

—State String

Specifies the state of the volume.

—FileSystemType String

Specifies the type of file system on the volume.

—Flag String

Specifies a flag set on the volume.

Compellent Technologies 117


Command Reference

—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

Prompts you for confirmation before executing the command.

Return Type

DataVolume

Examples

Example 1

C:\PS>Remove-VolumeAccessPath -Server mx01 -SerialNumber \


0000012d-000021a3 -Size 10G -AccessPath G:

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

118 Storage Center Command Set 4.1 for Windows PowerShell


Rename-SCServer

Rename-SCServer

Description

This cmdlet sets a new name for a server.

Syntax

Rename-SCServer [—Name]String [[—NewName]String] [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Rename-SCServer [—Index] UInt32 [[—NewName]String] [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Rename-SCServer [—LogicalPath] String [[—NewName] String]


[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Rename-SCServer [—WorldWideName] String [[—NewName] String]


[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Rename-SCServer —SCServer SCServer [[—NewName] String] [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Parameters

—Name String

Specifies the current name of the server.

—NewName String

Specifies the new name to give the server.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

Compellent Technologies 119


Command Reference

—Confirm

Prompts you for confirmation before executing the command.

—Index UInt32

Specifies the index of the server.

—LogicalPath String

Specifies the current logical path of the server.

—WorldWideName String

Specifies a world wide port name of the server.

—SCServer SCServer

Specifies the server object representing the server to rename.

Return Type

SCServer

Examples

Example 1

C:\PS>Rename-SCServer -Name "Test Server" -NewName "Production \


Server"

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

120 Storage Center Command Set 4.1 for Windows PowerShell


Rename-SCServerFolder

Rename-SCServerFolder

Description

This cmdlet sets a new name for a server folder.

Syntax

Rename-SCServerFolder [—Name] String[ —NewName] String [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Rename-SCServerFolder —Index UInt32 [—NewName] String [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Rename-SCServerFolder —LogicalPath String [—NewName] String


[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Rename-SCServerFolder —SCServerFolder SCServerFolder[—NewName]


String [—Connection SCConnection] [—ConnectionName String]
[—WhatIf] [—Confirm]

Parameters

—Name String

Specifies the current name of the server folder.

—NewName String

Specifies the new name to assign the server folder.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

Compellent Technologies 121


Command Reference

—Index UInt32

Specifies the index of the server folder.

—LogicalPath String

Specifies the current logical path of the server folder.

—SCServerFolder SCServerFolder

Specifies the server folder object representing the server folder to rename.

Return Type

SCServerFolder

Examples

Example 1

C:\PS>Rename-SCServerFolder -Name "Test Servers" -NewName \


"Production Servers"

This command will rename the server folder "Test Servers" to "Production Servers".

Related Links

Get-SCServerFolder 47
New-SCServerFolder 82
Set-SCServerFolder 138

122 Storage Center Command Set 4.1 for Windows PowerShell


Rename-SCVolume

Rename-SCVolume

Description

This cmdlet sets a new name for a volume.

Syntax

Rename-SCVolume [—Name] String [—NewName] String [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Rename-SCVolume —Index UInt32 [—NewName] String [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Rename-SCVolume —LogicalPath String [—NewName] String [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Rename-SCVolume —SerialNumber String [—NewName] String [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Rename-SCVolume —SCVolume SCVolume [—NewName] String [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Parameters

—Name String

Specifies the current name of the volume.

—NewName String

Specifies the new name to assign the volume.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

Compellent Technologies 123


Command Reference

—Index UInt32

Specifies the index of the volume.

—LogicalPath String

Specifies the current logical path of the volume.

—SerialNumber String

Specifies the serial number of the volume.

—SCVolume SCVolume

Specifies the volume object representing the volume to be renamed.

Return Type

SCVolume

Examples

Example 1

C:\PS>Rename-SCVolume -Name "Test Volume" -NewName "Production \


Volume"

This command will rename the "Test Volume" volume to "Production Volume".

Related Links

Get-SCVolume 53
New-SCVolume 87
Set-SCVolume 144

124 Storage Center Command Set 4.1 for Windows PowerShell


Rename-SCVolumeFolder

Rename-SCVolumeFolder

Description

This cmdlet sets a new name for a volume folder.

Syntax

Rename-SCVolumeFolder [—Name] String [—NewName] String [—Connection


SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Rename-SCVolumeFolder [—Index UInt32] [—NewName] String


[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Rename-SCVolumeFolder [—LogicalPath String] [—NewName] String


[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Rename-SCVolumeFolder [—SCVolumeFolder SCVolumeFolder][—NewName]


String [—Connection SCConnection] [—ConnectionName String]
[—WhatIf] [—Confirm]

Parameters

—Name String

Specifies the current name of the volume folder.

—NewName String

Specifies the new name to assign the volume folder.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

Compellent Technologies 125


Command Reference

—Index UInt32

Specifies the index of the volume folder.

—LogicalPath String

Specifies the current logical path of the volume folder.

—SCVolumeFolder SCVolumeFolder

Specifies the volume folder object representing the volume folder to rename.

Return Type

SCVolumeFolder

Examples

Example 1

C:\PS>Rename-SCVolumeFolder -Name "Test Volumes" -NewName \


"Production Volumes"

This command will rename the volume folder "Test Volumes" to "Production Volumes".

Related Links

Get-SCVolumeFolder 56
New-SCVolumeFolder 90
Set-SCVolumeFolder 147

126 Storage Center Command Set 4.1 for Windows PowerShell


Rescan-DiskDevice

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

Rescan-DiskDevice [[—Server] String] [—RescanDelay Int32]

Parameters

—Server String

Specifies the server on which to perform the operation.

—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

Compellent Technologies 127


Command Reference

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

Set-DiskDevice [—Server String] [—BusType String] [—Vendor String]


[—ProductID String] [—ProductRevision String] [—SerialNumber
String] [—Status String] [—Health String] [—Size String] [—Name
String] [—AdapterName String] [—DeviceName String] [—ReadOnly
Boolean] [—Online] [—Flag String] [—WhatIf] [—Confirm]

Set-DiskDevice [—Server String] [—BusType String] [—Vendor String]


[—ProductID String] [—ProductRevision String] [—SerialNumber
String] [—Status String] [—Health String] [—Size String] [—Name
String] [—AdapterName String] [—DeviceName String] [—ReadOnly
Boolean] [—Offline] [—Flag String] [—WhatIf] [—Confirm]

Parameters

—Server String

Specifies the server on which to perform the operation.

—BusType String

Specifies the storage bus type of the disk. Some available types are SCSI, FC, and iSCSI.

—Vendor String

Specifies the vendor name reported by the disk.

—ProductID String

Specifies the product ID reported by the disk.

—ProductRevision String

Specifies the product revision reported by the disk.

—SerialNumber String

Specifies the serial number of the disk.

128 Storage Center Command Set 4.1 for Windows PowerShell


—Status String

—Status String

Specifies the status of the disk.

—Health String

Specifies the health of the disk.

—Size String

Specifies the size of the disk. Values can be in megabytes (m), gigabytes (g), or terabytes
(t).

—Name String

Specifies the name of the disk.

—AdapterName String

Specifies the storage adapter name of the disk.

—DeviceName String

Specifies the Windows disk device name used to uniquely identify the disk.

—Online

Sets the disk status to Online.

—ReadOnly Boolean

Sets the disk to read only.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

—Offline

Sets the disk status to Offline.

—Flag String

Sets a flag on the disk device.

Return Type

DiskDeviceObject

Compellent Technologies 129


Command Reference

Examples

Example 1

C:\PS>Set-DiskDevice -SerialNumber 0000012d-0000334f -Offline

The command will set the disk status of the disk with serial number 0000012d-0000334f to
Offline.

Example 2

C:\PS>Set-DiskDevice -DeviceName "\\?\PhysicalDrive3" -Online

The command will set the disk status of the disk with the device name \\?\PhysicalDrive3
to Online.

Related Links

Get-DiskDevice 25

130 Storage Center Command Set 4.1 for Windows PowerShell


Set-SCCmm

Set-SCCmm

Description

This cmdlet sets the priority of a Copy/Mirror/Migrate operation.

Syntax

Set-SCCmm [—Index UInt32] [—SourceVolumeIndex UInt32]


[—DestinationVolumeIndex UInt32] [—ActiveController UInt32] [—State
String] [—SourceVolumeName String] [—DestinationVolumeName String]
[—SourceSCVolume SCVolume] [—DestinationSCVolume SCVolume] [—Type
String] [—Priority String] [—NewPriority String] [—Connection
SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Parameters

—Index UInt32

Specifies the index of the CMM.

—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

Specifies the state of the CMM.

—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.

Compellent Technologies 131


Command Reference

—DestinationSCVolume SCVolume

Specifies the volume object representing the volume that is the destination of the CMM.

—Type String

Specifies the type of CMM operation.

—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

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

Return Type

SCCmm

Examples

Example 1

C:\PS>Set-SCCmm -Index 857 -NewPriority High

This sets the priority of the CMM with the index of 857 to High.

Related Links

Get-SCCmm 31
Remove-SCCmm 97

132 Storage Center Command Set 4.1 for Windows PowerShell


Set-SCDisk

Set-SCDisk

Description

This cmdlet sets the attributes of a disk object on the Storage Center.

Syntax

Set-SCDisk [—Index] UInt32 [—Manage] [—Unmanage] [—ManageSpare]


[—DiskFolderName String] [—DiskFolder SCDiskFolder] [—Connection
SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Set-SCDisk —Position String [—Manage] [—Unmanage] [—ManageSpare]


[—DiskFolderName String] [—DiskFolder SCDiskFolder] [—Connection
SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Set-SCDisk —Disk SCDisk [—Manage] [—Unmanage] [—ManageSpare]


[—DiskFolderName String] [—DiskFolder SCDiskFolder] [—Connection
SCConnection] [—ConnectionName String] [—WhatIf] [—Confirm]

Parameters

—Index UInt32

Specifies the index of the disk.

—Manage

Specifies whether to manage the disk.

—Unmanage

Specifies whether to unmanage the disk.

—ManageSpare

Specifies whether to make the disk a spare.

—DiskFolderName String

Specifies the name of the disk folder.

—DiskFolder SCDiskFolder

Specifies the disk folder object.

—Connection SCConnection

Specifies a Storage Center connection object.

Compellent Technologies 133


Command Reference

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

—Position String

Specifies the position of the disk.

—SCDisk SCDisk

Specifies the disk object to set.

Return Type

SCDisk

Examples

Example 1

C:\PS>Set-SCDisk -Index 16 -ManageSpare -DiskFolderName Assigned

This command will make the disk with index 16 a spare in the Assigned disk folder.

Related Links

Get-SCDisk 36

134 Storage Center Command Set 4.1 for Windows PowerShell


Set-SCServer

Set-SCServer

Description

This cmdlet sets attributes of a server definition such as name and its notes.

Syntax

Set-SCServer [—Name] String [—NewName String] [—ParentFolder


String] [—ParentSCServerFolder SCServerFolder] [—Notes String]
[—IPAddress String][ —Connection SCConnection][ —ConnectionName
String] [—WhatIf] [—Confirm]

Set-SCServer [—Index] UInt32 [—NewName String] [—ParentFolder


String] [—ParentSCServerFolder SCServerFolder] [—Notes String]
[—IPAddress String] [—Connection SCConnection] [—ConnectionName
String] [—WhatIf] [—Confirm]

Set-SCServer [—LogicalPath] String [—NewName String] [—ParentFolder


String] [—ParentSCServerFolder SCServerFolder] [—Notes String]
[—IPAddress String] [—Connection SCConnection] [—ConnectionName
String] [—WhatIf] [—Confirm]

Set-SCServer [—WorldWideName] String [—NewName String]


[—ParentFolder String] [—ParentSCServerFolder SCServerFolder]
[—Notes String] [—IPAddress String] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Set-SCServer —SCServer SCServer [—NewName String] [—ParentFolder


String] [—ParentSCServerFolder SCServerFolder] [—Notes String]
[—IPAddress String] [—Connection SCConnection] [—ConnectionName
String] [—WhatIf] [—Confirm]

Parameters

—Name String

Specifies the current name of the server.

—NewName String

Specifies the new name to assign the server.

—ParentFolder String

Specifies the parent folder name containing the server.

Compellent Technologies 135


Command Reference

—ParentSCServerFolder SCServerFolder

Specifies the parent folder object representing the parent folder containing the server.

—Notes String

Sets the specified notes on the server.

—IPAddress String

Sets the specified IP address on the server.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

—Index UInt32

Specifies the index of the server.

—LogicalPath String

Specifies the current logical path of the server.

—WorldWideName String

Specifies a world wide name of the server.

—SCServer SCServer

Specifies the server object representing the server to modify.

Return Type

SCServer

136 Storage Center Command Set 4.1 for Windows PowerShell


Examples

Examples

Example 1

C:\PS>Set-SCServer -Index 4 -Notes "Test server for evaluating \


service pack deployment."

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

Compellent Technologies 137


Command Reference

Set-SCServerFolder

Description

This cmdlet sets attributes of a server folder object such as name and parent folder.

Syntax

Set-SCServerFolder [—Name] String [—NewName String] [—ParentFolder


String] [—ParentSCServerFolder SCServerFolder] [—Notes String]
[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Set-SCServerFolder —Index UInt32 [—NewName String] [—ParentFolder


String] [—ParentSCServerFolder SCServerFolder] [—Notes String]
[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Set-SCServerFolder —LogicalPath String [—NewName String]


[—ParentFolder String] [—ParentSCServerFolder SCServerFolder]
[—Notes String] [—Connection SCConnection] [—ConnectionName String]
[—WhatIf] [—Confirm]

Set-SCServerFolder —SCServerFolder SCServerFolder [—NewName String]


[—ParentFolder String] [—ParentSCServerFolder SCServerFolder]
[—Notes String] [—Connection SCConnection] [—ConnectionName String]
[—WhatIf] [—Confirm]

Parameters

—Name String

Specifies the current name of the server folder.

—NewName String

Specifies the new name to assign to the server folder.

—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.

138 Storage Center Command Set 4.1 for Windows PowerShell


—Notes String

—Notes String

Sets the specified notes on the server folder.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

—Index UInt32

Specifies the index of the server folder.

—LogicalPath String

Specifies the current logical path of the server folder.

—SCServerFolder SCServerFolder

Specifies the server folder object representing the server folder to modify.

Return Type

SCServerFolder

Examples

Example 1

C:\PS>Set-SCServerFolder -Name "Test Servers" -ParentFolder "Lab\


Servers"

This command will move the "Test Servers" folder under the "Lab Servers" folder.

Compellent Technologies 139


Command Reference

Related Links

Get-SCServerFolder 47
Move-SCServerFolder 65
New-SCServerFolder 82
Rename-SCServerFolder 121
Remove-SCServerFolder 104

140 Storage Center Command Set 4.1 for Windows PowerShell


Set-SCUser

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

Set-SCUser [—Name]String [—FullName String] [—Privileges String]


[—SessionTimeout UInt32] [—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] [—Confirm]

Set-SCUser —Index UInt32 [—FullName String] [—Privileges String]


[—SessionTimeout UInt32] [—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] [—Confirm]

Parameters

—Name String

Specifies the name of the user.

—FullName String

Sets the specified full name for the user.

—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

Sets the specified notes on the user.

—BusinessPhone String

Sets the specified business phone number for the user.

Compellent Technologies 141


Command Reference

—MobilePhone String

Sets the specified mobile phone number for the user.

—HomePhone String

Sets the specified home phone number for the user.

—Email String

Sets the specified email address for the user.

—Email2 String

Sets the specified secondary email address for the user.

—Email3 String

Sets the specified tertiary email address for the user.

—Title String

Sets the specified title for the user.

—Location String

Sets the specified location for the user.

—Department String

Sets the specified department for the user.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

—Index UInt32

Specifies the index of the user.

142 Storage Center Command Set 4.1 for Windows PowerShell


Return Type

Return Type

SCUser

Examples

Example 1

C:\PS>Set-SCUser -Name jdoe -FullName "John Doe" -Notes \


"Temporary contractor" -Email "jdoe@here.com"

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

Compellent Technologies 143


Command Reference

Set-SCVolume

Description

This cmdlet can be used to set a new name for a volume.

Syntax

Set-SCVolume [—Name] String [—NewName] String [—Notes String]


[—ReadCacheEnabled Boolean] [—ReadAheadCacheEnabled Boolean]
[—WriteCacheEnabled Boolean] [—ParentFolder String]
[—ParentSCVolumeFolder SCVolumeFolder] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Set-SCVolume —Index UInt32 [—NewName] String [—Notes String]


[—ReadCacheEnabled Boolean] [—ReadAheadCacheEnabled Boolean]
[—WriteCacheEnabled Boolean] [—ParentFolder String]
[—ParentSCVolumeFolder SCVolumeFolder] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Set-SCVolume —LogicalPath String [—NewName] String [—Notes String]


[—ReadCacheEnabled Boolean] [—ReadAheadCacheEnabled Boolean]
[—WriteCacheEnabled Boolean] [—ParentFolder String]
[—ParentSCVolumeFolder SCVolumeFolder] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Set-SCVolume —SerialNumber String[ —NewName] String [—Notes String]


[—ReadCacheEnabled Boolean] [—ReadAheadCacheEnabled Boolean]
[—WriteCacheEnabled Boolean] [—ParentFolder String]
[—ParentSCVolumeFolder SCVolumeFolder] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Set-SCVolume —SCVolume SCVolume [—NewName] String [—Notes String]


[—ReadCacheEnabled Boolean] [—ReadAheadCacheEnabled Boolean]
[—WriteCacheEnabled Boolean] [—ParentFolder String]
[—ParentSCVolumeFolder SCVolumeFolder] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Parameters

—Name String

Specifies the current name of the volume.

—NewName String

Specifies the new name to assign to the volume.

144 Storage Center Command Set 4.1 for Windows PowerShell


—Notes String

—Notes String

Adds text to a volume’s notes field.

—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

Specifies the volume folder under which to move the volume.

—ParentSCVolumeFolder SCVolumeFolder

Specifies the SCVolumeFolder object representing the folder under which to move the vol-
ume.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

—Index UInt32

Specifies the index of the volume to modify.

—LogicalPath String

Specifies the current logical path of the volume to modify.

Compellent Technologies 145


Command Reference

—SerialNumber String

Specifies the serial number of the volume to modify.

—SCVolume SCVolume

Specifies volume object representing the volume to modify.

Return Type

SCVolume

Examples

Example 1

C:\PS>Set-SCVolume -LogicalPath "Lab Volumes\Test Volume" \


-NewName "Test Results"

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

146 Storage Center Command Set 4.1 for Windows PowerShell


Set-SCVolumeFolder

Set-SCVolumeFolder

Description

This cmdlets sets attributes of a volume folder such as name and parent folder.

Syntax

Set-SCVolumeFolder [—Name] String [—NewName String] [—ParentFolder


String] [—ParentSCVolumeFolder SCVolumeFolder] [—Notes String]
[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Set-SCVolumeFolder [—Index UInt32] [—NewName String] [—ParentFolder


String] [—ParentSCVolumeFolder SCVolumeFolder] [—Notes String]
[—Connection SCConnection] [—ConnectionName String] [—WhatIf]
[—Confirm]

Set-SCVolumeFolder [—LogicalPath String] [—NewName String]


[—ParentFolder String] [—ParentSCVolumeolder SCVolumeFolder]
[—Notes String] [—Connection SCConnection] [—ConnectionName String]
[—WhatIf] [—Confirm]

Set-SCVolumeFolder [—SCVolumeFolder SCVolumeFolder] [—NewName


String] [—ParentFolder String] [—ParentSCVolumeFolder
SCVolumeFolder] [—Notes String] [—Connection SCConnection]
[—ConnectionName String] [—WhatIf] [—Confirm]

Parameters

—Name String

Specifies the current name of the volume folder to modify.

—NewName String

Specifies the new name to assign the volume folder.

—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.

Compellent Technologies 147


Command Reference

—Notes String

Specifies the notes to set on the volume folder.

—Connection SCConnection

Specifies a Storage Center connection object.

—ConnectionName String

Specifies the name of a saved Storage Center connection.

—WhatIf

Describes what would happen if you executed the command without actually executing
the command.

—Confirm

Prompts you for confirmation before executing the command.

—Index UInt32

Specifies the index of the volume folder.

—LogicalPath String

Specifies the current logical path of the volume folder.

—SCVolumeFolder SCVolumeFolder

Specifies the volume folder object representing the volume folder to modify.

Return Type

SCVolumeFolder

Examples

Example 1

C:\PS>Set-SCVolumeFolder -Name "Test Volumes" -Notes "These \


volumes are for use in the test lab"

This command sets the notes field of the volume folder named "Test Volumes".

Related Links

Get-SCVolumeFolder 56
Move-SCVolumeFolder 69
New-SCVolumeFolder 90

148 Storage Center Command Set 4.1 for Windows PowerShell


Related Links

Rename-SCVolumeFolder 125
Remove-SCVolumeFolder 112

Compellent Technologies 149


Command Reference

Set-Volume

Description

This cmdlet is used to set or clear flags of a volume on a Windows server.

Syntax

Set-Volume [[—Server] String] [—AccessPath String] [—Label String]


[—Status String] [—Health String] [—State String] [—FileSystemType
String] [—Flag String] [—Size String] [—ReadOnly Boolean] [—Hidden
Boolean] [—ClearShadowFlag] [—DiskSerialNumber String] [—WhatIf]
[—Confirm]

Parameters

—Server String

Specifies the server on which to perform the operation.

—AccessPath String

Specifies one of the drive letters or mount points of the volume to modify.

—Label String

Specifies the label of the volume.

—Status String

Specifies the status of the volume.

—Health String

Specifies the health of the volume.

—State String

Specifies the state of the volume.

—FileSystemType String

Specifies the type of file system on the volume.

—Flag String

Specifies one of the flags set on the volume.

150 Storage Center Command Set 4.1 for Windows PowerShell


—Size String

—Size String

Specifies the size of the volume in blocks. Values can be in megabytes (m), gigabytes (g),
or terabytes (t).

—ReadOnly Boolean

Specifies whether to set or clear the ReadOnly flag on the volume.

—Hidden Boolean

Specifies whether to set or clear the hidden flag on the volume.

—ClearShadowFlag

Specifies whether to clear the ShadowCopy flag on the volume.

—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

Prompts you for confirmation before executing the command.

Return Type

DataVolume

Examples

Example 1

C:\PS>Set-Volume -AccessPath G: -ReadOnly:$false -Hidden:$false\


-ClearShadowFlag

This command will clear the ReadOnly, Hidden, and ShadowCopy flags from the volume
with drive letter G:\.

Example 2

C:\PS>Set-Volume -SerialNumber 0000012d-000021a3 -ReadOnly

This command will set the ReadOnly flag on the volume(s) using the disk with serial num-
ber 0000012d-000021a3.

Compellent Technologies 151


Command Reference

Related Links

Add-VolumeAccessPath 19
Remove-VolumeAccessPath 117
Get-Volume 61
New-Volume 95
Rescan-DiskDevice 127
Get-DiskDevice 25
Get-SCVolume 53

152 Storage Center Command Set 4.1 for Windows PowerShell


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 153


Example Scripts

About Storage Center Command Set Examples


The following examples should be used as templates that must be edited to conform to your
specific requirements. These examples are a starting point for script development and are
not guaranteed to work in all situations.

For more information on how to execute a script, see Executing a Script on page 19.

154 Storage Center Command Set 4.1 for Windows PowerShell


Add New Database

Add New Database


# 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 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

# Check if we need to load the snapin


foreach ($snapin in $currentSnapins)
{
if ($snapin.Name -eq "Compellent.StorageCenter.Scripting")
{
$compSnapinLoaded = $TRUE
}
}

if ($compSnapinLoaded -eq $FALSE)


{
$null = Add-PSSnapin Compellent.StorageCenter.Scripting
}

Compellent Technologies 155


Example Scripts

# Load the necessary SQL SMO libraries for later use


#
$null =
[Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Connectio
nInfo")
$null =
[Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoEnum")
$null =
[Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo")

#
# 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
}

if (!(Test-Path -Path "$sqlDataDirectory\$dbName"))


{
$null = New-Item "$sqlDataDirectory\$dbName" -Type Directory
}

if (!(Test-Path -Path "$sqlDataDirectory\$dbName\Data"))


{
$null = New-Item "$sqlDataDirectory\$dbName\Data" -Type Directory
}

if (!(Test-Path -Path "$sqlDataDirectory\$dbName\Logs"))


{
$null = New-Item "$sqlDataDirectory\$dbName\Logs" -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

156 Storage Center Command Set 4.1 for Windows PowerShell


Add New Database

do
{
# Rescan the disk
Write-Host "Rescanning server for new volume..." -ForegroundColor Green
Rescan-DiskDevice -Server $servername -RescanDelay 5
$scancount ++

# Try getting the device again


$dbDisk = Get-DiskDevice -SerialNumber $dbScVolume.SerialNumber
}
until ($dbDisk -ne $null -or $scancount -eq 5)

# 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]
}

if ($logDisk.Count -ne $null)


{
$logDisk = $logDisk[0]
}

Write-Host "Creating new volumes on disk devices..." -ForegroundColor Green


$dbVolume = New-Volume -DeviceName $dbDisk.DeviceName -Label "$dbName Data"
-AccessPath "$sqlDataDirectory\$dbName\Data"
$logVolume = New-Volume -DeviceName $logDisk.DeviceName -Label "$dbName
Logs" -AccessPath "$sqlDataDirectory\$dbName\Logs"

#
# 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)

# Create the file group


$primaryFileGroup = New-Object
Microsoft.SqlServer.Management.Smo.FileGroup($database, "PRIMARY")
$database.FileGroups.Add($primaryFileGroup)

# Add the data file


$mdfFile = New-Object
Microsoft.SqlServer.Management.Smo.DataFile($primaryFileGroup, ($dbName +
"_Data"))
$primaryFileGroup.Files.Add($mdfFile)
$mdfFile.FileName = "$sqlDataDirectory\$dbName\Data\{0}_Data.mdf" -f
$dbName
$mdfFile.Size = [double](50.0 * 1024.0)
$mdfFile.GrowthType = 'Percent'
$mdfFile.Growth = 10.0
$mdfFile.IsPrimaryFile = 'True'

Compellent Technologies 157


Example Scripts

# Add the log file


$ldfFile = New-Object
Microsoft.SqlServer.Management.Smo.LogFile($database, ($dbName + "_Log"))
$database.LogFiles.Add($ldfFile)
$ldfFile.FileName = "$sqlDataDirectory\$dbName\Logs\{0}_Log.ldf" -f
$dbName
$ldfFile.Size = [double](10.0 * 1024.0)
$ldfFile.GrowthType = 'Percent'

# Initiate the actual creation


$database.Create()

Write-Host "Database $dbName now available" -ForegroundColor Green

158 Storage Center Command Set 4.1 for Windows PowerShell


Add New Storage Group

Add New Storage Group


# 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 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

# Check if we need to load the snapin


foreach ($snapin in $currentSnapins)
{
if ($snapin.Name -eq "Compellent.StorageCenter.Scripting")
{
$compSnapinLoaded = $TRUE
}

if ($snapin.Name -eq "Microsoft.Exchange.Management.PowerShell.Admin")


{
$exchSnapinLoaded = $TRUE
}
}

Compellent Technologies 159


Example Scripts

if ($compSnapinLoaded -eq $FALSE)


{
$null = Add-PSSnapin Compellent.StorageCenter.Scripting
}

if ($exchSnapinLoaded -eq $FALSE)


{
$null = Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
}

#
# 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
}

if (!(Test-Path -Path "C:\ExchangeData\$storageGroupName"))


{
$null = New-Item "C:\ExchangeData\$storageGroupName" -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 ++

160 Storage Center Command Set 4.1 for Windows PowerShell


Add New Storage Group

# Try getting the device again


$dbDisk = Get-DiskDevice -SerialNumber $dbScVolume.SerialNumber
}
until ($dbDisk -ne $null -or $scancount -eq 5)

# 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]
}

if ($logDisk.Count -ne $null)


{
$logDisk = $logDisk[0]
}

Write-Host "Creating new volumes on disk devices..." -ForegroundColor Green


$dbVolume = New-Volume -DeviceName $dbDisk.DeviceName -Label
"$storageGroupName Data" -AccessPath "C:\ExchangeData\$storageGroupName"

if (!(Test-Path -Path "C:\ExchangeData\$storageGroupName\Logs"))


{
$null = New-Item "C:\ExchangeData\$storageGroupName\Logs" -Type Directory
}

$logVolume = New-Volume -DeviceName $logDisk.DeviceName -Label


"$storageGroupName Logs" -AccessPath
"C:\ExchangeData\$storageGroupName\Logs"

#
# 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"

Write-Host "Creating database in storage group..." -ForegroundColor Green


$db = new-mailboxdatabase -StorageGroup "$sg" -Name $databaseName -
EdbFilePath "C:\ExchangeData\$storageGroupName\Database1.edb"

Write-Host "Mounting new database..." -ForegroundColor Green


$dbIdentity = $db.Identity.Parent + "\" + $db.Identity.Name
mount-database -Identity $dbIdentity

Write-Host "Database $databaseName now available in storage group


$storageGroupName" -ForegroundColor Green

Compellent Technologies 161


Example Scripts

Create New User Account for Everyone in User Group


# 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 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)

foreach ($member in $group.Member)


{
$user = new-object DirectoryServices.DirectoryEntry("LDAP://$member")

if ($user -ne $null)


{
New-SCUser -Name $user.samAccountName.Value -FullName
$user.displayName.Value -BusinessPhone $user.telephoneNumber.Value -
MobilePhone $user.mobile.Value -Email $user.mail.Value -Department
$user.department.Value -Password (ConvertTo-SecureString -Force -
AsPlainText $user.samAccountName.value)
}
}

162 Storage Center Command Set 4.1 for Windows PowerShell


Push to Tape

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")
)

#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"

# Storage Center User to run script


$user = "Admin"

# Storage Center Password (stored in clear text for this script)


$pass = ConvertTo-SecureString "mmm" -AsPlainText -Force
# The following line can be used as an alternate way to get the password
without hard coding it
#$pass = Read-Host -AsSecureString -Prompt "Please provide the Storage
Center password for $user"

# Storage Center Host Name or IP Address


$schost = "comp1"

# Instantiate Connection to Storage Center


# Uncomment last section to have this Storage Center connection saved as
the default connection to use
# for all command.
$connection = Get-SCConnection -HostName $schost -User $user -Password
$pass #-Save $schost -Default

# Get Server Info


$scserver = Get-SCServer -Name $servername
if ($scserver -eq $null)
{
Write-Host "Unable to find server $servername on Storage Center $schost!"
-ForegroundColor Red
break;
}

Compellent Technologies 163


Example Scripts

# Get last replay from volume


Write-Host "Checking for available replays for this volume..."
$replays = Get-SCReplay -SourceVolumeName $volumename | where{$_.State -eq
"Frozen"}

if ($replays -eq $null -or $replays.Count -eq 0)


{
Write-Host "No frozen replays were found for volume $volumename!" -
ForegroundColor Red
break;
}

# We want only the most recent replay


$latestreplay = $replays[-1]

# Create View
$newreplayname = "$volumename View " + $latestreplay.Index
Write-Host "Creating view from replay..."
$replayview = New-SCVolume -SourceReplay $latestreplay -Name
$newreplayname

# Map View to server


Write-Host "Mapping new replay view to server..."
New-SCVolumeMap -VolumeIndex $replayview.Index -ServerIndex
$scserver.Index -SinglePath

# Rescan Server
Write-Host "Rescanning server for new replay volume..."
Rescan-DiskDevice -Server $servername -RescanDelay 5

# Add Access Path


Write-Host "Adding access path for new replay volume..."
Add-VolumeAccessPath -SerialNumber $replayview.SerialNumber -Server
$servername -AccessPath $accesspath

# Kick off tape backup process here


Write-Host "Backup up volume to tape..."
Start-Sleep -Seconds 10

# Get rid of the view volume


Write-Host "Removing replay view volume..."
$pref = $ConfirmPreference
$ConfirmPreference = None
Remove-SCVolume -Index $replayview.Index -SkipRecycleBin
$ConfirmPreference = $pref

# Clean up on the server


Rescan-DiskDevice -Server $servername -RescanDelay 5

164 Storage Center Command Set 4.1 for Windows PowerShell


680-037-001 A

Potrebbero piacerti anche