Administrator Guide

The $connection variable is used with the -Connection parameter to connect to a Storage Center. For example:
Get-SCVolume -Connection $connection
Save Connection Information to a -ConnectionName Object
Connection information can be saved to a -ConnectionName object using the -Save parameter with the Get-SCConnection
command. For example:
Get-SCConnection -HostName mmt1 -User Admin -Password $pass -Save connectionname
The saved object is used with the -ConnectionName parameter to connect to a Storage Center. For example:
Get-SCVolume -ConnectionName connectionname
Enter Connection Information Interactively
If you do not provide all required parameters (-HostName, -User, -Password) for the Get-SCConnection command, the system
prompts for the missing information. This method still requires storing connection information in a variable or as a connection name.
Creating Default Connections
To create a default Storage Center connection, use the -Default or -DestinationDefault parameters when executing the Get-
SCConnection cmdlet.
Saving a connection as the default allows Storage Center cmdlets to be executed without specifying the -Connection or -
ConnectionName parameters.
Saving a destination default connection allows Storage Center cmdlets that require a destination connection to be executed
without specifying the -DestConnection or -DestConnectionName parameters.
For details and examples, see Viewing and Printing Command Line Help.
Creating SecureString Passwords
SecureString objects are used in Windows PowerShell cmdlets as a security measure. SecureStrings are encrypted in memory and
the content of a SecureString variable cannot be displayed. For this reason, SecureString objects are commonly used for sensitive
information such as passwords.
NOTE: If security is not a prime concern, passwords can be entered directly on the command line without obscuring the
text. For example:
$pass = ConvertTo-SecureString "mypassword" -AsPlainText -Force
SecureString Input
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 returns the following prompt:
Please provide password:
The password is obscured by asterisks (*) and stored in the variable.
Stored Values
SecureString values can be stored for later access. The encryption used for the SecureString is based on the logged-on user
credentials. The credentials help prevent another user from accessing the stored value and deriving the password. However, the
saved data should be kept in a secure location and NTFS permissions might also be used to further protect it from unwanted access.
To store your password in an encrypted le:
1. Enter the following command:
$pass = Read-Host -AsSecureString -Prompt "Please provide password"
PowerShell prompts for a password.
Please provide password:
2. Enter your password.
3. Save your password to a text le:
ConvertFrom-SecureString $pass > C:\password.txt
Using the Command Set
9