Upload
others
View
14
Download
0
Embed Size (px)
Citation preview
EMC® Storage Integrator PowerShell Toolkit
User Guide 300-014-307
EMC Storage Integrator PowerShell Toolkit User Guide
Copyright © 2012 EMC Corporation. All rights reserved.
Published June 2012
EMC believes the information in this publication is accurate as of its publication date. The information is subject to change without notice.
The information in this publication is provided as is. EMC Corporation makes no representations or warranties of any kind with respect to the information in this publication, and specifically disclaims implied warranties of merchantability or fitness for a particular purpose. Use, copying, and distribution of any EMC software described in this publication requires an applicable software license.
EMC2, EMC, and the EMC logo are registered trademarks or trademarks of EMC Corporation in the United States and other countries. All other trademarks used herein are the property of their respective owners.
For the most up-to-date regulatory document for your product line, go to the technical documentation and advisories section on the EMC online support website.
EMC Storage Integrator PowerShell Toolkit
User Guide
Part Number 300-014-307
EMC Storage Integrator PowerShell Toolkit User Guide
3
Contents
Chapter 1 Getting Started ............................................................... 9
Introduction .............................................................................................. 10
System requirements ................................................................................ 10
Chapter 2 PowerShell Usage ........................................................... 11
Introduction .............................................................................................. 12
PowerShell objects ................................................................................... 12
Defining and accessing variables .............................................................. 12
Retrieving object information .................................................................... 12
Standard object descriptions .................................................................... 13
Chapter 3 Example Scripts .............................................................. 15
Introduction .............................................................................................. 16
Provisioning a new storage volume ........................................................... 16
Removing a storage volume ...................................................................... 18
Chapter 4 Cmdlet Reference ............................................................ 21
Introduction .............................................................................................. 22
Connection-related operations.................................................................. 26 Connect-EmcSystem ........................................................................................ 26 Disconnect-EmcClusterSystem ......................................................................... 27 Disconnect-EmcHostSystem ............................................................................. 29 Disconnect-EmcStorageSystem ........................................................................ 31 Disconnect-EmcSystem .................................................................................... 33 Get-EmcClusterSystemCredential ..................................................................... 36 Get-EmcHostSystemCredential ......................................................................... 37 Get-EmcStorageSystemCredential .................................................................... 38 Update-EmcSystem .......................................................................................... 39
Storage system operations ....................................................................... 41 Add-EmcStorageAccessControl ........................................................................ 41 Disable-EmcSnapshotLun ................................................................................ 42
Contents
EMC Storage Integrator PowerShell Toolkit User Guide
4
Enable-EmcSnapshotLun ................................................................................. 43 Expand-EmcFileBasedDisk ............................................................................... 45 Expand-EmcLun ............................................................................................... 46 Export-EmcStorageAccessControl ..................................................................... 46 Get-EmcLun ..................................................................................................... 48 Get-EmcScsiLun ............................................................................................... 51 Get-EmcSharedFolder ...................................................................................... 53 Get-EmcSnapshotLun ....................................................................................... 55 Get-EmcSnapshotPool ..................................................................................... 57 Get-EmcStandbyLun ......................................................................................... 58 Get-EmcStorageGroup ...................................................................................... 59 Get-EmcStoragePool ........................................................................................ 60 Get-EmcStorageServiceNode ............................................................................ 62 Get-EmcStorageSystem .................................................................................... 64 Get-EmcTargetPort ........................................................................................... 66 Get-EmcVNXFileStoragePool ............................................................................. 68 Import-EmcStorageAccessControl .................................................................... 69 New-EmcCandidateSnapshotLun ..................................................................... 70 New-EmcCifsSharedFolder ............................................................................... 71 New-EmcLun .................................................................................................... 72 New-EmcSnapshotLun ..................................................................................... 74 New-EmcStandbyLun ....................................................................................... 75 New-EmcStorageAccessControl ........................................................................ 76 New-EmcVNXSharedFolderPool ........................................................................ 77 Remove-EmcCifsSharedFolder .......................................................................... 78 Remove-EmcCifsSharedFolderMountPoint........................................................ 79 Remove-EmcFileBasedDisk .............................................................................. 80 Remove-EmcLun .............................................................................................. 81 Remove-EmcSnapshotLun................................................................................ 83 Remove-EmcStandbyLun .................................................................................. 84 Remove-EmcStorageAccessControl .................................................................. 85 Remove-EmcVNXSharedFolderPool .................................................................. 86 Restore-EmcSnapshotLun ................................................................................ 87 Set-EmcCifsSharedFolderMountPoint ............................................................... 88 Set-EmcLunAccess ........................................................................................... 90
Host operations ........................................................................................ 93 Add-EmcHostDiskToCluster .............................................................................. 93 Clear-EmcHostDiskSignature ............................................................................ 95 Expand-EmcHostVolume .................................................................................. 96 Find-EmcHostDisk ............................................................................................ 97 Get-EmcAvailableDriveLetter .......................................................................... 100
Contents
EMC Storage Integrator PowerShell Toolkit User Guide
5
Get-EmcCifsNetworkShare ............................................................................. 101 Get-EmcClusterDisk ....................................................................................... 102 Get-EmcClusterGroup ..................................................................................... 104 Get-EmcClusterSystem ................................................................................... 105 Get-EmcHostBusAdapter ................................................................................ 106 Get-EmcHostDisk ........................................................................................... 107 Get-EmcHostLunIdentifier .............................................................................. 110 Get-EmcHostSystem ....................................................................................... 112 Get-EmcHostVolume ...................................................................................... 114 Initialize-EmcHostDisk ................................................................................... 116 New-EmcVolume ............................................................................................ 118 Remove-EmcHostDiskFromCluster .................................................................. 121 Remove-EmcVolumeMountPoint .................................................................... 123 Set-EmcHostDiskOnlineState ......................................................................... 125 Set-EmcHostDiskReadonlyState ..................................................................... 127 Set-EmcVolumeMountPoint ........................................................................... 129
Hypervisor virtualization operations ....................................................... 132 Add-EmcFilebasedDiskToVirtualMachine ....................................................... 132 Add-EmcPassthroughDiskToVirtualMachine ................................................... 134 Add-EmcXenServerVirtualDisk ........................................................................ 138 Get-EmcAvailablePassthroughDiskCandidate ................................................ 139 Get-EmcAvailableScsiControllerLocation ........................................................ 140 Get-EmcDataStore .......................................................................................... 142 Get-EmcESXHost ............................................................................................ 144 GetEmcHyperVSystemCredential .................................................................... 146 Get-EmcVirtualDiskConfiguration ................................................................... 146 Get-EmcVirtualMachineConfiguration ............................................................. 148 Get-EmcVirtualMachineHypervisor ................................................................. 149 Get-EmcVirtualMachineScsiController ............................................................ 151 Get-EmcVMwareSystem ................................................................................. 153 Get-EmcVMwareSystemCredential ................................................................. 155 Get-EmcXenServerHost .................................................................................. 156 Get-EmcXenServerStorageRepository ............................................................. 157 Get-EmcXenServerSystem .............................................................................. 158 Get-EmcXenServerSystemCredential .............................................................. 159 Get-EmcXenServerVirtualDiskImage ............................................................... 160 New-EmcFileBasedDisk .................................................................................. 161 New-EmcXenServerStorageRepository ............................................................ 162 New-EmcXenServerVirtualDiskImage .............................................................. 163 Remove-EmcVirtualDiskFromVm .................................................................... 164 Remove-EmcXenServerStorageRepository ...................................................... 167
Contents
EMC Storage Integrator PowerShell Toolkit User Guide
6
Remove-EmcXenServerVirtualDisk ................................................................. 168 Remove-EmcXenServerVirtualDiskImage ........................................................ 169
EMC Storage Integrator PowerShell Toolkit User Guide
7
Preface
To improve and enhance the performance and capabilities of the EMC product line, EMC® releases timely hardware and software updates. Because of these updates, this guide may not be supported by all available software or hardware releases. For the most up-to-date information on product features, refer to the product release notes.
If a product does not function properly or does not function as described in this document, please contact your EMC representative.
Note This document was accurate as of the time of publication. However, as information is added, new versions of this document may be released to the EMC Online Support website. Check the website to ensure that you are using the latest version of this document.
Purpose
This document describes how to configure and use EMC Storage Integrator (ESI) from a Microsoft® Windows® PowerShellTM scripting environment.
Audience
This document is for internal EMC personnel, partners, and customers. The intended audience is users who use ESI to configure and provision EMC storage from a command-line interface, or who want to automate various aspects of the provisioning process with scripts.
Related documents
The following documents, located on EMC Online Support website, provide additional relevant information. Access to these documents is based on the login credentials. If you do not have access to the following documents, contact your EMC representative:
• EMC Storage Integrator for Windows—Online Help
• EMC Storage Integrator for Windows—Product Guide
• EMC Storage Integrator for Windows—Release Notes
• EMC Storage Integrator for Windows—Technical Notes
Getting Started
EMC Storage Integrator PowerShell Toolkit User Guide
8
EMC Storage Integrator PowerShell Toolkit User Guide
9
Chapter 1 Getting Started
This chapter presents the following topics:
Introduction ................................................................................. 10
System requirements ............................................................................. 10
Getting Started
EMC Storage Integrator PowerShell Toolkit User Guide
10
Introduction EMC Storage Integrator (ESI) for Microsoft Windows includes a PowerShell Toolkit that provisions storage to Microsoft Windows hosts that use EMC storage. This toolkit includes a set of PowerShell cmdlets to provision storage from the command line.
The ESI PowerShell Toolkit provides access to most of the provisioning functionality offered by the ESI Microsoft Management Console (MMC) application and shares a common configuration set with the MMC application.
The cmdlets are written for the PowerShell 2.0 platform, which is developed by Microsoft specifically for Windows System Management automation.
The PowerShell toolkit provides cmdlets to manage:
• Connections to host and storage systems and to provision block storage.
• Disk devices in hypervisor environments, such as VMware vSphere, Microsoft Hyper-V, and Citrix XenServer.
• Block device snapshots for EMC Symmetrix VMAX® storage family, EMC VNX® series, EMC VNXe® series, and EMC CLARiiON® CX4 series of storage systems.
System requirements The ESI PowerShell Toolkit is installed as part of the ESI product. The requirements are the same as for ESI. However, in order to use the PowerShell Toolkit, Windows PowerShell 2.0 must be installed and enabled as a Windows feature.
The ESI PowerShell Toolkit can be installed only on x64 Windows systems.
EMC Storage Integrator PowerShell Toolkit User Guide
11
Chapter 2 PowerShell Usage
This chapter presents the following topics:
Introduction ................................................................................. 12
PowerShell objects ................................................................................ 12
Defining and accessing variables ........................................................... 12
Retrieving object information ................................................................. 12
Standard object descriptions ................................................................. 13
PowerShell Usage
EMC Storage Integrator PowerShell Toolkit User Guide
12
Introduction To use the ESI PowerShell Toolkit, import the toolkit module in either the interactive or scripting environment by typing the following PowerShell command at the PowerShell command prompt:
import-module ESIPSToolkit
Note: You must type this command each time before using the Toolkit.
PowerShell objects The cmdlets in the PowerShell toolkit, like all other Windows PowerShell cmdlets, accept objects as inputs. The inputs can be standard objects such as strings and integers. In many instances, these inputs have useful properties that can be accessed using dot notation. However, the full list of these objects and their properties is beyond the scope of this document.
Defining and accessing variables PowerShell enables you to create objects and store them in variables. For example, an ESI LUN object can be created and stored in a variable by using the Get-EmcLun command:
$lun = Get-EmcLun “My LUN”
This LUN object is used with the Set-EmcLunAccess cmdlet to present the LUN to a host:
Set-EmcLunAccess –LUN $lun –HostSystem $myhost -Available
Retrieving object information Use the Get-Member cmdlet to access information about the properties and methods supported by an object. The Get-Member command accepts pipeline inputs. The user can pipe an object returned by a cmdlet to Get-Member to determine the properties and methods of the object.
PowerShell Usage
EMC Storage Integrator PowerShell Toolkit User Guide
13
Standard object descriptions The following table lists common PowerShell objects.
Object Description
Boolean Represents a true or false value. For true, type 1 or $true. For false, type 1 or $false.
Int32 Represents a 32-bit signed integer. Signed integers are either positive or negative.
Int64 Represents a 64-bit signed integer. Signed integers are either positive or negative.
SecureString Represents an encrypted string for private data.
String Represents a set of alphanumeric characters. A string that contains the space character must be enclosed by quotation marks. For example: Get-EmcLun “My Basic LUN”
UInt32 Represents a 32-bit unsigned integer. Unsigned integers cannot be negative.
UInt64 Represents a 64-bit unsigned integer. Unsigned integers cannot be negative.
PowerShell Usage
EMC Storage Integrator PowerShell Toolkit User Guide
14
EMC Storage Integrator PowerShell Toolkit User Guide
15
Chapter 3 Example Scripts
This chapter presents the following topics:
Introduction ................................................................................. 16
Provisioning a new storage volume ........................................................ 16
Removing a storage volume ................................................................... 18
Example Scripts
EMC Storage Integrator PowerShell Toolkit User Guide
16
Introduction This chapter provides example scripts for the following:
• Provisioning a new storage volume
• Removing a storage volume
Provisioning a new storage volume The following script is an example of how to:
• Create a new 100 GB thin LUN on a VNX storage pool
• Present the LUN to a Windows 2008 R2 host and initialize the disk
• Create an NTFS volume and mount it on an available drive letter. Connections to the storage system and host are assumed to be available.
Example script
PS C:\Users\administrator.BROOKSDOM> import-module esipstoolkit
PS C:\Users\administrator.BROOKSDOM> $pool = Get-EmcStoragePool "VM Pool"
Block storage system: [Name = APM00111102550. UserFriendlyName = VNX5100]. Lun Pools are not initialized. Refreshing Lun
Pools.
PS C:\Users\administrator.BROOKSDOM> $system = Get-EmcHostSystem NEC-BLADE6
PS C:\Users\administrator.BROOKSDOM> $lun = New-EmcLun -Pool $pool -CapacityInMB 102400 -Thin
TaskStatus: Started
10% : Creating the LUN...
100% : The specified LUN has been created...
TaskStatus: Completed
PS C:\Users\administrator.BROOKSDOM> Set-EmcLunAccess -Lun $lun -HostSystem $system -Available
TaskStatus: Started
10% : Unmasking the LUN to the specified host(s)...
100% : The specified LUN has been unmasked to the specified initiators...
TaskStatus: Completed
PS C:\Users\administrator.BROOKSDOM> $hdisk=Get-EmcHostDisk -
Host: NEC-BLADE6. Refreshing MultiPath software information.
Example Scripts
EMC Storage Integrator PowerShell Toolkit User Guide
17
Host: NEC-BLADE6. Retrieving disk information from Virtual Disk Service.
WARNING: Unable to find host disk(s) with the given parameters
PS C:\Users\administrator.BROOKSDOM> $hdisk=Get-EmcHostDisk -HostSystem $system -Lun $lun
PS C:\Users\administrator.BROOKSDOM> Initialize-EmcHostDisk -HostSystem $system -HostDisk $hdisk -PartitionStyle GPT
TaskStatus: Started
10% : Initializing the disk...
100% : The specified disk has been initialized...
TaskStatus: Completed
PS C:\Users\administrator.BROOKSDOM> $vol =New-EmcVolume -HostSystem $system -HostDisk $hdisk -FileSystemType NTFS -Labe
l TestVolume
TaskStatus: Started
10% : Provisioning the volume...
100% : The specified volume has been provisioned...
TaskStatus: Completed
PS C:\Users\administrator.BROOKSDOM> Get-EmcAvailableDriveLetter -HostSystem $system
A, B, D, E, F, … (up to Z, except for default C)
PS C:\Users\administrator.BROOKSDOM> Set-EmcVolumeMountPoint -HostSystem $system -Volume $vol -DriveLetter Z
TaskStatus: Started
10% : Mounting the volume...
100% : The specified volume has been mounted...
TaskStatus: Completed
PS C:\Users\administrator.BROOKSDOM>
Example Scripts
EMC Storage Integrator PowerShell Toolkit User Guide
18
Removing a storage volume The following script is an example of how to:
• Remove a volume from a host,
• Delete the LUN where it resides, and
• Map the Windows volume to the storage LUN, so knowledge of the LUN identity is not assumed.
Example script
PS C:\Users\administrator.BROOKSDOM> import-module esipstoolkit
PS C:\Users\administrator.BROOKSDOM> $system = Get-EmcHostSystem NEC-BLADE6
PS C:\Users\administrator.BROOKSDOM> $vol = Get-EmcHostVolume -HostSystem $system -ID TestVolume
Host: NEC-BLADE6. Refreshing MultiPath software information.
Host: NEC-BLADE6. Retrieving disk information from Virtual Disk Service.
PS C:\Users\administrator.BROOKSDOM> $hdisk = Get-EmcHostDisk -Volume $vol
PS C:\Users\administrator.BROOKSDOM> $lun = Get-EmcLUN -HostDisk $hdisk
Associating the specified host disk with its corresponding storage system...
PS C:\Users\administrator.BROOKSDOM> Remove-EmcVolumeMountPoint -HostSystem $system -Volume $vol
TaskStatus: Started
10% : Unmounting the volume...
100% : The specified volume has been unmounted...
TaskStatus: Completed
PS C:\Users\administrator.BROOKSDOM> Set-EmcHostDiskOnlineState -HostDisk $hdisk -Offline
TaskStatus: Started
10% : Bringing the disk offline...
100% : The specified disk has been brought offline...
TaskStatus: Completed
PS C:\Users\administrator.BROOKSDOM> Set-EmcLunAccess -HostSystem $system -Lun $lun -Unavailable
TaskStatus: Started
10% : Masking the LUN from the initiators...
Example Scripts
EMC Storage Integrator PowerShell Toolkit User Guide
19
100% : The specified LUN has been masked from the specified initiators...
TaskStatus: Completed
PS C:\Users\administrator.BROOKSDOM> Update-EmcSystem -HostSystem $system
Refreshing disks of host system '[Name: NEC-BLADE6, IP address: 172.20.1.106.]'
Host: NEC-BLADE6. Refreshing MultiPath software information.
Host: NEC-BLADE6. Retrieving disk information from Virtual Disk Service.
PS C:\Users\administrator.BROOKSDOM> Remove-EmcLun -Lun $lun
Confirm
Are you sure you want to perform this action?
Performing operation "Remove-EmcLun" on Target "LUN 44".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
TaskStatus: Started
10% : Destroying the LUN...
100% : The specified LUN has been destroyed...PS C:\Users\administrator.BROOKSDOM>
TaskStatus: Completed
Example Scripts
EMC Storage Integrator PowerShell Toolkit User Guide
20
EMC Storage Integrator PowerShell Toolkit User Guide
21
Chapter 4 Cmdlet Reference
This chapter presents the following topics:
Introduction ................................................................................. 22
Connection-related operations ............................................................... 26
Storage system operations ..................................................................... 41
Host operations ................................................................................. 93
Hypervisor virtualization operations ....................................................... 132
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
22
Introduction This chapter lists the ESI PowerShell cmdlets grouped by operation type. Within each group, the cmdlets are listed alphabetically. The syntax, parameters and examples are provided for each cmdlet. To get the same information, type Get-Help at the PowerShell command prompt. Following is the complete list of available cmdlets.
Connection-related operations
o Connect-EmcSystem
o Disconnect-EmcClusterSystem
o Disconnect-EmcHostSystem
o Disconnect-EmcStorageSystem
o Disconnect-EmcSystem
o Get-EmcClusterSystemCredential
o Get-EmcHostSystemCredential
o Get-EmcStorageSystemCredential
o Update-EmcSystem
Storage system operations
o Add-EmcStorageAccessControl
o Disable-EmcSnapshotLun
o Enable-EmcSnapshotLun
o Expand-EmcFileBasedDisk
o Expand-EmcLun
o Export-EmcStorageAccessControl
o Get-EmcLun
o Get-EmcScsiLun
o Get-EmcSharedFolder
o Get-EmcSnapshotLun
o Get-EmcSnapshotPool
o Get-EmcStandbyLun
o Get-EmcStorageGroup
o Get-EmcStoragePool
o Get-EmcStorageServiceNode
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
23
o Get-EmcStorageSystem
o Get-EmcTargetPort
o Get-EmcVNXFileStoragePool
o Import-EmcStorageAccessControl
o New-EmcCandidateSnapshotLun
o New-EmcCifsSharedFolder
o New-EmcLun
o New-EmcSnapshotLun
o New-EmcStandbyLun
o New-EmcStorageAccessControl
o New-EmcVNXSharedFolderPool
o Remove-EmcCifsSharedFolder
o Remove-EmcCifsSharedFolderMountPoint
o Remove-EmcFileBasedDisk
o Remove-EmcLun
o Remove-EmcSnapshotLun
o Remove-EmcStandbyLun
o Remove-EmcStorageAccessControl
o Remove-EmcVNXSharedFolderPool
o Restore-EmcSnapshotLun
o Set-EmcCifsSharedFolderMountPoint
o Set-EmcLunAccess
Host operations
o Add-EmcHostDiskToCluster
o Clear-EmcHostDiskSignature
o Expand-EmcHostVolume
o Find-EmcHostDisk
o Get-EmcAvailableDriveLetter
o Get-EmcCifsNetworkShare
o Get-EmcClusterDisk
o Get-EmcClusterGroup
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
24
o Get-EmcClusterSystem
o Get-EmcHostBusAdapter
o Get-EmcHostDisk
o Get-EmcHostLunIdentifier
o Get-EmcHostSystem
o Get-EmcHostVolume
o Initialize-EmcHostDisk
o New-EmcVolume
o Remove-EmcHostDiskFromCluster
o Remove-EmcVolumeMountPoint
o Set-EmcHostDiskOnlineState
o Set-EmcHostDiskReadonlyState
o Set-EmcVolumeMountPoint
Hypervisor virtualization operations
o Add-EmcFilebasedDiskToVirtualMachine
o Add-EmcPassthroughDiskToVirtualMachine
o Add-EmcXenServerVirtualDisk
o Get-EmcAvailablePassthroughDiskCandidate
o Get-EmcAvailableScsiControllerLocation
o Get-EmcDataStore
o Get-EmcESXHost
o Get-EmcHyperVSystemCredential
o Get-EmcVirtualDiskConfiguration
o Get-EmcVirtualMachineHypervisor
o Get-EmcVirtualMachineScsiController
o Get-EmcVMwareSystem
o Get-EmcVMwareSystemCredential
o Get-EmcXenServerHost
o Get-EmcXenServerStorageRepository
o Get-EmcXenServerSystem
o Get-EmcXenServerSystemCredential
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
25
o Get-EmcXenServerVirtualDiskImage
o New-EmcFileBasedDisk
o New-EmcXenServerStorageRepository
o New-EmcXenServerVirtualDiskImage
o Remove-EmcVirtualDiskFromVm
o Remove-EmcXenServerStorageRepository
o Remove-EmcXenServerVirtualDisk
o Remove-EmcXenServerVirtualDiskImage
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
26
Connection-related operations
Connect-EmcSystem Connects the host, cluster, and storage systems to ESI.
Syntax
Connect-EmcSystem -CreationBlob <String> [-Silent] [<CommonParameters>
Description
The Connect-EmcSystem cmdlet is used to connect the host, cluster, and storage systems to ESI from the specified creation blob. It is generally used along with the Get-EmcHostSystemCredential, Get-EmcClusterSystemCredential and Get-EmcStorageSystemCredential cmdlets to get the creation blob.
Parameters
-CreationBlob <String>
Attributes: Required, Position: 1, Accepts pipeline input (by value) Specifies the creation blob. It is an encrypted connection (creation) parameters blob. You can obtain it by using the Get-EmcHostSystemCredential, Get-EmcClusterSystemCredential, and Get-EmcStorageSystemCredential cmdlets.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$hBlob = Get-EmcHostSystemCredential
C:\PS>$h = $hBlob | Connect-EmcSystem
C:\PS>$h = Connect-EmcSystem -CreationBlob $hBlob
The Get-EmcHostSystemCredential cmdlet returns the creation blob, which is used to connect the host system to ESI.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
27
-------------- Example 2 --------------
C:\PS>$cBlob = Get-EmcClusterSystemCredential
C:\PS>$c = $cBlob | Connect-EmcSystem
C:\PS>$c = Connect-EmcSystem -CreationBlob $cBlob
The Get-EmcClusterSystemCredential cmdlet returns the creation blob, which is used to connect the cluster system to ESI.
-------------- Example 3 --------------
C:\PS>$sBlob = Get-EmcStorageSystemCredential
C:\PS>$s = $sBlob | Connect-EmcSystem
C:\PS>$s = Connect-EmcSystem -CreationBlob $sBlob
The Get-EmcStorageSystemCredential cmdlet returns the creation blob, which is used to connect the storage system to ESI.
Disconnect-EmcClusterSystem Disconnects the cluster system.
Syntax
• Disconnect-EmcClusterSystem [-Id <String>] [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
• Disconnect-EmcClusterSystem [-Force] [-System <IClusterSystem>] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
-Id <String>
Attributes: Optional, Position: 1
Specifies the cluster name, IP address, or global ID. Wildcards are permitted. It is a positional parameter (position = 1).
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the cmdlet to continue without asking for the user's confirmation.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
28
Describes what would happen if the command were executed.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
Prompts the user for confirmation before executing the command.
-System <IClusterSystem>
Attributes: Optional, Position: named, Accepts pipeline input (by value)
Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can obtain a cluster system object by using the Get-EmcClusterSystem cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$cBlob = Get-EmcClusterSystemCredential
C:\PS>$c = $cBlob | Connect-EmcSystem
C:\PS>Disconnect-EmcClusterSystem
This example disconnects the connected cluster system after user confirmation.
-------------- Example 2 --------------
C:\PS>$cBlob = Get-EmcClusterSystemCredential
C:\PS>$c = $cBlob | Connect-EmcSystem
C:\PS>Disconnect-EmcClusterSystem -System $c –Confirm
This example disconnects the specified cluster system.
-------------- Example 3 --------------
C:\PS>Disconnect-EmcClusterSystem -Id mycluster*
C:\PS>Disconnect-EmcClusterSystem -Id 10.x.y.*
C:\PS>Disconnect-EmcClusterSystem 2cc75087-8ddf*
This example disconnects the cluster system based on the specified cluster name, IP address, or global ID. Wild cards are permitted. Because the ID parameter is positional, you can omit the name.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
29
-------------- Example 4 --------------
C:\PS>$cBlob = Get-EmcClusterSystemCredential
C:\PS>$c = $cBlob | Connect-EmcSystem
C:\PS>Disconnect-EmcClusterSystem -System $c –Force
This example disconnects the specified cluster system without asking for the user's confirmation.
-------------- Example 5 --------------
C:\PS>$cBlob = Get-EmcClusterSystemCredential
C:\PS>$c = $cBlob | Connect-EmcSystem
C:\PS>Disconnect-EmcClusterSystem -System $c
This example disconnects the specified cluster system.
Disconnect-EmcHostSystem Disconnects the host system.
Syntax
• Disconnect-EmcHostSystem [-Id <String>] [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
• Disconnect-EmcHostSystem [-Force] [-System <IHostSystem>] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
-Id <String>
Attributes: Optional, Position: 1
Specifies the host name, IP address, or global ID. Wildcards are permitted. It is a positional parameter (position = 0).
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the cmdlet to continue without asking for the user's confirmation.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
30
Describes what would happen if the command were executed.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
Prompts the user for confirmation before executing the command.
-System <IHostSystem>
Attributes: Optional, Position: named, Accepts pipeline input (by value)
Specifies the ESI host system object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a host system object by using the Get-EmcHostSystem cmdlet. It can be a standalone host system, a virtual machine, or a hypervisor.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$hBlob = Get-EmcHostSystemCredential
C:\PS>$h = $hBlob | Connect-EmcSystem
C:\PS>Disconnect-EmcHostSystem
C:\PS>Get-EmcHostSystem | Disconnect-EmcHostSystem
This example disconnects the connected host system after confirmation from the user.
-------------- Example 2 --------------
C:\PS>$hBlob = Get-EmcHostSystemCredential
C:\PS>$h = $hBlob | Connect-EmcSystem
C:\PS>Disconnect-EmcHostSystem -System $h -Confirm
C:\PS>Disconnect-EmcHostSystem -System $h
C:\PS>Disconnect-EmcHostSystem -System $h -Force
C:\PS>$h | Disconnect-EmcHostSystem
This example disconnects the host system.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
31
-------------- Example 3 --------------
C:\PS>Disconnect-EmcHostSystem -Id myhost*
C:\PS>Disconnect-EmcHostSystem -Id 10.x.y.*
C:\PS>Disconnect-EmcHostSystem 2cc75087-8ddf*
This example disconnects the host system based on the specified host name, IP address, or global ID. Wild cards are permitted. Because the ID parameter is positional, you can omit the name.
Disconnect-EmcStorageSystem Disconnects the storage system.
Syntax
• Disconnect-EmcStorageSystem [-Id <String>] [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
• Disconnect-EmcStorageSystem [-Force] [-System <IStorageSystem>] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
-Id <String>
Attributes: Optional, Position: 1
Specifies the storage system name, userfriendlyname, or global ID. Wildcards are permitted. It is a positional parameter (position = 0).
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the cmdlet to continue without asking for the user's confirmation.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Describes what would happen if the command were executed.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
Prompts the user for confirmation before executing the command.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
32
-System <IStorageSystem>
Attributes: Optional, Position: named, Accepts pipeline input (by value)
Specifies the ESI storage system object. You can add a storage system object to ESI by using the Get-EmcStorageSystemCredential and Connect-EmcSystem cmdlets. You can obtain a storage system object by using the Get-EmcStorageSystem cmdlet. It can be either a block storage system or file storage system.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$sBlob = Get-EmcStorageSystemCredential
C:\PS>$s = $sBlob | Connect-EmcSystem
C:\PS>Disconnect-EmcStorageSystem
C:\PS>get-emcstoragesystem | Disconnect-EmcStorageSystem
This example disconnects the connected storage system after the user’s confirmation.
-------------- Example 2 --------------
C:\PS>$sBlob = Get-EmcStorageSystemCredential
C:\PS>$s = $sBlob | Connect-EmcSystem
C:\PS>Disconnect-EmcStorageSystem -System $s -Confirm
C:\PS>Disconnect-EmcStorageSystem -System $s
C:\PS>Disconnect-EmcStorageSystem -System $s -Force
C:\PS>$s | Disconnect-EmcStorageSystem
C:\PS>$s | Disconnect-EmcStorageSystem -Force
This example disconnects the storage system.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
33
-------------- Example 3 --------------
C:\PS>Disconnect-EmcStorageSystem *
C:\PS>Disconnect-EmcStorageSystem * -Force
C:\PS>Disconnect-EmcStorageSystem id *
C:\PS>Disconnect-EmcStorageSystem -id mystorage*
C:\PS>Disconnect-EmcStorageSystem -id d456* -Confirm
This example disconnects the storage system based on the storage system name, userfriendlyname, or global ID. Wild cards are permitted. Because the ID parameter is positional, you can omit the name.
Disconnect-EmcSystem Disconnects the cluster, host, and storage systems.
Syntax
• Disconnect-EmcSystem [-Id <String>] [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
• Disconnect-EmcSystem [-Force] [-System <SystemObjectBase>] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters -Id <String>
Attributes: Optional, Position: 1
Specifies the system userfriendlyname or global ID. Wildcards are permitted. It is a positional parameter (position = 0).
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the cmdlet to continue without asking for the user's confirmation.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Describes what would happen if a command were executed.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
34
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
Prompts the user for confirmation before executing the command.
-System <SystemObjectBase>
Attributes: Optional, Position: named, Accepts pipeline input (by value)
Specifies the cluster, host, or storage system.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$hBlob = Get-EmcHostSystemCredential
C:\PS>$h = $hBlob | Connect-EmcSystem
C:\PS>$sBlob = Get-EmcStorageSystemCredential
C:\PS>$s = $sBlob | Connect-EmcSystem
C:\PS>$cBlob = Get-EmcClusterSystemCredential
C:\PS>$c = $cBlob | Connect-EmcSystem
C:\PS>Disconnect-EmcSystem
This example disconnects the connected host, cluster, and storage systems after confirmation from the user.
-------------- Example 2 --------------
C:\PS>$hBlob = Get-EmcHostSystemCredential
C:\PS>$h = $hBlob | Connect-EmcSystem
C:\PS>$sBlob = Get-EmcStorageSystemCredential
C:\PS>$s = $sBlob | Connect-EmcSystem
C:\PS>$cBlob = Get-EmcClusterSystemCredential
C:\PS>$c = $cBlob | Connect-EmcSystem
C:\PS>$h | Disconnect-EmcSystem
C:\PS>$c | Disconnect-EmcSystem
C:\PS>$s | Disconnect-EmcSystem
This example disconnects the host, cluster, or storage systems.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
35
-------------- Example 3 --------------
C:\PS>$hBlob = Get-EmcHostSystemCredential
C:\PS>$h = $hBlob | Connect-EmcSystem
C:\PS>$sBlob = Get-EmcStorageSystemCredential
C:\PS>$s = $sBlob | Connect-EmcSystem
C:\PS>$cBlob = Get-EmcClusterSystemCredential
C:\PS>$c = $cBlob | Connect-EmcSystem
C:\PS>$h | Disconnect-EmcSystem -Confirm
C:\PS>$c | Disconnect-EmcSystem -Confirm
C:\PS>$s | Disconnect-EmcSystem -Confirm
This example disconnects the host, cluster, or storage systems.
-------------- Example 4 --------------
C:\PS>$hBlob = Get-EmcHostSystemCredential
C:\PS>$h = $hBlob | Connect-EmcSystem
C:\PS>$sBlob = Get-EmcStorageSystemCredential
C:\PS>$s = $sBlob | Connect-EmcSystem
C:\PS>$cBlob = Get-EmcClusterSystemCredential
C:\PS>$c = $cBlob | Connect-EmcSystem
C:\PS>$h | Disconnect-EmcSystem -Force
C:\PS>$c | Disconnect-EmcSystem -Force
C:\PS>$s | Disconnect-EmcSystem -Force
This example disconnects the host, cluster, or storage systems without asking for user's confirmation.
-------------- Example 5 --------------
C:\PS>Disconnect-EmcSystem *
C:\PS>Disconnect-EmcSystem id *
C:\PS>Disconnect-EmcSystem -id mystorage*
C:\PS>Disconnect-EmcSystem -id myhost*
C:\PS>Disconnect-EmcSystem -id mycluster*
C:\PS>Disconnect-EmcSystem -id d456*
This example disconnects the host, cluster, or storage system based on the specified system's userfriendlyname or global ID. Wild cards are permitted. Because the ID parameter is positional, you can omit the name.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
36
Get-EmcClusterSystemCredential Gets the encrypted connection (system object creation) parameters blob. It is generally used along with the Connect-EmcSystem cmdlet to connect cluster systems to ESI.
Syntax
Get-EmcClusterSystemCredential [-Silent] [<CommonParameters>]
Description
The Get-EmcClusterSystemCredential cmdlet creates a blob (encrypted string) from the specified parameters. It prompts the user for cluster name, IP address, and credentials. From the specified parameters, the cmdlet creates a blob (encrypted string). You can use the blob to connect cluster systems to ESI by using the Connect-EmcSystem cmdlet. You can use Test Connection in the dialog to test the connection with the specified parameters. Current Credential is selected by default for authentication. If you are using another credential, then select Specify Credential and type the user name and password.
Parameters
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$cBlob = Get-EmcClusterSystemCredential
C:\PS>$c = $cBlob | Connect-EmcSystem
C:\PS>$c = Connect-EmcSystem -CreationBlob $cBlob
This example uses the Get-EmcClusterSystemCredential cmdlet to return the creation blob, which is used to connect (add) the cluster system to ESI.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
37
Get-EmcHostSystemCredential Gets the encrypted connection (system object creation) parameters blob. Generally used along with Connect-EmcSystem cmdlet to connect (add) host systems to ESI.
Syntax
Get-EmcHostSystemCredential [-Silent] [<CommonParameters>]
Description
The Get-EmcHostSystemCredential cmdlet creates a blob (encrypted string) from the specified connection (system object creation) parameters. It prompts the user for host name, IP address, and credentials. From the specified parameters the cmdlet creates a blob (encrypted string). You can use the blob to connect (add) host systems to ESI by using the Connect-EmcSystem cmdlet. You can use Test Connection in the dialog to test the connection with the specified parameters. Current Credential is selected by default for authentication. If you are using another credential, then select Specify Credential and type the user name and password.
Parameters
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$hBlob = Get-EmcHostSystemCredential
C:\PS>$h = $hBlob | Connect-EmcSystem
C:\PS>$h = Connect-EmcSystem -CreationBlob $hBlob
In this example, the Get-EmcHostSystemCredential cmdlet returns the creation blob, which is used to connect (add) the host system to ESI.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
38
Get-EmcStorageSystemCredential Gets the encrypted connection (system object creation) parameters blob. Generally used along with Connect-EmcSystem cmdlet to add storage systems to ESI.
Syntax
Get-EmcStorageSystemCredential [-Silent] [<CommonParameters>]
Description
The Get-EmcStorageSystemCredential cmdlet prompts the user for the storage system connection (creation parameters) such as the type of storage system to add (CLARION®, VNX®, VMAX®), the short name for the storage system (friendly name), and the credentials required to connect to the storage systems. For example, for block storage such as CLARiiON, VNX-Block, and VNXe it prompts for user name and password for the storage system, SPA's IP Address, SPB's IP Address. You can use the Test Connection in the dialog to test the connection with the specified parameters. The cmdlet creates a blob from the specified parameters. You can use the blob to add storage systems to ESI by using Connect-EmcSystem.
Parameters
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter that turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$sBlob = Get-EmcStorageSystemCredential
C:\PS>$s = $sBlob | Connect-EmcSystem
C:\PS>$s = Connect-EmcSystem -CreationBlob $sBlob
In this example, the Get-EmcStorageSystemCredential cmdlet returns the creation blob, which is used to add the storage system to ESI.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
39
Update-EmcSystem Updates the specified host, storage, or cluster systems.
Syntax
• Update-EmcSystem -HostSystem <IHostSystem> [-Silent] [<CommonParameters>]
• Update-EmcSystem -ClusterSystem <IWindowsFailoverClusterSystem> [-Silent] [<CommonParameters>]
• Update-EmcSystem -StorageSystem <IStorageSystem> [-Silent] [<CommonParameters>]
Description
The Update-EMCSystem cmdlet updates the specified host, cluster, or storage systems. For the host system, the cmdlet updates the host disks. For the cluster system, it updates the cluster disks. For the block storage system, it updates the LUNs. For the file storage system, it refreshes the shared folders.
Parameters
-HostSystem <IHostSystem>
Attributes: Required, Position: 1, Accepts pipeline input (by value)
Specifies the ESI host system object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a host system object by using the Get-EmcHostSystem cmdlet. It can be a standalone host system, a virtual machine, or a hypervisor.
-ClusterSystem <IWindowsFailoverClusterSystem>
Attributes: Required, Position: 1, Accepts pipeline input (by value)
Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can obtain a cluster system object by using the Get-EmcClusterSystem cmdlet.
-StorageSystem <IStorageSystem>
Attributes: Required, Position: 1, Accepts pipeline input (by value)
Specifies the ESI storage system object. You can add a storage system object to ESI by using the Get-EmcStorageSystemCredential and Connect-EmcSystem cmdlets. You can obtain a storage system object by using the Get-EmcStorageSystem cmdlet. It can be either a block storage system or a file storage system.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
40
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcHostSystem | Update-EmcSystem –Silent
This example updates the specified host system.
-------------- Example 2 --------------
C:\PS>Get-EmcClusterSystem | Update-EmcSystem –Silent
This example updates the specified cluster system.
-------------- Example 3 --------------
C:\PS>Get-EmcStorageSystem | Update-EmcSystem –Silent
This example updates the specified storage system.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
41
Storage system operations
Add-EmcStorageAccessControl Adds the access information for a storage pool to the storage access control file.
Syntax
• Add-EmcStorageAccessControl -AccessControl <StorageAccessControlSurrogate> -Pool <StoragePool> [-FullControl] [-Silent] [<CommonParameters>]
• Add-EmcStorageAccessControl -AccessControl <StorageAccessControlSurrogate> -Pool <StoragePool> [-ViewOnly] [-Silent] [<CommonParameters>]
Description
Adds the access information for a storage pool to the storage access control file or object.
Parameters
-AccessControl <StorageAccessControlSurrogate>
Attributes: Required, Position: named
Specify the storage access control object. A storage access control object can be created by using New-EmcStorageAccessControl Cmdlet.
-Pool <StoragePool>
Attributes: Required, Position: named
Specify the pool of which the access you want to add to the storage access control object.
-FullControl <SwitchParameter>
Attributes: Required, Position: named
Specify full-control access to the specified pool.
-Silent <SwitchParameter>
Attributes: Required, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
-ViewOnly <SwitchParameter>
Attributes: Required, Position: named
Specify view-only access to the specified pool.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
42
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$sac = New-EmcStorageAccessControl
C:\PS>Add-EmcStorageAccessControl -AccessControl $sac -Pool $pool -ViewOnly
Storage Access Control
StorageSystemGlobalId: 011b76e1-0491-4dbe-8a3d-8da333d15398
<RaidGroup 0> Block View Only
This example shows how to create a StorageAccessControl object and add a pool with ViewOnly access.
Disable-EmcSnapshotLun Disables a Snapshot LUN.
Syntax
Disable-EmcSnapshotLUN -SnapshotLUN <SnapshotLun> [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
-SnapshotLUN <SnapshotLun>
Attributes: Required, Position: 1, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) SnapshotLun object. A SnapshotLun object can be obtained by using ESI Storage System object or by using Get-EmcLun or Get-EmcSnapshotLun Cmdlet. It is a positional parameter (position = 0).
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the Cmdlet to continue without asking for user's confirmation.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
43
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Describes what would happen if you executed the command without actually executing the command.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
Prompts you for confirmation before executing the command.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$snapshotLun = New-EmcSnapshotLun -SourceLun $srcLun -Name snapshot5 -Silent
C:\PS>Disable-EmcSnapshotLun $snapshotLun -Force -Silent
This example shows how to create an enabled or active SnapshotLun and then disable or deactivate it.
Enable-EmcSnapshotLun Enables a snapshot LUN.
Syntax
Enable-EmcSnapshotLun -SnapshotLun <SnapshotLun> [-SourceLUN <Lun>] [-SnapshotPool <SnapshotPool>] [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Description
Enables the snapshot LUN by specifying the source LUN and other information. Target snapshot LUN and snapshot pool information are not mandatory on some storage systems. Snapshot pool is where the activated snapshot LUN consumes space.
Parameters
-SnapshotLUN <SnapshotLun>
Attributes: Required, Position: 1, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI SnapshotLun object. A SnapshotLun object can be obtained by using an ESI Storage System object or by using Get-EmcLun or Get-EmcSnapshotLun. It is a positional parameter (position = 0).
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
44
-SourceLUN <Lun>
Attributes: Optional, Position: named
Specifies the ESI (EMC Storage Integrator) Lun object. A Lun object can be obtained by using ESI Storage System object or by using Get-EmcLun. This parameter is not mandatory for some storage systems.
-SnapshotPool <SnapshotPool>
Attributes: Optional, Position: named
Specifies the ESI (EMC Storage Integrator) SnapshotPool object. A SnapshotPool object can be obtained by using ESI Storage System object or by using Get-EmcSnapshotPool. This parameter is not mandatory for some storage systems.
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the Cmdlet to continue without asking for user's confirmation.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Describes what would happen if you executed the command without actually executing the command.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
Prompts you for confirmation before executing the command.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$snapshotLun = New-EmcSnapshotLun -SourceLun $srcLun -NoActivation -Name snapshot4 -Silent C:\PS>Enable-EmcSnapshotLun $snapshotLun -Silent -Force SourceLunId : 59 SnapshotPoolId : IsActivated : True PointInTime : 5/23/2012 7:51:38 AM StorageSystemGlobalId : ae5107a4-0e17-4a3b-86c7-5cf84eed4e0e
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
45
ArrayPoolId : <SnapshotLunPool> ArrayLunId : 59:snap_SnapshotApp48 Wwn : 60:06:04:8C:4D:F4:70:2D:B6:93:C3:91:8F:BC:BB:B2 Name : snapshot4 Capacity : 0 Description : IsPrivate : False CanDestroy : True CanExtend : False ServiceNodeIds : {} OtherProperties : {[HostLunId, 128], [CreationTime, 5/23/2012 7:51:38 AM], [ExpirationTime, 5/23/2012 8:51:38 AM], [Resource, iscsi_83]} Tag : DefaultStringForOtherProperties : (HostLunId=128, CreationTime=5/23/2012 7:51:38 AM, ExpirationTime=5/23/2012 8:51:38 AM, Resource=iscsi_83)
This example shows how to create a SnapshotLun and then enable or activate it.
Expand-EmcFileBasedDisk Expands a file-based disk.
Syntax
Expand-EmcFileBasedDisk -Hypervisor <IHypervisor> -Path <String> -Size <UInt64> [-Silent] [<CommonParameters>]
Parameters
-Size <UInt64>
Attributes: Required, Position: named
-VirtualMachineConfiguration <VirtualMachineConfiguration>
Attributes: Required, Position: named
-ScsiControllerId <String>
Attributes: Optional, Position: named
-ScsiControllerIndex <UInt32>
Attributes: Optional, Position: named
-Location <UInt32>
Attributes: Required, Position: named
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
46
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Expand-EmcLun Expands a LUN.
Syntax
Expand-EmcLun -Lun <Lun> -NewCapacity <UInt64> [-Silent] [<CommonParameters>]
Parameters
-Lun <Lun>
Attributes: Required, Position: named
-NewCapacity <UInt64>
Attributes: Optional, Position: named
-Silent <SwitchParameter>
Attributes: Optional, Position: named
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$sys = Get-EmcStorageSystem -ID *166*
C:\PS>$pool = Get-EmcStoragePool -StorageSystem $sys -id ESI_TEST*
C:\PS>$lun = New-EmcLUN -Pool $pool -Name myTestLun -Capacity 1GB
C:\PS>Expand-EmcLun -Lun $lun -NewCapacity 2GB
In this example, the capacity of the specified LUN gets expanded.
Export-EmcStorageAccessControl Exports the storage access control information to a file.
Syntax
Export-EmcStorageAccessControl -AccessControl <StorageAccessControlSurrogate> -File <String> -ProtectionKey <String> [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
47
Description
Exports the storage access control information to a file. The file content is encrypted by a protection key. The file is saved as an ESI access control file (ESIACL file).
Parameters
-AccessControl <StorageAccessControlSurrogate>
Attributes: Required, Position: named
-File <String>
Specify the storage access control object. Storage access control object can be obtained by using New-EmcStorageAccessControl Cmdlet.
-File <String>
Attributes: Required, Position: named
Specify the name of the file that the storage access control information will be exported.
-ProtectionKey <String>
Attributes: Required, Position: named
Specify the key to decrypt the storage access control file content.
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the Cmdlet to continue without asking for user's confirmation.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Describes what would happen if you executed the command without actually executing the command.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
Prompts you for confirmation before executing the command.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
48
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$sac = New-EmcStorageAccessControl
C:\PS>Add-EmcStorageAccessControl -AccessControl $sac -Pool $pool -ViewOnly
Storage Access Control
StorageSystemGlobalId: 011b76e1-0491-4dbe-8a3d-8da333d15398
<RaidGroup 0> Block View Only
C:\PS>Export-EmcStorageAccessControl -AccessControl $sac -File c:\exported.esiacl -ProtectionKey
This example shows how to create a StorageAccessControl object, add a pool to access and export the access information to an ESIACL file.
Get-EmcLun Gets a list of the LUNs.
Syntax
• Get-EmcLUN [-ID <String>] [-Pool <StoragePool>] [-Silent] [<CommonParameters>]
• Get-EmcLUN [-ID <String>] -HostDisk <Disk> [-Silent] [<CommonParameters>]
• Get-EmcLUN [-ID <String>] -Volume <Volume> [-Silent] [<CommonParameters>]
• Get-EmcLUN [-ID <String>] -ClusterDisk <WindowsBasicClusterDisk> [-Silent] [<CommonParameters>]
• Get-EmcLUN [-ID <String>] -BlockStorageSystem <IBlockStorageSystem> [-Silent] [<CommonParameters>]
• Get-EmcLUN [-ID <String>] -HostLunIdentifier <HostLunIdentifier> [-Silent] [<CommonParameters>]
• Get-EmcLUN [-ID <String>] -DataStore <Datastore> [-Silent] [<CommonParameters>]
• Get-EmcLUN [-ID <String>] -ScsiLun <ScsiLun> [-Silent] [<CommonParameters>]
• Get-EmcLUN [-ID <String>] -ClariionStorageSystem <IClariionStorageSystem> -InitiatorId <String> -HostLunId <String> [-Silent] [<CommonParameters>]
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
49
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the LUN name or ID. Wildcards are permitted. It is a positional parameter (position = 0).
-Pool <StoragePool>
Attributes: Optional, Position: named, Accepts pipeline input (by value)
Specifies the ESI storage pool object. You can obtain a storage pool object from the ESI block storage system or by using the Get-EmcStoragePool cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-HostDisk <Disk>
Attributes: Required, Position: named, Accepts pipeline input (by value)
Specifies the ESI host disk object. You can obtain it from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.
-Volume <Volume>
Attributes: Required, Position: named, Accepts pipeline input (by value)
Specifies the ESI volume object. You can obtain a volume object from the ESI host system object or by using the Get-EmcHostVolume cmdlet.
-ClusterDisk <WindowsBasicClusterDisk>
Attributes: Required, Position: named, Accepts pipeline input (by value)
Specifies the ESI cluster disk object. You can obtain a cluster disk object from the ESI cluster system object or by using the Get-EmcClusterDisk cmdlet.
-BlockStorageSystem <IBlockStorageSystem>
Attributes: Required, Position: named, Accepts pipeline input (by value)
Specifies the ESI block storage system object. You can add a storage system object to ESI by using the Get-EmcStorageSystemCredential and Connect-EmcSystem cmdlets. You can obtain a storage system object by using the Get-EmcStorageSystem cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
50
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcLUN
C:\PS>Get-EmcStorageSystem | Get-EmcLUN
C:\PS>Get-EmcHostDisk | Get-EmcLUN
C:\PS>Get-EmcHostVolume | Get-EmcLUN
C:\PS>Get-EmcClusterDisk | Get-EmcLUN
This example gets the list of from all the connected storage systems or specified storage system, or specified disk, or specified volume, or specified cluster disk.
-------------- Example 2 --------------
C:\PS>Get-EmcLUN 12*
C:\PS>Get-EmcStorageSystem | Get-EmcLUN -id my_*
C:\PS>Get-EmcHostDisk | Get-EmcLUN my*
C:\PS>Get-EmcHostVolume | Get-EmcLUN -id 224
This example gets the LUNs based on the LUN ID or name. Wildcards are permitted. Because the ID parameter is positional, you can omit the name.
-------------- Example 3 --------------
C:\PS>$ds = Get-EmcDataStore *myDatastore*
C:\PS>Get-EmcLUN -Datastore $ds
This example gets the LUN or LUNs associated with the given datastore object.
-------------- Example 4 --------------
C:\PS>$sl = Get-ScsiLun -ID *myScsiLun*
C:\PS> Get-EmcLUN -ScsiLun $sl
This example gets the LUN or LUNs associated with the given SCSI LUN object.
-------------- Example 5 --------------
C:\PS>$cs = Get-EmcStorageSystem
C:\PS>Get-EmcLun my_lun1 -ClariionStorageSystem $cs -InitiatorId iqn.1991-05.com.microsoft:abc.sr5dom.eng.emc.com -HostLunId 1
This example gets the LUN associated with the given cluster system.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
51
Get-EmcScsiLun Gets the list of VMware SCSI LUNs.
Syntax
• Get-EmcScsiLun [-ID <String>] [-VMwareSystem <IVMwareServer>] [-Lun <Lun>] [-Silent] [<CommonParameters>]
• Get-EmcScsiLun [-ID <String>] [-ESXHostSystem <IESXHostSystem>] [-Lun <Lun>] [-Silent] [<CommonParameters>]
• Get-EmcScsiLun [-ID <String>] -Datastore <Datastore> [-Silent] [<CommonParameters>]
• Get-EmcScsiLun [-ID <String>] [-Lun <Lun>] [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the device name, canonical name, or ID for the VMware SCSI LUN. Wildcards are permitted. It is a positional parameter (position = 0).
-VMwareSystem <IVMwareServer>
Attributes: Optional, Position: named
Specifies the ESI (EMC Storage Integrator) VMware System object. A VMware system object can be added to ESI using Get-EmcVMwareSystemCredential and Connect-EmcSystem cmdlets. A VMware system object can be obtained by using Get-EmcVMwareystem cmdlet. It can be a stand alone ESX Host or a vCenter.
-Lun <Lun>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) LUN object. A LUN object can be obtained by using the ESI Storage System object or by using the Get-EmcLun cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-ESXHostSystem <IESXHostSystem>
Attributes: Optional, Position: named
Specifies the ESI (EMC Storage Integrator) ESXHost System object. A ESXHost system object can be obtained by using Get-EmcESXHost cmdlet.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
52
-Datastore <Datastore>
Attributes: Required, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) VMware Datastore object. A Datastore object can be obtained by using Get-EmcDataStore cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$hBlob = Get-EmcVMwareSystemCredential
C:\PS>$vm = $hBlob | Connect-EmcSystem
C:\PS>$vm | Update-EmcSystem
C:\PS>Get-EmcScsiLun -VMwareSystem $vm
This example gets all SCSI LUNs of a specified VMware server.
-------------- Example 2 --------------
C:\PS>Get-EmcVMwareSystem | Update-EmcSystem
C:\PS>Get-EmcScsiLun
This example gets all SCSI LUNs that are on all connected VMware servers.
-------------- Example 3 --------------
C:\PS>$esxhost = Get-EmcESXHost -VMwareSystem $vm
C:\PS>Get-EmcScsiLun -ESXHostSystem $esxhost
This example gets all SCSI LUNs of a specified ESX host.
-------------- Example 4 --------------
C:\PS>$lun = Get-EmcLUN -ID 298
C:\PS> Get-EmcScsiLun -Lun $lun
This example gets the SCSI LUN associated with the given LUN object.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
53
-------------- Example 5 --------------
C:\PS>$vm = Get-EmcVMwareSystem *myVmware*
C:\PS>$vm | Update-EmcSystem
C:\PS>Get-EmcScsiLun -ID *53e111 -VMwareSystem $vm
This example gets the SCSI LUN of the given VMware system with the given device name, canonical name, or ID. Wildcards are permitted. Because the ID parameter is positional, you can omit the name.
-------------- Example 6 --------------
C:\PS>$ds = Get-EmcDataStore *myDatastore*
C:\PS>Get-EmcScsiLun -Datastore $ds
This example gets the SCSI LUN associated with the given datastore object.
Get-EmcSharedFolder Gets the list of shared folders available from a CIFS storage system.
Syntax
• Get-EmcSharedFolder [-ID <String>] [-CifsStorageSystem <ICifsStorageSystem>] [-Silent] [<CommonParameters>]
• Get-EmcSharedFolder [-ID <String>] -Pool <StoragePool> [-Silent] [<CommonParameters>]
• Get-EmcSharedFolder [-ID <String>] -NetworkShare <CifsNetworkShare> [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the shared folder name, ArrayPoolId, or SharedFolderId. Wildcards are permitted. It is a positional parameter (position = 1).
-CifsStorageSystem <ICifsStorageSystem>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) Storage System object. A storage system object can be added to ESI using Get-EmcStorageSystemCredential and Connect-EmcSystem Cmdlets. A storage system object can be obtained using Get-EmcStorageSystem Cmdlet. The storage system type for this cmdlet must be a CIFS file storage system.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
54
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
-Pool <StoragePool>
Attributes: Required, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) Storage Pool object. A storage pool object can be obtained from ESI storage system or by using Get-EmcStoragePool cmdlet. The storage pool for this cmdlet must be of type File.
-NetworkShare <CifsNetworkShare>
Attributes: Required, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the network share used by a Host system. A network share object can be obtained from ESI by using Get-EmcCifsNetworkShare cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters.
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcSharedFolder -id *myFolder*
This example gets the list of all the shared folders with the specified name.
-------------- Example 2 --------------
C:\PS>$s = Get-EmcStorageSystem
Get-EmcSharedFolder -CifsStorageSystem $s[0]
This example gets the list of all the shared folders from the specified storage system.
-------------- Example 3 --------------
C:\PS>$s = Get-EmcStorageSystem
$p = Get-EmcStoragePool -StorageSystem $s[0] -PoolType File
Get-EmcSharedFolder -Pool $p[3]
This example gets the list of all the shared folders from the specified file storage pool.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
55
-------------- Example 4 --------------
C:\PS>$s = Get-EmcHostSystem
$p = Get-EmcCifsNetworkShare -HostSystem $s[1]
Get-EmcSharedFolder -NetworkShare $p
This example gets the shared folder from the specified CIFS network share mount object.
Get-EmcSnapshotLun Gets the list of snapshot LUNs.
Syntax
Get-EmcSnapshotLUN [-ID <String>] [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the LUN name or ID. Wildcards are permitted. It is a positional parameter (position = 1).
-SourceLUN <Lun>
Attributes: Optional, Position: named
Specifies the ESI LUN object. A LUN object can be obtained by using ESI Storage System object or by using Get-EmcLun. This parameter is not mandatory for some storage systems.
-BlockStorageSystem <IBlockStorageSystem>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI Block Storage System object. A storage system object can be added to ESI using Get-EmcStorageSystemCredential and Connect-EmcSystem. A storage system object can be obtained using Get-EmcStorageSystem.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
56
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcSnapshotLUN
This example gets all the snapshot LUNs of the connected storage systems.
-------------- Example 2 --------------
C:\PS>Get-EmcSnapshotLUN -id my*
C:\PS>Get-EmcSnapshotLUN my*
C:\PS>Get-EmcSnapshotLUN -id 12
C:\PS>Get-EmcSnapshotLUN 12
This example gets the snapshot LUNs based on the LUN ID or name. Wildcards are permitted. Because the ID parameter is positional, you can omit the name.
-------------- Example 3 --------------
C:\PS>Get-EmcSnapshotLun -BlockStorageSystem $vnxblock1 SourceLunId : 98 SnapshotPoolId : IsActivated : False PointInTime : 1/1/0001 12:00:00 AM StorageSystemGlobalId : 94627bc5-cfb4-4482-8347-4324b8780261 ArrayPoolId : ~SnapshotLunGroup ArrayLunId : lun98snapshot1 Wwn : 60:06:01:60:97:41:2E:00:6E:E6:44:E8:1F:A3:E1:11 Name : lun98snapshot1 Capacity : 1.000 GB Description : IsPrivate : False CanDestroy : True CanExtend : False ServiceNodeIds : {} OtherProperties : {} Tag : DefaultStringForOtherProperties : ()
This example shows how to get SnapshotLuns on a particular storage system.
-------------- Example 4 --------------
C:\PS>Get-EmcSnapshotLun -SourceLun $source98 SourceLunId : 98 SnapshotPoolId : IsActivated : False PointInTime : 1/1/0001 12:00:00 AM StorageSystemGlobalId : 94627bc5-cfb4-4482-8347-4324b8780261 ArrayPoolId : ~SnapshotLunGroup ArrayLunId : lun98snapshot1 Wwn : 60:06:01:60:97:41:2E:00:6E:E6:44:E8:1F:A3:E1:11 Name : lun98snapshot1
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
57
Capacity : 1.000 GB Description : IsPrivate : False CanDestroy : True CanExtend : False ServiceNodeIds : {} OtherProperties : {} Tag : DefaultStringForOtherProperties : ()
This example shows how to get the SnapshotLuns for a given source Lun.
Get-EmcSnapshotPool Gets the list of snapshot pools.
Syntax
Get-EmcSnapshotPool [-ID <String>] [-BlockStorageSystem <IBlockStorageSystem>] [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the snapshot pool ID. Wildcards are permitted. It is a positional parameter (position = 1).
-BlockStorageSystem <IBlockStorageSystem>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) Block Storage System object. A storage system object can be added to ESI using Get-EmcStorageSystemCredential and Connect-EmcSystem Cmdlets. A storage system object can be obtained using Get-EmcStorageSystem Cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
58
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcSnapshotPool
This example gets all the snapshot pools from all the connected storage systems.
-------------- Example 2 --------------
C:\PS>Get-EmcSnapshotPool -id 12
C:\PS>Get-EmcSnapshotPool 12
This example gets the snapshot pools based on the pool ID. Wildcards are permitted. Because the ID parameter is positional, you can omit the name.
-------------- Example 3 --------------
C:\PS>Get-EmcSnapshotPool -BlockStorageSystem $vnxblock1 StorageSystemGlobalId : 94627bc5-cfb4-4482-8347-4324b8780261 PoolId : Reserved LUN Pool UserCapacity : 19.993 GB AvailableCapacity : 16.000 GB OtherProperties : {} Tag : DefaultStringForOtherProperties : ()
This example shows how to get the SnapshotPools on a particular storage system.
Get-EmcStandbyLun Gets the list of standby LUNs.
Syntax
Get-EmcStandbyLun [-ID <String>] -StorageSystem <IVmaxStorageSystem2> [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the Standby LUN ID. Wildcards are permitted. It is a positional parameter (position = 1).
-StorageSystem <IVmaxStorageSystem2>
Attributes: Required, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) VMAX Storage System object. A VMAX storage system object can be added to ESI using Get-EmcStorageSystemCredential and Connect-EmcSystem Cmdlets. A VMAX storage system object can be obtained using Get-EmcStorageSystem Cmdlet.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
59
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$sys= Get-EmcStorageSystem -ID *VMAX*
C:\PS>New-EmcStandByLun -StorageSystem $sys -Count 2 -Capacity 2GB
C:\PS>Get-EmcStandbyLun -StorageSystem $sys
This example creates two standby LUNs for a VMAX storage system and then gets the standby LUNs for the storage system.
Get-EmcStorageGroup Gets the list of storage groups.
Syntax
Get-EmcStorageGroup [-StorageSystem <IClariionStorageSystem>] [-InitiatorId <String[]>] [-Silent] [<CommonParameters>]
Parameters
-StorageSystem <IClariionStorageSystem>
Attributes: Optional, Position: named
-InitiatorId <String[]>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
-Silent <SwitchParameter>
Attributes: Optional, Position: named
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
60
6
Example
C:\PS>$sys= Get-EmcStorageSystem -ID *166*
C:\PS>Get-EmcStorageGroup -StorageSystem $sys -InitiatorId iqn.1991-05.com.microsoft:abc.sr5dom.eng.emc.com
Gets the storage system group from a specified storage system.
Get-EmcStoragePool Gets the list of storage pools.
Syntax
• Get-EmcStoragePool [-ID <String>] [-Lun <ConcreteLun>] [-Silent] [<CommonParameters>]
• Get-EmcStoragePool [-ID <String>] -StorageSystem <IStorageSystem> [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the storage pool name or ID. Wildcards are permitted. It is a positional parameter (position = 1).
-Lun <ConcreteLun>
Attributes: Optional, Position: named, Accepts pipeline input (by value)
Specifies the ESI LUN object. You can obtain a LUN object by using the ESI storage system object or by using the Get-EmcLun cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-StorageSystem <IStorageSystem>
Attributes: Required, Position: named, Accepts pipeline input (by value)
Specifies the ESI storage system object. You can add a storage system object to ESI by using the Get-EmcStorageSystemCredential and Connect-EmcSystem cmdlets. You can obtain a storage system object by using the Get-EmcStorageSystem cmdlet. It can be either a block storage system or file storage system.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
61
-PoolType <GetEmcStoragePoolCmdlet+PoolTypeValues>
Attributes: Optional, Position: named
Specifies the ESI (EMC Storage Integrator) Storage System Pool Type object. The Pool Type values can be one of the following values:
• PoolType Block– to retrieve the storage pools for block storage
• PoolType File – to retrieve the storage pools for file storage
• PoolType All – to retrieve all the storage pools, both block and file storage pools
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcStoragePool
C:\PS>Get-EmcStorageSystem | Get-EmcStoragePool
C:\PS>$l = Get-EmcLUN
C:\PS>$l[0] | Get-EmcStoragePool |select ArrayPoolId
This example gets the list of storage pools from all the connected storage systems or specified storage systems or specified LUNs.
-------------- Example 2 --------------
C:\PS>Get-EmcStoragePool -id my*
C:\PS>Get-EmcStorageSystem | Get-EmcStoragePool my*
C:\PS>Get-EmcStoragePool -id 12
C:\PS>Get-EmcStorageSystem | Get-EmcStoragePool 12
This example gets the storage pools based on the pool ID or name. Wildcards are accepted. Because the ID parameter is positional, you can omit the name.
-------------- Example 3 --------------
C:\PS>Get-EmcStorageSystem | Get-EmcStoragePool my* -PoolType All
Get-EmcStorageSystem | Get-EmcStoragePool my* -PoolType Block
Get-EmcStorageSystem | Get-EmcStoragePool my* -PoolType File
This example gets the storage pools based on pool ID or name. Wildcards are permitted. Because the ID parameter is positional, you can omit the name. The PoolType desired is specified by its parameter, as shown in the examples.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
62
6
Get-EmcStorageServiceNode Get the list of storage service nodes.
Syntax
• Get-EmcStorageServiceNode [-ID <String>] [-StorageSystem <IStorageSystem>] [-Silent] [<CommonParameters>]
• Get-EmcStorageServiceNode [-ID <String>] [-Pool <StoragePool>] [-Silent] [<CommonParameters>]
• Get-EmcStorageServiceNode [-ID <String>] [-Lun <Lun>] [-Silent] [<CommonParameters>]
• Get-EmcStorageServiceNode [-ID <String>] [-CifsSharedFolder <CifsSharedFolder>] [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the storage service node ID or display-text. Wildcards are permitted. It is a positional parameter (position = 1).
-StorageSystem <IStorageSystem>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) Storage System object. A storage system object can be added to ESI using Get-EmcStorageSystemCredential and Connect-EmcSystem Cmdlets. A storage system object can be obtained using Get-EmcStorageSystem Cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
-Pool <StoragePool>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) Storage Pool object. A storage pool object can be obtained from ESI block storage system or by using Get-EmcStoragePool cmdlet.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
63
-Lun <Lun>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) Lun object. A Lun object can be obtained by using ESI Storage System object or by using Get-EmcLun Cmdlet.
-CifsSharedFolder <CifsSharedFolder>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) shared folder object. A shared folder object can be obtained by using ESI Storage System object or by using Get-EmcSharedFolder Cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcStorageServiceNode | select DisplayText
DisplayText
------------
iscsi_node_0(iqn.1992-05.com.emc:apm001120033400000-1-vnxe)
file_server_0(10.5.223.114)
This example gets the display text of the storage service nodes on all registered storage systems.
-------------- Example 2 --------------
C:\PS>Get-EmcStorageServiceNode -Lun $lun TargetPorts : {iqn.1992-05.com.emc:apm001120033400000-1-vnxe, iqn.1992-05.com.emc:apm00112003340000 0-1-vnxe} StorageSystemGlobalId : ae5107a4-0e17-4a3b-86c7-5cf84eed4e0e ServiceNodeId : iscsi_node_0 DisplayText : iscsi_node_0(iqn.1992-05.com.emc:apm001120033400000-1-vnxe) OtherProperties : {} Tag : DefaultStringForOtherProperties : ()
This example gets the storage service nodes that serve the data service for the specified LUN.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
64
6
Get-EmcStorageSystem Gets the list of storage systems.
Syntax
• Get-EmcStorageSystem [-Id <String>] [-Silent] [<CommonParameters>]
• Get-EmcStorageSystem [-Id <String>] -FileStorageSystem [-Silent] [<CommonParameters>]
• Get-EmcStorageSystem [-Id <String>] -BlockStorageSystem [-Silent] [<CommonParameters>]
• Get-EmcStorageSystem -Lun <Lun> [-Silent] [<CommonParameters>]
• Get-EmcStorageSystem -Pool <StoragePool> [-Silent] [<CommonParameters>]
Parameters
-Id <String>
Attributes: Optional, Position: 1
Specifies the storage system name, userfriendlyname, or global ID. Wildcards are permitted. It is a positional parameter (position = 0).
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-FileStorageSystem <SwitchParameter>
Attributes: Required, Position: named
Enumerates file storage systems.
-BlockStorageSystem <SwitchParameter>
Attributes: Required, Position: named
Enumerates block storage systems.
-Lun <Lun>
Attributes: Required, Position: named, Accepts pipeline input (by value)
Specifies the ESI LUN object. You can obtain a LUN object by using the ESI storage system object or by using the Get-EmcLun cmdlet.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
65
-Pool <StoragePool>
Attributes: Required, Position: named, Accepts pipeline input (by value)
Specifies the ESI pool object. You can obtain a LUN object by using the ESI storage system object or by using the Get-EmcStoragePool cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
You can add a storage system object to ESI by using the Get-EmcStorageSystemCredential and Connect-EmcSystem cmdlets.
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcStorageSystem
C:\PS>Get-EmcStoragePool gold* | Get-EmcStorageSystem | select name
C:\PS>$l = Get-EmcLUN
C:\PS>$l[0] | Get-EmcStorageSystem
This example gets the storage systems.
-------------- Example 2 --------------
C:\PS>Get-EmcStorageSystem -BlockStorageSystem
This example gets the connected block storage systems.
-------------- Example 3 --------------
C:\PS>Get-EmcStorageSystem -FileStorageSystem
This example gets the connected file storage systems.
-------------- Example 4 --------------
C:\PS>Get-EmcStorageSystem vnx*
C:\PS>Get-EmcStorageSystem -id vnx*
This example gets the storage system based on name, userfriendlyname, or global ID. Wildcards are permitted. Because the ID parameter is positional, you can omit the name.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
66
6
Get-EmcTargetPort Get the list of target ports.
Syntax
• Get-EmcTargetPort [-ID <String>] [-BlockStorageSystem <IBlockStorageSystem>] [-Silent] [<CommonParameters>]
• Get-EmcTargetPort [-ID <String>] [-Pool <LunStoragePool>] [-Silent] [<CommonParameters>]
• Get-EmcTargetPort [-ID <String>] [-Lun <Lun>] [-Silent] [<CommonParameters>]
Parameters
-Id <String>
Attributes: Optional, Position: 1
Specifies the Target Port ID. Wildcards are permitted. It is a positional parameter (position = 1).
-BlockStorageSystem <IBlockStorageSystem>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) Block Storage System object. A storage system object can be added to ESI using Get-EmcStorageSystemCredential and Connect-EmcSystem Cmdlets. A storage system object can be obtained using Get-EmcStorageSystem Cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-Pool <LunStoragePool>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) Storage Pool object. A storage pool object can be obtained from ESI block storage system or by using the Get-EmcStoragePool cmdlet.
-Lun <Lun>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) Lun object. A Lun object can be obtained by using ESI Storage System object or by using the Get-EmcLun Cmdlet.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
67
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcTargetPort | select Iqn, IP address
Iqn IP address
--- ---------
iqn.1992-05.com.emc:apm001120033400000-1-vnxe 10.5.223.115
iqn.1992-05.com.emc:apm001120033400000-1-vnxe 10.5.223.116
Get the IQN and IP address information of the TargetPorts on all registered storage systems.
-------------- Example 2 --------------
C:\PS>PS D:\SRC\ESI\EMC.WinApps.Fx.Build\DEBUG\X64\ESIPSToolkit> Get-EmcTargetPort -Lun $lun Iqn : iqn.1992-05.com.emc:apm001120033400000-1-vnxe IP address : 10.5.223.115 Port : 3260 InitiatorAuthentication : False StorageSystemGlobalId : ae5107a4-0e17-4a3b-86c7-5cf84eed4e0e ServiceNodeId : iscsi_node_0 TargetPortId : if_0 LinkState : Up Status : OK OtherProperties : {} Tag : DefaultStringForOtherProperties : () Iqn : iqn.1992-05.com.emc:apm001120033400000-1-vnxe IP address : 10.5.223.116 Port : 3260 InitiatorAuthentication : False StorageSystemGlobalId : ae5107a4-0e17-4a3b-86c7-5cf84eed4e0e ServiceNodeId : iscsi_node_0 TargetPortId : if_1 LinkState : Up Status : OK OtherProperties : {} Tag : DefaultStringForOtherProperties : ()
This example gets the TargetPorts that serve the data service for the specified LUN.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
68
6
Get-EmcVNXFileStoragePool Gets the list of VNX file storage pools used by the VNX to provision shared folder pools.
Syntax
Get-EmcVNXFileStoragePool [-ID <String>] [-StorageSystem <ICelerraStorageSystem>] [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the storage pool name or ID. Wildcards are permitted. It is a positional parameter (position = 0).
-StorageSystem <ICelerraStorageSystem>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) Storage System object. A storage system object can be added to ESI using Get-EmcStorageSystemCredential and Connect-EmcSystem cmdlets. A storage system object can be obtained using Get-EmcStorageSystem cmdlet. The storage system for this cmdlet must be a VNX storage system or VNX-File storage system.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcVNXFileStoragePool
This example gets the list of all VNX file storage pools.
-------------- Example 2 --------------
C:\PS>$s = Get-EmcStorageSystem
Get-EmcVNXFileStoragePool -StorageSystem $s[0]
This example gets the list of VNX file storage pools from the specified storage system.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
69
Import-EmcStorageAccessControl Import storage access control from a file.
Syntax
Import-EmcStorageAccessControl -File <String> -ProtectionKey <String> [-Force] [-ListOnly] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
-File <String>
Attributes: Required, Position: named
Specify the name of the file that the storage access control information will be imported from.
-ProtectionKey <String>
Attributes: Required, Position: named
Specify the key to decrypt the storage access control file content.
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the cmdlet to continue without asking for user's confirmation.
-ListOnly <SwitchParameter>
Attributes: Optional, Position: named
An option to list the access information of the storage systems and pools to be imported. No actual importing will take place.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Describes what would happen if you executed the command without actually executing the command.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
Prompts you for confirmation before executing the command.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
70
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>Import-EmcStorageAccessControl -File C:\exported.esiacl -ProtectionKey SomePassword -ListOnly
Following systems and pool accesses can be imported.
Storage Access Control
StorageSystemGlobalId: 011b76e1-0491-4dbe-8a3d-8da333d15398
<RaidGroup 0> Block View Only
This example shows how to view the content in the exported storage access control file without actually importing it.
-------------- Example 2 --------------
C:\PS>Import-EmcStorageAccessControl -File C:\exported.esiacl -ProtectionKey SomePassword -Force Following systems and pool accesses have been imported. Storage Access Control StorageSystemGlobalId: 011b76e1-0491-4dbe-8a3d-8da333d15398 <RaidGroup 0> Block View Only
This example shows how to import the access control from the exported access control file.
New-EmcCandidateSnapshotLun Gets a list of candidate snapshot LUNs.
Syntax
New-EmcCandidateSnapshotLUNs -SourceLUN <Lun> [-SnapshotPool <SnapshotPool>] [-NameHint <String>] -Count <UInt32> [-Silent] [<CommonParameters>]
Parameters
-SourceLUN <Lun>
Attributes: Required, Position: named
-SnapshotPool <SnapshotPool>
Attributes: Optional, Position: named
-NameHint <String>
Attributes: Optional, Position: named
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
71
-Count <UInt32>
Attributes: Required, Position: named
-Silent <SwitchParameter>
Attributes: Optional, Position: named
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$cluns = New-EmcCandidateSnapshotLun -SourceLun $lun -Count 3 -NameHint SomeUsage -Silent C:\PS>$cluns | select ArrayLunId, Name, ArrayPoolId ArrayLunId Name ArrayPoolId ---------- ---- ----------- 59:snap_SnapshotApp50 SomeUsage <SnapshotLunPool> 59:snap_SnapshotApp51 SomeUsage1 <SnapshotLunPool> 59:snap_SnapshotApp52 SomeUsage2 SnapshotLunPool>
This example shows how to create multiple candidate SnapshotLuns, and how NameHint parameter may affect the names of those candidate SnapshotLuns on some storage system.
New-EmcCifsSharedFolder Creates a new CIFS shared folder object.
Syntax
New-EmcCifsSharedFolder -Pool <StoragePool> -Name <String> -Path <String> -Capacity <UInt64> [-Silent] [<CommonParameters>]
Parameters
Pool <StoragePool>
Attributes: Required, Position: named
Specifies the ESI (EMC Storage Integrator) Storage Pool object. A storage pool object can be obtained from ESI storage system or by using Get-EmcStoragePool cmdlet. The storage pool for this cmdlet must be of type File.
-Name <String>
Attributes: Required, Position: named
Specifies the name of the shared folder.
-Path <String>
Attributes: Required, Position: named
Specifies the path of the shared folder.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
72
-Capacity <UInt64>
Attributes: Required, Position: named
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$s = Get-EmcStorageSystem
$n = Get-EmcStorageServiceNode -StorageSystem $s
$p = Get-EmcStoragePool -StorageSystem $s[0] -PoolType File -ID *FileSystem1*
New-EmcCifsSharedFolder -Pool $p -Name ShareName -Path SharePath -Capacity 2147483648 -ServiceNode $n
This example creates a shared folder with the specified Service Node.
New-EmcLun Creates a LUN.
Syntax
New-EmcLun -Pool <StoragePool> [-Name <String>] -CapacityInMB <UInt64> [-Thin] [-Description <String>] [-Silent] [<CommonParameters>]
Description
The New-EmcLun cmdlet creates an ESI LUN object.
Parameters
-Pool <StoragePool>
Attributes: Required, Position: named
Specifies the ESI storage pool object. You can obtain a storage pool object from the ESI block storage system or by using the Get-EmcStoragePool cmdlet.
-Name <String>
Attributes: Optional, Position: named
Specifies the name of the LUN.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
73
-CapacityInMB <UInt64>
Attributes: Required, Position: named
Specifies the capacity of the LUN in MB.
-Thin <SwitchParameter>
Attributes: Optional, Position: named
Enables thin provisioning.
-Description <String>
Attributes: Optional, Position: named
Specifies the description of the LUN.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$p = Get-EmcStoragePool gold*
C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -CapacityInMB 1024
TaskStatus: Started
10% : Creating the LUN...
100% : The specified LUN has been created...
TaskStatus: Completed
C:\PS>$l | select ProvisioningType, Name
ProvisioningType Name
---------------- ----
Thick mylun_test_1
This example creates a thick LUN.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
74
------------- Example 2 --------------
C:\PS>$p = Get-EmcStoragePool gold*
C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -CapacityInMB 1024 -Silent -Thin
C:\PS>$l | select ProvisioningType, Name
ProvisioningType Name
---------------- ----
Thin mylun_test_1
This example creates a LUN with thin provisioning.
New-EmcSnapshotLun Creates a snapshot LUN.
Syntax
New-EmcSnapshotLun -SourceLUN <Lun> [-Silent] [<CommonParameters>]
Parameters
-SourceLUN <Lun>
Attributes: Required, Position: named
Specifies the source LUN.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
75
Example
C:\PS>$l = Get-EmcLUN
C:\PS>$l[0] | select ArrayLunId
ArrayLunId
----------
7
C:\PS>$sl = New-EmcSnapshotLun -SourceLUN $l[0]
TaskStatus: Started
10% : Creating the snapshot LUN...
100% : The specified snapshot LUN has been created...
TaskStatus: Completed
C:\PS>$sl | select DefaultStringForOtherProperties
DefaultStringForOtherProperties
-------------------------------
(SourceLunId=7)
This example creates a snapshot LUN from a LUN.
New-EmcStandbyLun Creates a standby LUN.
Syntax
New-EmcStandByLun -StorageSystem <IVmaxStorageSystem2> -Count <UInt32> -Capacity <UInt64> [-Silent] [<CommonParameters>]
Parameters
-StorageSystem <IVmaxStorageSystem2>
Attributes: Required, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
-Count <UInt32>
Attributes: Required, Position: named
-Capacity <UInt64>
Attributes: Required, Position: named
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
76
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$sys= Get-EmcStorageSystem -ID *VMAX*
C:\PS>New-EmcStandByLun -StorageSystem $sys -Count 2 -Capacity 2GB
This example creates two standby LUNs with 2 GB of capacity for a VMAX storage system.
New-EmcStorageAccessControl Creates storage access control.
Syntax
New-EmcStorageAccessControl [-Silent] [<CommonParameters>]
Description
Creates a storage access control object. Access to storage pools can be added or removed to or from this object after you create the storage access control.
Parameters
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$sac = New-EmcStorageAccessControl
This example shows how to create a StorageAccessControl object.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
77
New-EmcVNXSharedFolderPool Creates a new VNX CIFS shared folder pool object.
Syntax
New-EmcVNXSharedFolderPool -Pool <CelerraFileStoragePool> -Name <String> -Capacity <UInt64> [-Silent] [<CommonParameters>]
Parameters
-Pool <CelerraFileStoragePool>
Attributes: Required, Position: named
Specifies the ESI (EMC Storage Integrator) VNX File Storage Pool object. A VNX file storage pool object can be obtained from ESI storage system or by using Get-EmcVNXFileStoragePool cmdlet.
-Name <String>
Attributes: Required, Position: named
Specifies the name of the shared folder pool.
-Path <String>
Attributes: Required, Position: named
Specifies the path of the shared folder pool.
-Capacity <UInt64>
Attributes: Required, Position: named
The capacity of the Shared Folder Pool in bytes.
-ServiceNode <StorageServiceNode>
Attributes: Optional, Position: named
Optional parameter to specify the service node for the Shared Folder Pool. The Service Node can be retrieved with the Get-EmcStorageServiceNode cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
78
Example
C:\PS>$s = Get-EmcStorageSystem
$n = Get-EmcStorageServiceNode -StorageSystem $s
$f = Get-EmcVNXFileStoragePool -StorageSystem $s[0]
New-EmcVNXSharedFolderPool -Pool $f -Name NewSharedFolderPool -Path NewSharedFolderPool -Capacity 2147483648 -ServiceNode $n
This example shows how to create a StorageAccessControl object.
Remove-EmcCifsSharedFolder Removes or deletes the shared folder from storage system.
Syntax
Remove-EmcLun -Lun <ConcreteLun> [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
-SharedFolder <CifsSharedFolder>
Attributes: Required, Position: 1
Specifies the ESI (EMC Storage Integrator) shared folder object. A shared folder object can be obtained by using the ESI Storage System object or by using the Get-EmcSharedFolder cmdlet. It is a positional parameter (position = 0).
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the cmdlet to continue without asking for the user's confirmation.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Describes what would happen if you executed the command without actually executing the command.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
Prompts you for confirmation before executing the command.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
79
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$s = Get-EmcStorageSystem
$p = Get-EmcStoragePool -StorageSystem $s[0] -PoolType File -ID *FileSystem1*
$f = Get-EmcSharedFolder -Pool $p -ID *PS*
Remove-EmcCifsSharedFolder -SharedFolder $f
This example removes or deletes the specified shared folder.
Remove-EmcCifsSharedFolderMountPoint Removes (unmounts) a given shared folder.
Syntax
Remove-EmcCifsSharedFolderMountPoint -HostSystem <IHostSystem> -SharedFolder <CifsNetworkShare> [-Silent] [<CommonParameters>]
Parameters
-HostSystem <IHostSystem>
Attributes: Required, Position: named
Specifies the ESI (EMC Storage Integrator) Host System object. A host system object can be added to ESI using Get-EmcHostSystemCredential and Connect-EmcSystem Cmdlets. A host system object can be obtained by using Get-EmcHostSystem Cmdlet. It can be a stand alone host system or virtual machine or hypervisor.
-SharedFolder <CifsNetworkShare>
Attributes: Required, Position: named
Specifies the ESI (EMC Storage Integrator) network share object. A network share object can be obtained from ESI Host System object or by using Get-EmcCifsNetworkShare cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
80
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$h = Get-EmcHostSystem -ID *.136*
$s = Get-EmcCifsNetworkShare -HostSystem $h -ID *T:*
Remove-EmcCifsSharedFolderMountPoint -HostSystem $h -SharedFolder $s
This example unmounts the given shared folder.
Remove-EmcFileBasedDisk Removes file based disks from a hypervisor.
Syntax
Remove-EmcFileBasedDisk -Hypervisor <IHypervisor> -Path <String> [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
-Hypervisor <IHypervisor>
Attributes: Required, Position: named
Specifies the ESI (EMC Storage Integrator) Hypervisor Host System object. ESI Hypervisor object is derived from Host System. So a Hypervisor can be added to ESI using Get-EmcHostSystemCredential and Connect-EmcSystem Cmdlets just like Host System. A Hypervisor(Host System) object can be obtained by using Get-EmcHostSystem Cmdlet.
-Path <String>
Attributes: Required, Position: named
Specifies the path of the FilebasedDisk.
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the Cmdlet to continue without asking for user's confirmation.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
81
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Describes what would happen if you executed the command without actually executing the command.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
Prompts you for confirmation before executing the command.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>C:\PS>$hypervisor = Get-EmcHostSystem *133
C:\PS>New-EmcFileBasedDisk -Hypervisor $hypervisor -Size 1GB -HostDiskType fIXeD -Path "E:\hyper-V\testESI.vhd"
C:\PS>Remove-EmcFileBasedDisk -Hypervisor $hypervisor -Path "E:\hyper-V\testESI.vhd"
This example deletes a file based disk from a hypervisor.
Remove-EmcLun Removes the LUN from the stroage system.
Syntax
Remove-EmcLun -Lun <ConcreteLun> [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
-Lun <ConcreteLun>
Attributes: Required, Position: 1
Specifies the ESI LUN object. You can obtain a LUN object by using the ESI storage system object or by using the Get-EmcLun cmdlet. It is a positional parameter (position = 0).
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the cmdlet to continue without asking for the user's confirmation.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
82
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Describes what would happen if the command is executed.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
Prompts the user for confirmation before executing the command.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$p = Get-EmcStoragePool gold*
C:\PS>$l = New-EmcLun -Pool $p -Name esi_ps_test_1 -CapacityInMB 1024 -Silent
C:\PS>$l.ArrayLunId
14
C:\PS>Remove-EmcLun -Lun $l -Silent
Confirm
Are you sure you want to perform this action?
Performing operation "Remove-EmcLun" on Target "esi_ps_test_1".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
C:\PS>Get-EmcLUN esi_ps_test_1
WARNING: Unable to find lun(s) with the given parameters.
C:\PS>
The example describes how to create a LUN and destroy it.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
83
-------------- Example 2 --------------
C:\PS>$l = Get-EmcLUN 7
C:\PS>$l.ArrayLunId
7
C:\PS>Remove-EmcLun -Lun $l -Silent -Force
C:\PS>Get-EmcLUN 7
WARNING: Unable to find lun(s) with the given parameters.
C:\PS>
This example gets a LUN and removes it.
Remove-EmcSnapshotLun Removes the snapshot LUN.
Syntax
Remove-EmcSnapshotLUN -SnapshotLUN <SnapshotLun> [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
-SnapshotLUN <SnapshotLun>
Attributes: Required, Position: named
Specifies the ESI snapshot LUN object. You can obtain a snapshot LUN from the storage system or by using the Get-EmcSnapshotLun cmdlet.
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the cmdlet to continue without asking for the user's confirmation.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Describes what would happen if the command is executed.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
Prompts the user for confirmation before executing the command.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
84
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$l = New-EmcLun -Pool $p -Name esi_ps_test_1 -CapacityInMB 1024 -Silent
C:\PS>$l.ArrayLunId
14
C:\PS>$sl = New-EmcSnapshotLun -SourceLUN $l -Silent
C:\PS>$sl.ArrayLunId
SCLUN_14_A
C:\PS>Remove-EmcSnapshotLUN -SnapshotLUN $sl -Silent
Confirm
Are you sure you want to perform this action?
Performing operation "Remove-EmcSnapshotLUN" on Target "SCLUN_14_A".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
This example creates a LUN, creates a snapshot LUN from it, and removes a LUN.
Remove-EmcStandbyLun Removes a standby LUN.
Syntax Remove-EmcStandByLun -StandByLuns <StandByLun[]> [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
Parameters
-StandByLuns <StandByLun[]>
Attributes: Required, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
85
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Describes what would happen if you executed the command without actually executing the command.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
Prompts you for confirmation before executing the command.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$sys= Get-EmcStorageSystem -ID *VMAX*
C:\PS>New-EmcStandByLun -StorageSystem $sys -Count 2 -Capacity 2GB
C:\PS>$sLun= Get-EmcStandbyLun -StorageSystem $sys | where{$_.arrayLunId -match "041C"}
C:\PS> Remove-EmcStandByLun -StandByLuns $slun
This example creates and gets two standby LUNs for a VMAX storage system. And then removes one of the standby LUNs from the storage system.
Remove-EmcStorageAccessControl Removes the storage access control.
Syntax Remove-EmcStorageAccessControl -AccessControl <StorageAccessControlSurrogate> -Pool <StoragePool> [-Silent] [<CommonParameters>]
Parameters
AccessControl <StorageAccessControlSurrogate>
Attributes: Required, Position: named
Specify the storage access control object. A storage access control object can be created by using New-EmcStorageAccessControl Cmdlet.
-Pool <StoragePool>
Attributes: Required, Position: named
Specify the pool of which the access you want to remove from the storage access control object.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
86
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>Remove-EmcStorageAccessControl -AccessControl $sac -Pool $pool
This example shows how to remove a pool access from the StorageAccessControl object.
Remove-EmcVNXSharedFolderPool Removes (destroys) the shared folder pool from the VNX storage system.
Syntax Remove-EmcVNXSharedFolderPool -SharedFolderPool <StoragePool> [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
-SharedFolderPool <StoragePool>
Attributes: Required, Position: 1
Specifies the ESI (EMC Storage Integrator) shared folder pool object. A shared folder pool object can be obtained by using the ESI Storage System object or by using the Get-EmcStoragePool cmdlet. It is a positional parameter (position = 0).
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the Cmdlet to continue without asking for user's confirmation.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
87
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Describes what would happen if you executed the command without actually executing the command.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$s = Get-EmcStorageSystem
$p = Get-EmcStoragePool -StorageSystem $s[0] -PoolType File -ID *TestStoragePool*
Remove-EmcVNXSharedFolderPool -SharedFolderPool $p
This example deletes or removes the specified shared folder pool.
Restore-EmcSnapshotLun Restores a snapshot LUN.
Syntax Restore-EmcSnapshotLUN -SnapshotLUN <SnapshotLun> [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
-SnapshotLUN <SnapshotLun>
Attributes: Required, Position: 1
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the Cmdlet to continue without asking for user's confirmation.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
88
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Describes what would happen if you executed the command without actually executing the command.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$s = Get-EmcStorageSystem
$p = Get-EmcStoragePool -StorageSystem $s[0] -PoolType File -ID *TestStoragePool*
Remove-EmcVNXSharedFolderPool -SharedFolderPool $p
This example deletes or removes the specified shared folder pool.
Set-EmcCifsSharedFolderMountPoint Mounts a shared folder on to a host system.
Syntax Set-EmcCifsSharedFolderMountPoint -HostSystem <IHostSystem> -DriveLetter <String> -SharedFolder <CifsSharedFolder> -Credential <PSCredential> [-Silent] [<CommonParameters>]
Parameters
-HostSystem <IHostSystem>
Attributes: Required, Position: named
Specifies the ESI (EMC Storage Integrator) Host System object. A host system object can be added to ESI using Get-EmcHostSystemCredential and Connect-EmcSystem Cmdlets. A host system object can be obtained by using Get-EmcHostSystem Cmdlet. It can be a stand alone host system or virtual machine or hypervisor.
-DriveLetter <String>
Attributes: Required, Position: named
Specifies the drive letter.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
89
-SharedFolder <CifsSharedFolder>
Attributes: Required, Position: named
Specifies the ESI (EMC Storage Integrator) shared folder object. A shared folder object can be obtained from ESI Host System object or by using Get-EmcSharedFolder Cmdlet.
-Credential <PSCredential>
Attributes: Required, Position: named
The credential object used to connect to the host. A credential object can be created using the Get-Credential cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$h = Get-EmcHostSystem -ID *.136*
$s = Get-EmcStorageSystem
$c = Get-Credential
$p = Get-EmcStoragePool -StorageSystem $s[0] -PoolType File -ID *FileSystem1*
$f = Get-EmcSharedFolder -Pool $p -ID *PS*
Set-EmcCifsSharedFolderMountPoint -HostSystem $h -DriveLetter T -SharedFolder $f -Credential $c
This example mounts the specified shared folder to the specified host.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
90
Set-EmcLunAccess Masks or unmasks the LUN to host or cluster or FC/iSCSI initiators.
Syntax • Set-EmcLunAccess -Lun <Lun> -HostSystem <IHostSystem> -
Unavailable [-Silent] [<CommonParameters>]
• Set-EmcLunAccess -Lun <Lun> -HostSystem <IHostSystem> -Available [-Silent] [<CommonParameters>]
• Set-EmcLunAccess -Lun <Lun> -InitiatorId <String[]> -HostName <String> -HostIP address <String> -Available [-Silent] [<CommonParameters>]
• Set-EmcLunAccess -Lun <Lun> -InitiatorId <String[]> -HostName <String> -HostIP address <String> -Unavailable [-Silent] [<CommonParameters>]
• Set-EmcLunAccess -Lun <Lun> -ClusterSystem <IClusterSystem> -Unavailable [-Silent] [<CommonParameters>]
• Set-EmcLunAccess -Lun <Lun> -ClusterSystem <IClusterSystem> -Available [-Silent] [<CommonParameters>]
Parameters
-Lun <Lun>
Attributes: Required, Position: named
Specifies the ESI LUN object. You can obtain a LUN object by using the ESI Storage System object or by using the Get-EmcLun cmdlet.
-HostSystem <IHostSystem>
Attributes: Required, Position: named
Specifies the ESI host system object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a host system object by using the Get-EmcHostSystem cmdlet. It can be a standalone host system, a virtual machine, or a hypervisor.
-Unavailable <SwitchParameter>
Attributes: Required, Position: named
Masks the LUN for the specified host, cluster systems, or FC\iSCSI initiators.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter that turns off all the informational and verbose messages. However, it still displays warnings and errors.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
91
-Available <SwitchParameter>
Attributes: Required, Position: named
Unmasks the LUN to the specified host, cluster systems, or FC\iSCSI initiators.
-InitiatorId <String[]>
Attributes: Required, Position: named
Specifies the iSCSI or FC initiator’s ID.
-HostName <String>
Attributes: Required, Position: named
Specifies the host name.
-HostIP address <String>
Attributes: Required, Position: named
Specifies the host ip address.
-ClusterSystem <IClusterSystem>
Attributes: Required, Position: named
Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can obtain a cluster system object by using the Get-EmcClusterSystem cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 -------------- C:\PS>$l = Get-EmcLun mylun*
C:\PS>$h = Get-EmcHostSystem myhost*
C:\PS>$l | select ArrayLunId, name
C:\PS>$h | select name, IP address
C:\PS>Set-EmcLunAccess -Lun $l -HostSystem $h -Available
This example unmasks the LUN on the host system.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
92
-------------- Example 2 --------------
C:\PS>$l | select ArrayLunId, name
C:\PS>$h | select name, IP address
C:\PS>Set-EmcLunAccess -Lun $l -HostSystem $h -UnAvailable
This example masks the LUN on the host system.
-------------- Example 3 --------------
C:\PS>$l | select ArrayLunId, name
C:\PS>$c | select name, IP address
C:\PS>Set-EmcLunAccess -Lun $l -ClusterSystem $c -Available
This example unmasks the LUN on the cluster system.
-------------- Example 4 --------------
C:\PS>$l | select ArrayLunId, name
C:\PS>$c | select name, IP address
C:\PS>Set-EmcLunAccess -Lun $l -ClusterSystem $c -Unavailable
This example masks the LUN on the cluster system.
-------------- Example 5 --------------
C:\PS>$l | select ArrayLunId, name
C:\PS>$c | select name, IP address
C:\PS>Set-EmcLunAccess -Lun $l -InitiatorId $id -Available
This example unmasks the specified LUN on the specified iSCSI/FC initiator.
-------------- Example 6 --------------
C:\PS>$l | select ArrayLunId, name
C:\PS>$c | select name, IP address
C:\PS>Set-EmcLunAccess -Lun $l -InitiatorId $id -Unvailable
This example masks the specified LUN on the specified iSCSI/FC initiator.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
93
Host operations
Add-EmcHostDiskToCluster Adds a disk to the cluster.
Syntax • Add-EmcHostDiskToCluster -HostLunIdentifier <HostLunIdentifier>
-ClusterSystem <IClusterSystem> [-ClusterGroupName <String>] [-Silent] [<CommonParameters>]
• Add-EmcHostDiskToCluster -HostLunIdentifier <HostLunIdentifier> -ClusterSystem <IClusterSystem> -AddToClusterSharedVolume [-Silent] [<CommonParameters>]
• Add-EmcHostDiskToCluster -HostDisk <Disk> -ClusterSystem <IClusterSystem> [-ClusterGroupName <String>] [-Silent] [<CommonParameters>]
• Add-EmcHostDiskToCluster -HostDisk <Disk> -ClusterSystem <IClusterSystem> -AddToClusterSharedVolume [-Silent] [<CommonParameters>]
Parameters
-HostLunIdentifier <HostLunIdentifier>
Attributes: Required, Position: named
Specifies the ESI HostLunIdentifier object. You can obtain the HostLunIdentifier from the ESI host disk object, ESI cluster disk object, or by using the Get-EmcHostLunIdentifier cmdlet.
-ClusterSystem <IClusterSystem>
Attributes: Required, Position: named
Specifies the ESI cluster system object. You can add the cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can obtain the cluster system object by using the Get-EmcClusterSystem cmdlet.
-ClusterGroupName <String>
Attributes: Optional, Position: named
Specifies the cluster group name. If the cluster group name is not specified, the cmdlet adds the disk to the available storage group.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
94
-AddToClusterSharedVolume <SwitchParameter>
Attributes: Required, Position: named
Adds to the cluster shared volume.
-HostDisk <Disk>
Attributes: Required, Position: named
Specifies the ESI host disk object. You can obtain it from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -CapacityInMB 1024 -Silent -Thin
C:\PS>$h = Get-EmcClusterSystem myclus*
C:\PS>Set-EmcLunAccess -Lun $l -ClusterSystem $h -Available -silent
C:\PS>$hd = Find-EmcHostDisk -ClusterSystem $h -Lun $l -Silent
C:\PS>$hd.HostDiskIdentifier
\\?\PhysicalDrive5
C:\PS>Initialize-EmcHostDisk -HostDisk $hd -ClusterSystem $h -PartitionStyle gpt
C:\PS>New-EmcVolume -HostSystem $h -HostDisk $hd -Label volume_1
C:\PS>$cd = Add-EmcHostDiskToCluster -ClusterSystem $c -HostDisk $hd
This example shows how to create a LUN, unmask the LUN to a cluster system, find the corresponding disk, initialize it, create a volume, and add the disk to a cluster. By default, the disk is added to the available storage group because the group name is not specified.
-------------- Example 2 --------------
C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -CapacityInMB 1024 -Silent -Thin
C:\PS>$h = Get-EmcClusterSystem myclus*
C:\PS>Set-EmcLunAccess -Lun $l -ClusterSystem $h -Available -silent
C:\PS>$hd = Find-EmcHostDisk -ClusterSystem $h -Lun $l -Silent
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
95
C:\PS>$hd.HostDiskIdentifier
\\?\PhysicalDrive5
C:\PS>Initialize-EmcHostDisk -HostDisk $hd -ClusterSystem $h -PartitionStyle gpt
C:\PS>New-EmcVolume -HostSystem $h -HostDisk $hd -Label volume_1
C:\PS>$cd = Add-EmcHostDiskToCluster -ClusterSystem $c -HostDisk $hd -AddToClusterSharedVolume
This example shows how to create a LUN, unmask the LUN onto a cluster system, find the corresponding disk, initialize it, create a volume, and add to the cluster shared volume group.
Clear-EmcHostDiskSignature Clears the host disk signature and assigns a new one.
Syntax Clear-EmcHostDiskSignature -HostDisk <Disk> [-Silent] [<CommonParameters>]
Parameters
-HostDisk <Disk>
Attributes: Required, Position: named
Specifies the ESI host disk object. You can obtain it from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter that turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$h = Get-EmcHostSystem *.148
C:\PS>$h | Update-EmcSystem -Silent
C:\PS>$hd = $h.HostDisks[6]
C:\PS>$hd.MbrDiskSignature
3452748690
C:\PS>$hd.HostDiskIdentifier
\\?\PhysicalDrive6
C:\PS>Clear-EmcHostDiskSignature -HostDisk $hd
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
96
TaskStatus: Started
0% : Clearing host disk signature...
100% : Host disk signature successfully cleared.
TaskStatus: Completed
C:\PS>$h | Update-EmcSystem -Silent
C:\PS>$hd = $h.HostDisks[6]
C:\PS>$hd.HostDiskIdentifier
\\?\PhysicalDrive6
C:\PS>$hd.MbrDiskSignature
3452748691
C:\PS>
This example clears the host disk signature and assigns a new one.
Expand-EmcHostVolume Expands the host volume.
Syntax Expand-EmcHostVolume -HostSystem <IHostSystem> -Volume <Volume> [-Capacity <UInt64>] [-Silent] [<CommonParameters>]
Parameters
-HostSystem <IHostSystem>
Attributes: Required, Position: named
Specifies the ESI (EMC Storage Integrator) Host System object. A host system object can be added to ESI using Get-EmcHostSystemCredential and Connect-EmcSystem Cmdlets. A host system object can be obtained by using Get-EmcHostSystem Cmdlet. It can be a stand alone host system or virtual machine or hypervisor.
-Volume <Volume>
Attributes: Required, Position: named
Specifies the volume of host.
-CapacityToAdd <UInt64>
Attributes: Optional, Position: named
Specify the new capacity to be added to host.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
97
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$s=Get-EmcStorageSystem -Id *124
C:\PS>$pool = Get-EmcStoragePool -ID *1000 -StorageSystem $s
C:\PS>$system=Get-EmcHostSystem *43
C:\PS>$lun = new-emclun -Pool $pool -Capacity 1GB -Thin -Name "lun_1"
C:\PS>Set-EmcLunAccess -HostSystem $system -Lun $lun -Available
C:\PS>$disk = Find-EmcHostDisk -HostSystem $system -Lun $lun
C:\PS>Initialize-EmcHostDisk -HostSystem $system -HostDisk $disk -PartitionStyle mbr
C:\PS>$volume = New-EmcVolume -HostSystem $system -HostDisk $disk -FileSystemType ntfs -AllocationUnitSizeInBytes 64KB -Label lun_1
C:\PS>Expand-EmcLun -Lun $lun -NewCapacity 5GB
C:\PS>Expand-EmcHostVolume -HostSystem $system -Volume $volume
This example expands the host volume.
Find-EmcHostDisk Finds the ESI host disk associated with the specified ESI LUN or HostLunIdentifier or VmDiskConfiguration on a specified host system or cluster system.
Syntax
• Find-EmcHostDisk -HostSystem <IHostSystem> -HostLunIdentifier <HostLunIdentifier> [-Silent] [<CommonParameters>]
• Find-EmcHostDisk -HostSystem <IHostSystem> -Lun <Lun> [-Silent] [<CommonParameters>]
• Find-EmcHostDisk -ClusterSystem <IClusterSystem> -Lun <Lun> [-Silent] [<CommonParameters>]
• Find-EmcHostDisk -VirtualMachine <IVirtualMachine> -VmDiskConfig <VmDiskConfiguration> [-Silent] [<CommonParameters>]
Description
The Find-EmcHostDisk cmdlet finds the ESI host disk associated with the specified LUN or HostLunIdentifier or VmDiskConfiguration on a specified host system or cluster system by updating the host disks.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
98
Parameters
-HostSystem <IHostSystem>
Attributes: Required, Position: named
Specifies the ESI host system object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a host system object by using the Get-EmcHostSystem cmdlet. It can either be a standalone host system, a virtual machine, or a hypervisor.
-HostLunIdentifier <HostLunIdentifier>
Attributes: Required, Position: named
Specifies the ESI HostLunIdentifier object. You can obtain a HostLunIdentifier from ESI host disk object or ESI cluster disk object or by using the Get-EmcHostLunIdentifier cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-Lun <Lun>
Attributes: Required, Position: named
Specifies the ESI LUN object. You can obtain a LUN object by using the ESI storage system object or by using the Get-EmcLun cmdlet.
-ClusterSystem <IClusterSystem>
Attributes: Required, Position: named
Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a cluster system object by using the Get-EmcClusterSystem cmdlet.
-VirtualMachine <IVirtualMachine>
Attributes: Required, Position: named
Specifies the ESI virtual machine host system object. ESI virtual machine is derived from the host system. You can add a virtual machine to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets just like the host system. You can obtain a virtual machine (host system) object by using the Get-EmcHostSystem cmdlet.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
99
-VmDiskConfig <VmDiskConfiguration>
Attributes: Required, Position: named
Specifies the ESI VmDiskConfiguration object. It encapsulates the attached file-based disk or pass-through disk configuration information such as the SCSI controller ID, index, and attached LUN number. It can be used to find the disk in the virtual machine if a virtual disk (file-based disk or pass-through disk) is attached to a virtual machine from a hypervisor. The Add-EmcFilebasedDiskToVirtualMachine and Add-EmcPassthroughDiskToVirtualMachine cmdlets return the VmDiskConfiguration object.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -CapacityInMB 1024 -Silent -Thin C:\PS>$h = Get-EmcHostSystem *.148 C:\PS>Set-EmcLunAccess -Lun $l -HostSystem $h -Available TaskStatus: Started 10% : Unmasking the LUN to the specified host(s)... 100% : The specified LUN has been unmasked to the specified initiators... TaskStatus: Completed C:\PS>$hd = Find-EmcHostDisk -HostSystem $h -Lun $l -Silent C:\PS>$hd.HostDiskIdentifier \\?\PhysicalDrive7
This example creates a LUN, un-masks onto a host system, and finds the corresponding disk.
-------------- Example 2 --------------
C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -CapacityInMB 1024 -Silent -Thin C:\PS>$h = Get-EmcClusterSystem myclus* C:\PS>Set-EmcLunAccess -Lun $l -ClusterSystem $h -Available -silent C:\PS>$hd = Find-EmcHostDisk -ClusterSystem $h -Lun $l -Silent C:\PS>$hd.HostDiskIdentifier \\?\PhysicalDrive5
This example creates a LUN, un-masks onto a cluster system, and finds the corresponding disk.
-------------- Example 3 --------------
C:\PS>$h = Get-EmcHostSystem *.133 C:\PS>$h.Model Hyper-V, PowerEdge R710 C:\PS>$vm = Get-EmcHostSystem *.148 C:\PS>$vm.Model
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
100
Virtual Machine C:\PS>$h | Update-EmcSystem -Silent C:\PS>$vmconfig = $vm | Get-EmcVirtualMachineConfiguration C:\PS>$locations =Get-EmcAvailableScsiControllerLocation -Hypervisor $h -VirtualMachineConfiguration $vmconfig -ScsiControllerIndex 0 C:\PS>$passthroughDisks = $h | Get-EmcAvailableEmcPassthroughDiskCandidate C:\PS>$diskConfig = Add-EmcPassthroughDiskToVirtualMachine -Hypervisor $h -VirtualMachineConfiguration $vmconfig -HostDisk $passthroughDisks[0] -Location $locations[0] C:\PS>$hd = Find-EmcHostDisk -VirtualMachine $vm -VmDiskConfig $diskConfig C:\PS>Remove-EmcVirtualDiskFromVm -Hypervisor $h -VirtualMachineConfiguration $vmconfig -Location $locations[0] -force
This example attaches a passthrough disk to a virtual machine with the VmDiskConfiguration cmdlet. The Find-EmcHostDisk cmdlet finds the corresponding disk in the virtual machine.
Get-EmcAvailableDriveLetter Gets the available drive letters on a host system or a cluster system.
Syntax • Get-EmcAvailableDriveLetter -HostSystem <IHostSystem> [-Silent]
[<CommonParameters>]
• Get-EmcAvailableDriveLetter -ClusterSystem <IClusterSystem> [-Silent] [<CommonParameters>]
Parameters
-HostSystem <IHostSystem>
Attributes: Required, Position: 1, Accepts pipeline input (by value)
Specifies the ESI host system object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a host system object by using the Get-EmcHostSystem cmdlet. It can be a standalone host system, a virtual machine, or a hypervisor.
-ClusterSystem <IClusterSystem>
Attributes: Required, Position: 1, Accepts pipeline input (by value)
Specifies the ESI host system object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a host system object by using the Get-EmcHostSystem cmdlet. It can be a standalone host system, a virtual machine, or a hypervisor.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
101
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters Examples
-------------- Example 1 --------------
C:\PS>$h = Get-EmcHostSystem *.148 C:\PS>$drives = Get-EmcAvailableDriveLetter -HostSystem $h C:\PS>$drives[0] G C:\PS>$drives.count 20
This example gets the available drive letters from a host system.
-------------- Example 2 --------------
C:\PS>$c = Get-EmcClusterSystem C:\PS>$drives = $c | Get-EmcAvailableDriveLetter C:\PS>$drives.count 15 C:\PS>$drives[14] Y C:\PS>
This example gets the available drive letters from a cluster system.
Get-EmcCifsNetworkShare Gets the list of network shares used by a specified host.
Syntax Get-EmcCifsNetworkShare [-ID <String>] -HostSystem <IHostSystem> [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the network share local path or remote path. Wildcards are permitted. It is a positional parameter (position = 0).
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
102
-HostSystem <IHostSystem>
Attributes: Required, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) Host System object. A host system object can be added to ESI using Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. A host system object can be obtained by using Get-EmcHostSystem cmdlet. It can be a stand alone host system or virtual machine or hypervisor.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>Get-EmcHostSystem | Get-EmcCifsNetworkShare $l = Get-EmcHostSystem Get-EmcCifsNetworkShare -HostSystem $l[0] -id C:\Mount
This example gets the list of network shares mounted on a specified host.
Get-EmcClusterDisk Gets the list of cluster disks.
Syntax
• Get-EmcClusterDisk [-ID <String>] [-ClusterSystem <IWindowsFailoverClusterSystem>] [-ClusterGroupName <String>] [-Silent] [<CommonParameters>]
• Get-EmcClusterDisk [-ID <String>] [-ClusterSystem <IWindowsFailoverClusterSystem>] [-ClusterSharedVolume] [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the cluster disk resource name. Wildcards are permitted. It is a positional parameter (position = 0).
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
103
-ClusterSystem <IWindowsFailoverClusterSystem>
Attributes: Optional, Position: named, Accepts pipeline input (by value)
Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can obtain a cluster system object by using the Get-EmcClusterSystem cmdlet.
-ClusterGroupName <String>
Attributes: Optional, Position: named
Specifies the cluster group name to filter the cluster disks based on the group name.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-ClusterSharedVolume <SwitchParameter>
Attributes: Optional, Position: named
Allows the cmdlet to cluster shared volume's disks.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters Examples
-------------- Example 1 --------------
C:\PS>Get-EmcClusterDisk
C:\PS>Get-EmcClusterDisk -ClusterSharedVolume
C:\PS>Get-EmcClusterDisk -ClusterGroupName "Available Storage"
Enumerates the cluster disks from all the connected cluster systems.
-------------- Example 2 --------------
C:\PS>Get-EmcClusterSystem | Get-EmcClusterDisk
C:\PS>Get-EmcClusterSystem | Get-EmcClusterDisk -ClusterSharedVolume
C:\PS>Get-EmcClusterSystem | Get-EmcClusterDisk -ClusterGroupName "Available Storage"
This example gets the cluster disks from the cluster system.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
104
-------------- Example 3 --------------
C:\PS>Get-EmcClusterSystem | Get-EmcClusterDisk "Cluster Disk*"
C:\PS>Get-EmcClusterSystem | Get-EmcClusterDisk -id "Cluster Disk*"
C:\PS>Get-EmcClusterSystem | Get-EmcClusterDisk "Cluster Disk 96056475"
This example gets the cluster disks based on cluster disk resource name. Because the ID parameter is positional, you can omit the name.
Get-EmcClusterGroup Gets the list of cluster groups.
Syntax
Get-EmcClusterGroup -ClusterSystem <IWindowsFailoverClusterSystem> [-Silent] [<CommonParameters>]
Parameters
-ClusterSystem <IWindowsFailoverClusterSystem>
Attributes: Required, Position: 1, Accepts pipeline input (by value)
Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can obtain a cluster system object by using the Get-EmcClusterSystem cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
105
Example
C:\PS>Get-EmcClusterSystem | Get-EmcClusterGroup -Silent | select name Name ---- Available Storage App1 App2
This example gets the cluster groups of the cluster system.
Get-EmcClusterSystem Gets connected to the cluster systems.
Syntax
• Get-EmcClusterSystem [-ID <String>] [-Silent] [<CommonParameters>]
• Get-EmcClusterSystem -ClusterDisk <WindowsBasicClusterDisk> [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the cluster name, IP address, or global ID. Wildcards are permitted. It is a positional parameter (position = 0).
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-ClusterDisk <WindowsBasicClusterDisk>
Attributes: Required, Position: named, Accepts pipeline input (by value)
Specifies the ESI cluster disk object. You can obtain a cluster disk object from the ESI cluster system object or by using the Get-EmcClusterDisk cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Adds a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
106
Examples
-------------- Example 1 --------------
C:\PS>$cBlob = Get-EmcClusterSystemCredential C:\PS>$c = $cBlob | Connect-EmcSystem C:\PS>Get-EmcClusterSystem
This example gets all the connected cluster systems.
-------------- Example 2 --------------
C:\PS>Get-EmcClusterSystem -Id mycluster* C:\PS>Get-EmcClusterSystem -Id 10.x.y.* C:\PS>Get-EmcClusterSystem 2cc75087-8ddf*
This example gets the cluster system based on the specified cluster name, IP address, or global ID. Wild cards are permitted. Because the ID parameter is positional, you can omit the name.
-------------- Example 3 --------------
C:\PS>$cd = Get-EmcClusterDisk -Silent C:\PS>$cd[0].ClusterDiskResourceName Cluster Disk 195783575 C:\PS>$cd[0] | Get-EmcClusterSystem
This example gets the cluster system based on the specified cluster disk.
Get-EmcHostBusAdapter Get the list of host bus adapters for the host(s).
Syntax
• Get-EmcHostBusAdapter -HostSystem <IHostSystem> [-Silent] [<CommonParameters>]
• Get-EmcHostBusAdapter -ClusterSystem <IClusterSystem> [-Silent] [<CommonParameters>]
Description
Get the list of host bus adapters for the host(s).
Parameters
-HostSystem <IHostSystem>
Attributes: Required, Position: 1
Specifies the ESI (EMC Storage Integrator) Host System object. A host system object can be added to ESI using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. A host system object can be obtained by using the Get-EmcHostSystem cmdlet.It can be a stand alone host system, a virtual machine, or a hypervisor.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
107
ClusterSystem <IClusterSystem>
Attributes: Required, Position: 1
Specifies the ESI (EMC Storage Integrator) Cluster System object. A cluster system object can be added to ESI using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. A cluster system object can be obtained by the Get-EmcClusterSystem cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$h = Get-EmcHostSystem *.148
C:\PS>Get-EmcHostBusAdapter -HostSystem $h
This example gets the host bus Adapter of the given hostystem.
-------------- Example 2 --------------
C:\PS>$c = Get-EmcClusterSystem *.157
C:\PS>Get-EmcHostBusAdapter -ClusterSystem $c
This example gets the host bus Adapter of the given clustersystem.
Get-EmcHostDisk Gets the list of host disks.
Syntax • Get-EmcHostDisk [-ID <String>] [-Lun <Lun>] [-HostSystem
<IHostSystem>] [-Silent] [<CommonParameters>]
• Get-EmcHostDisk [-ID <String>] [-Lun <Lun>] -ClusterSystem <IClusterSystem> [-Silent] [<CommonParameters>]
• Get-EmcHostDisk [-ID <String>] -Volume <Volume> [-Silent] [<CommonParameters>]
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
108
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the host disk's HostDiskIdentifier or MbrDiskSignature or GptDiskGuid. Wildcards are permitted. It is a positional parameter (position = 0).
-Lun <Lun>
Attributes: Optional, Position: named, Accepts pipeline input (by value)
Specifies the ESI LUN object. You can obtain a LUN object by using the ESI storage system object or by using the Get-EmcLun cmdlet.
-HostSystem <IHostSystem>
Attributes: Optional, Position: named
Specifies the ESI (EMC Storage Integrator) Host System object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a host system object by using the Get-EmcHostSystem cmdlet. It can be a standalone host system, a virtual machine, or a hypervisor.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-ClusterSystem <IClusterSystem>
Attributes: Required, Position: named
Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can obtain a cluster system object by using the Get-EmcClusterSystem cmdlet.
-Volume <Volume>
Attributes: Required, Position: named, Accepts pipeline input (by value)
Specifies the ESI volume object. You can obtain a volume object from the ESI host system object or by using the Get-EmcHostVolume cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
109
Examples
-------------- Example 1 --------------
C:\PS>$hBlob = Get-EmcHostSystemCredential
C:\PS>$h = $hBlob | Connect-EmcSystem
C:\PS>$h.RefreshDisks()
C:\PS>Get-EmcHostDisk -HostSystem $h
C:\PS>$h | Update-EmcSystem
C:\PS>Get-EmcHostDisk -HostSystem $h
This example gets all disks of the specified host.
-------------- Example 2 --------------
C:\PS>Get-EmcHostSystem | Update-EmcSystem
C:\PS>Get-EmcHostDisk
This example gets all disks on all the connected hosts.
-------------- Example 3 --------------
C:\PS>$h = Get-EmcHostSystem *myhost*
C:\PS>$h | Update-EmcSystem
C:\PS>Get-EmcHostDisk -ID \\?\PhysicalDrive8 -HostSystem $h
C:\PS>Get-EmcHostDisk -ID *Drive8* -HostSystem $h
C:\PS>Get-EmcHostDisk \\?\PhysicalDrive8 -HostSystem $h
C:\PS>Get-EmcHostDisk *Drive8* -HostSystem $h
This example gets the host disks of the specified host system with the specified HostDiskIdentifier or MbrDiskSignature or GptDiskGuid (accepts wildcards). Because the ID parameter is positional, you can omit the name.
-------------- Example 4 --------------
C:\PS>Get-EmcHostSystem | Update-EmcSystem
C:\PS>Get-EmcHostDisk -ID \\?\PhysicalDrive8
C:\PS>Get-EmcHostDisk -ID *Drive8*
C:\PS>Get-EmcHostDisk \\?\PhysicalDrive8
C:\PS>Get-EmcHostDisk *Drive8*
This example gets the host disks of all the connected host systems with the specified HostDiskIdentifier or MbrDiskSignature or GptDiskGuid (accepts wildcards). Because the ID parameter is positional, you can omit the name.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
110
-------------- Example 5 --------------
C:\PS>$l = Get-EmcLUN mylun*
C:\PS>$l
C:\PS>Get-EmcHostDisk -Lun $l
C:\PS>$l | Get-EmcHostDisk
C:\PS>$h = Get-EmcHostSystem *myhost*
C:\PS>$h | Update-EmcSystem
C:\PS>$l | Get-EmcHostDisk -hostsystem $h
C:\PS>$s = Get-EmcStorageSystem
C:\PS>$s | Update-EmcSystem -Silent
C:\PS>$s.Luns | Get-EmcHostDisk foo*
C:\PS>$c = Get-EmcClusterSystem
C:\PS>$l = Get-EmcStoragePool gold* | Get-EmcLUN
C:\PS>$l | Get-EmcHostDisk -ClusterSystem $c
This example gets the host disks associated with the specified LUN object.
-------------- Example 6 --------------
C:\PS>Get-EmcHostVolume | Get-EmcHostDisk
C:\PS>$h = Get-EmcHostSystem *myhost*
C:\PS>$h | Update-EmcSystem
C:\PS>$v = Get-EmcHostVolume c:* -HostSystem $h
C:\PS>$v | Get-EmcHostDisk
This example gets the host disks associated with the specified volume object.
Get-EmcHostLunIdentifier Gets the HostLunIdentifier.
Syntax
• Get-EmcHostLunIdentifier -Lun <Lun> [-Silent] [<CommonParameters>]
• Get-EmcHostLunIdentifier -Lun <Lun> -HostSystem <IHostSystem> [-Silent] [<CommonParameters>]
• Get-EmcHostLunIdentifier -Lun <Lun> -ClusterSystem <IClusterSystem> [-Silent] [<CommonParameters>]
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
111
Parameters
-Lun <Lun>
Attributes: Required, Position: 1, Accepts pipeline input (by value)
Specifies the ESI LUN object. You can obtain a LUN object by using the ESI storage system object or by using the Get-EmcLun cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-HostSystem <IHostSystem>
Attributes: Required, Position: named
Specifies the ESI host system object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a host system object by using the Get-EmcHostSystem cmdlet. It can be a standalone host system, a virtual machine, or a hypervisor.
-ClusterSystem <IClusterSystem>
Attributes: Required, Position: named
Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can obtain a cluster system object by using the Get-EmcClusterSystem cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$h = Get-EmcHostSystemCredential
PS C:>$Host1 = $h | Connect-EmcHostSystem
PS C:>$Lun95 = Get-EmcLUN Site2*Farm95*
C:\PS>Get-EmcHostLunIdentifier -Lun $Lun95 -HostSystem $Host1
This example gets the HostLunIdentifier for the specified LUN and host system.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
112
-------------- Example 2 --------------
C:\PS>$Cluser1 = Get-EmcClusterSystem
C:\PS>$Cluser1
C:\PS>$Lun29 = Get-EmcLUN 11529*
C:\PS>$Lun29
C:\PS>Get-EmcHostLunIdentifier -Lun $Lun29 -ClusterSystem $Cluster1
This example gets the HostLunIdentifier for the specified LUN and cluster system.
-------------- Example 3 --------------
C:\PS>$l = Get-EmcLUN mylun*
C:\PS>Get-EmcHostLunIdentifier -Lun $l
This example gets the HostLunIdentifier for the specified LUN.
Get-EmcHostSystem Gets the connected host systems.
Syntax
• Get-EmcHostSystem [-Id <String>] [-Silent] [<CommonParameters>]
• Get-EmcHostSystem -HostDisk <Disk> [-Silent] [<CommonParameters>]
• Get-EmcHostSystem -Volume <Volume> [-Silent] [<CommonParameters>]
Parameters
-Id <String>
Attributes: Optional, Position: 1
Specifies the host name, or IP address, or global ID. Wildcards are permitted. It is a positional parameter (position = 0).
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-HostDisk <Disk>
Attributes: Required, Position: named, Accepts pipeline input (by value)
Specifies the ESI host disk object. You can obtain it from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
113
-Volume <Volume>
Attributes: Required, Position: named, Accepts pipeline input (by value)
Specifies the ESI volume object. You can obtain a volume object from the ESI host system object or by using the Get-EmcHostVolume cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets.
Examples
-------------- Example 1 --------------
C:\PS>$h = Get-EmcHostSystemCredential
C:\PS>$Host1 = $h | Connect-EmcHostSystem
C:\PS>Get-EmcHostSystem
This example gets the connected host systems.
-------------- Example 2 --------------
C:\PS>$Disk = Get-EmcHostDisk -id 4074289894
C:\PS>$Disk
C:\PS>Get-EmcHostSystem -Disk $Disk
This example gets the host system of the specified disk.
-------------- Example 3 --------------
C:\PS>$Volume = Get-EmcHostVolume *Site2Farm94*Data*
C:\PS>$Volume
C:\PS>Get-EmcHostSystem -Volume $Volume
This example gets the host system of the specified volume.
-------------- Example 4 --------------
C:\PS>Get-EmcHostSystem <HostName>
C:\PS>Get-EmcHostSystem <HostIP address>
C:\PS>Get-EmcHostSystem <HostGlobalId>
This example gets the host system with the specified host name or IP address or global id (accepts wildcard).
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
114
Get-EmcHostVolume Gets the list of host volumes.
Syntax
• Get-EmcHostVolume [-ID <String>] [-HostDisk <Disk>] [-HostSystem <IHostSystem>] [-Silent] [<CommonParameters>]
• Get-EmcHostVolume [-ID <String>] [-ClusterDisk <WindowsBasicClusterDisk>] [-ClusterSystem <IClusterSystem>] [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the host volumes’ label or drive letter or mount path or HostVolumeIdentifier. Wildcards are permitted. It is a positional parameter (position = 0).
-HostDisk <Disk>
Attributes: Optional, Position: named, Accepts pipeline input (by value)
Specifies the ESI host disk object. You can obtain this from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.
-HostSystem <IHostSystem>
Attributes: Optional, Position: named
Specifies the ESI host system object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a host system object by using the Get-EmcHostSystem cmdlet. It can be a standalone host system, a virtual machine, or a hypervisor.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-ClusterDisk <WindowsBasicClusterDisk>
Attributes: Optional, Position: named, Accepts pipeline input (by value)
Specifies the ESI cluster disk object. You can obtain a cluster disk object from the ESI cluster system object or by using the Get-EmcClusterDisk cmdlet.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
115
-ClusterSystem <IClusterSystem>
Attributes: Optional, Position: named
Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can obtain a cluster system object by using the Get-EmcClusterSystem cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$hBlob = Get-EmcHostSystemCredential
C:\PS>$h = $hBlob | Connect-EmcSystem
C:\PS>$h.RefreshDisks()
C:\PS>Get-EmcHostVolume -HostSystem $h
C:\PS>$h | Update-EmcSystem
C:\PS>Get-EmcHostVolume -HostSystem $h
This example gets all volumes of the specified Host.
-------------- Example 2 --------------
C:\PS>Get-EmcHostSystem | Update-EmcSystem
C:\PS>Get-EmcHostVolume
This example gets all host volumes on all connected hosts.
-------------- Example 3 --------------
C:\PS>$cBlob = Get-EmcClusterSystemCredential
C:\PS>$c = $cBlob | Connect-EmcSystem
C:\PS>$c.RefreshClusterDisks()
C:\PS>Get-EmcHostVolume -ClusterSystem $c
C:\PS>$c | Update-EmcSystem
C:\PS>Get-EmcHostVolume -ClusterSystem $c
C:\PS>Get-EmcClusterDisk | Get-EmcHostVolume | select mountpath
MountPath
---------
F:\
B:\
This example gets the volumes of cluster disks or cluster system.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
116
-------------- Example 4 --------------
C:\PS>Get-EmcHostSystem | Update-EmcSystem
C:\PS>Get-EmcClusterSystem | Update-EmcSystem
C:\PS>Get-EmcHostVolume c:\
C:\PS>Get-EmcHostVolume c*
C:\PS>Get-EmcHostVolume volume_label_1
C:\PS>Get-EmcHostVolume -id "c:\mountpath\*"
C:\PS>Get-EmcHostVolume -id \\?\*
This example gets the volumes based on the drive letter or mount path or label or volume identifier. Wildcards are permitted. Because the ID parameter is positional, you can omit the name.
Initialize-EmcHostDisk Initializes the host disk by bringing the disk online and setting the specified partition style in the host system or cluster system.
Syntax
• Initialize-EmcHostDisk [-PartitionStyle <PSPartitionStyle>] -HostDisk <Disk> -HostSystem <IHostSystem> [-Silent] [<CommonParameters>]
• Initialize-EmcHostDisk [-PartitionStyle <PSPartitionStyle>] -HostDisk <Disk> -ClusterSystem <IClusterSystem> [-Silent] [<CommonParameters>]
Parameters
-PartitionStyle <PSPartitionStyle>
Attributes: Optional, Position: named
Specifies the partition style. Valid values are Mbr and Gpt. The default value is Mbr.
-HostDisk <Disk>
Attributes: Required, Position: named
Specifies the ESI host disk object. You can obtain it from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.
-HostSystem <IHostSystem>
Attributes: Required, Position: named
Specifies the ESI host system object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a host system object by using the Get-EmcHostSystem cmdlet. It can be a standalone host system, a virtual machine, or a hypervisor.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
117
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-ClusterSystem <IClusterSystem>
Attributes: Required, Position: named
Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can obtain a cluster system object by using the Get-EmcClusterSystem cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -CapacityInMB 1024 -Silent -Thin
C:\PS>$h = Get-EmcHostSystem *.148
C:\PS>Set-EmcLunAccess -Lun $l -HostSystem $h -Available
TaskStatus: Started
10% : Unmasking the LUN to the specified host(s)...
100% : The specified LUN has been unmasked to the specified initiators...
TaskStatus: Completed
C:\PS>$hd = Find-EmcHostDisk -HostSystem $h -Lun $l -Silent
C:\PS>Initialize-EmcHostDisk -HostDisk $hd -HostSystem $h
The examples show how to create a LUN, unmask onto a host system, find the corresponding disk, and initialize it (by default, the cmdlet sets the partition style to Mbr).
-------------- Example 2 --------------
C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -CapacityInMB 1024 -Silent -Thin
C:\PS>$h = Get-EmcClusterSystem myclus*
C:\PS>Set-EmcLunAccess -Lun $l -ClusterSystem $h -Available -silent
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
118
C:\PS>$hd = Find-EmcHostDisk -ClusterSystem $h -Lun $l -Silent
C:\PS>$hd.HostDiskIdentifier
\\?\PhysicalDrive5
C:\PS>Initialize-EmcHostDisk -HostDisk $hd -ClusterSystem $h -PartitionStyle gpt
The examples show how to create a LUN, unmask onto a cluster system, find the corresponding disk, and initialize it.
New-EmcVolume Creates a volume.
Syntax
• New-EmcVolume -HostSystem <IHostSystem> -HostDisk <Disk> [-AllocationUnitSizeInBytes <UInt32>] [-FileSystemType <PSFileSystemType>] -Label <String> [-Silent] [<CommonParameters>]
• New-EmcVolume -HostSystem <IHostSystem> -HostLunIdentifier <HostLunIdentifier> [-AllocationUnitSizeInBytes <UInt32>] [-FileSystemType <PSFileSystemType>] -Label <String> [-Silent] [<CommonParameters>]
• New-EmcVolume -ClusterSystem <IClusterSystem> -HostLunIdentifier <HostLunIdentifier> [-AllocationUnitSizeInBytes <UInt32>] [-FileSystemType <PSFileSystemType>] -Label <String> [-Silent] [<CommonParameters>]
• New-EmcVolume -ClusterSystem <IClusterSystem> -HostDisk <Disk> [-AllocationUnitSizeInBytes <UInt32>] [-FileSystemType <PSFileSystemType>] -Label <String> [-Silent] [<CommonParameters>]
Parameters
-HostSystem <IHostSystem>
Attributes: Required, Position: named
Specifies the ESI host system object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a host system object by using the Get-EmcHostSystem cmdlet. It can be a standalone host system, a virtual machine, or a hypervisor.
-HostDisk <Disk>
Attributes: Required, Position: named
Specifies the ESI host disk object. You can obtain it from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
119
-AllocationUnitSizeInBytes <UInt32>
Attributes: Optional, Position: named
Specifies the cluster size (or allocation unit size) of the disk in bytes. This represents the smallest amount of disk space that can be allocated to hold a file. For NTFS file systems, the default value is 65536 bytes. For FAT32, the default value is 4096 bytes.
-FileSystemType <PSFileSystemType>
Attributes: Optional, Position: named
Specifies the type of the file system. Valid values are Ntfs and Fat32. Default value is Ntfs.
-Label <String>
Attributes: Required, Position: named
Specifies volume label.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-HostLunIdentifier <HostLunIdentifier>
Attributes: Required, Position: named
Specifies the ESI HostLunIdentifier object. You can obtain a HostLunIdentifier from the ESI host disk object, the ESI cluster disk object, or by using the Get-EmcHostLunIdentifier cmdlet.
-ClusterSystem <IClusterSystem>
Attributes: Required, Position: named
Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can obtain a cluster system object by using the Get-EmcClusterSystem cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
120
Examples
-------------- Example 1 --------------
C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -CapacityInMB 1024 -Silent -Thin
C:\PS>$h = Get-EmcHostSystem *.148
C:\PS>Set-EmcLunAccess -Lun $l -HostSystem $h -Available
TaskStatus: Started
10% : Unmasking the LUN to the specified host(s)...
100% : The specified LUN has been unmasked to the specified initiators...
TaskStatus: Completed
C:\PS>$hd = Find-EmcHostDisk -HostSystem $h -Lun $l -Silent
C:\PS>Initialize-EmcHostDisk -HostDisk $hd -HostSystem $h
C:\PS>New-EmcVolume -HostSystem $h -HostDisk $hd -Label volume_1
The examples show how to create a LUN, unmask onto a host system, find the corresponding disk, initialize it, and create a volume.
-------------- Example 2 --------------
C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -CapacityInMB 1024 -Silent -Thin
C:\PS>$h = Get-EmcClusterSystem myclus*
C:\PS>Set-EmcLunAccess -Lun $l -ClusterSystem $h -Available -silent
C:\PS>$hd = Find-EmcHostDisk -ClusterSystem $h -Lun $l -Silent
C:\PS>$hd.HostDiskIdentifier
\\?\PhysicalDrive5
C:\PS>Initialize-EmcHostDisk -HostDisk $hd -ClusterSystem $h -PartitionStyle gpt
C:\PS>New-EmcVolume -HostSystem $h -HostDisk $hd -Label volume_1
The examples show how to create a LUN, unmask onto a cluster system, find the corresponding disk, initialize it, and create a volume.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
121
Remove-EmcHostDiskFromCluster Removes the disk from the cluster.
Syntax
• Remove-EmcHostDiskFromCluster -ClusterDisk <WindowsBasicClusterDisk> [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
• Remove-EmcHostDiskFromCluster -ClusterSystem <IClusterSystem> -HostDisk <Disk> [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
• Remove-EmcHostDiskFromCluster -ClusterSystem <IClusterSystem> -HostLunIdentifier <HostLunIdentifier> [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
-ClusterDisk <WindowsBasicClusterDisk>
Attributes: Required, Position: named
Specifies the ESI cluster disk object. You can obtain a cluster disk object from the ESI cluster system object or by using the Get-EmcClusterDisk cmdlet.
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the cmdlet to continue without asking for the user's confirmation.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Describes what would happen if the command was executed, without actually executing the command.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
Prompts for confirmation before executing the command.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
122
-ClusterSystem <IClusterSystem>
Attributes: Required, Position: named
Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can obtain a cluster system object by using the Get-EmcClusterSystem cmdlet.
-HostDisk <Disk>
Attributes: Required, Position: named
Specifies the ESI host disk object. You can obtain it from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.
-HostLunIdentifier <HostLunIdentifier>
Attributes: Required, Position: named
Specifies the ESI HostLunIdentifier object. You can obtain a HostLunIdentifier from the ESI host disk object, the ESI cluster disk object, or by using the Get-EmcHostLunIdentifier cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters Examples
-------------- Example 1 --------------
C:\PS>Get-EmcClusterSystem | Update-EmcSystem -Silent
C:\PS>$cd = Get-EmcClusterDisk cluster*33*
C:\PS>$cd.ClusterDiskResourceName
Cluster Disk 3314428452
C:\PS>Remove-EmcHostDiskFromCluster -ClusterDisk $cd -Silent
Confirm
Are you sure you want to perform this action?
Performing operation "Remove-EmcDiskFromCluster" on Target "[Cluster Disk 3314428452.]".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
C:\PS>Add-EmcHostDiskToCluster -ClusterSystem $c -HostLunIdentifier $cd.HostLunIdentifier -Silent
This example removes the disk from the cluster. The example also shows how to add a disk to the cluster.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
123
-------------- Example 2 --------------
C:\PS>$lid = Get-EmcHostLunIdentifier -Lun $l
C:\PS>Remove-EmcHostDiskFromCluster -HostLunIdentifier $lid -ClusterSystem $c -Force
This example removes the disk from the cluster by using the LUN.
Remove-EmcVolumeMountPoint Removes the specified volume.
Syntax • Remove-EmcVolumeMountPoint -Volume <Volume> -HostSystem
<IHostSystem> [-Silent] [<CommonParameters>]
• Remove-EmcVolumeMountPoint -Volume <Volume> -ClusterSystem <IClusterSystem> [-Silent] [<CommonParameters>]
Parameters
-Volume <Volume>
Attributes: Required, Position: named
Specifies the ESI volume object. You can obtain a volume object from the ESI host system object or by using the Get-EmcHostVolume cmdlet.
-HostSystem <IHostSystem>
Attributes: Required, Position: named
Specifies the ESI host system object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a host system object by using the Get-EmcHostSystem cmdlet. It can be a standalone host system, a virtual machine, or a hypervisor.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-ClusterSystem <IClusterSystem>
Attributes: Required, Position: named
Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can obtain a cluster system object by using the Get-EmcClusterSystem cmdlet.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
124
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters Examples
-------------- Example 1 --------------
C:\PS>$h = Get-EmcHostSystem *.148
C:\PS>$h | Update-EmcSystem -Silent
C:\PS>$h.HostVolumes[5].mountpath
F:\
C:\PS>$h.HostVolumes[5].HostVolumeIdentifier
\\?\GLOBALROOT\Device\HarddiskVolume6
C:\PS>Remove-EmcVolumeMountPoint -Volume $h.HostVolumes[5] -HostSystem $h
TaskStatus: Started
10% : Unmounting the volume...
100% : The specified volume has been unmounted...
TaskStatus: Completed
C:\PS>$h.HostVolumes[5].mountpath
C:\PS>$h.HostVolumes[5].HostVolumeIdentifier
\\?\GLOBALROOT\Device\HarddiskVolume6
C:\PS>
Unmounts the specified volume.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
125
Set-EmcHostDiskOnlineState Changes the specified disk's online state.
Syntax • Set-EmcHostDiskOnlineState -HostDisk <Disk> -Online [-Silent]
[<CommonParameters>]
• Set-EmcHostDiskOnlineState -HostDisk <Disk> -Offline [-Silent] [<CommonParameters>]
Parameters
-HostDisk <Disk>
Attributes: Required, Position: named
Specifies the ESI host disk object. You can obtain it from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.
-Online <SwitchParameter>
Attributes: Required, Position: named
Changes the disk state to online.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter that turns off all the informational and verbose messages. However, it still displays warnings and errors.
-Offline <SwitchParameter>
Attributes: Required, Position: named
Changes the disk state to offline.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
126
Examples
-------------- Example 1 --------------
C:\PS>$h = Get-EmcHostSystem *.148
C:\PS>$h | Update-EmcSystem -Silent
C:\PS>$h.HostDisks | select hostdiskidentifier
HostDiskIdentifier
------------------ \\?\PhysicalDrive4 \\?\PhysicalDrive7 \\?\PhysicalDrive1 \\?\PhysicalDrive2 \\?\PhysicalDrive3 \\?\PhysicalDrive5 Error! Hyperlink reference not valid.
C:\PS>$hd = $h.HostDisks[1]
C:\PS>Set-EmcHostDiskOnlineState -HostDisk $hd -Offline
Changes the disk state to offline.
-------------- Example 2 --------------
C:\PS>$h = Get-EmcHostSystem *.148
C:\PS>$h.RefreshDisks()
C:\PS>$h.HostDisks | select hostdiskidentifier
HostDiskIdentifier
------------------
\\?\PhysicalDrive4 \\?\PhysicalDrive7 \\?\PhysicalDrive1 \\?\PhysicalDrive2 \\?\PhysicalDrive3 \\?\PhysicalDrive5 \\?\PhysicalDrive6
C:\PS>$hd = $h.HostDisks[1]
C:\PS>Set-EmcHostDiskOnlineState -HostDisk $hd -Online
Changes the disk state to online.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
127
Set-EmcHostDiskReadonlyState Changes the specified disk's read-only state.
Syntax
• Set-EmcHostDiskReadonlyState -HostDisk <Disk> -Readonly [-Silent] [<CommonParameters>]
• Set-EmcHostDiskReadonlyState -HostDisk <Disk> -ReadWrite [-Silent] [<CommonParameters>]
Parameters
-HostDisk <Disk>
Attributes: Required, Position: named
Specifies the ESI host disk object. You can obtain it from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.
-Readonly <SwitchParameter>
Attributes: Required, Position: named
Changes the disk state to read only.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-ReadWrite <SwitchParameter>
Attributes: Required, Position: named
Changes the disk state to read-only.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
128
Examples
-------------- Example 1 --------------
C:\PS>$h = Get-EmcHostSystem *.148
C:\PS>$h | Update-EmcSystem -Silent
C:\PS>$h.HostDisks | select hostdiskidentifier
HostDiskIdentifier
------------------
\\?\PhysicalDrive4 \\?\PhysicalDrive7 \\?\PhysicalDrive1 \\?\PhysicalDrive2 \\?\PhysicalDrive3 \\?\PhysicalDrive5 Error! Hyperlink reference not valid.6 C:\PS>$hd = $h.HostDisks[1]
C:\PS>Set-EmcHostDiskReadonlyState -Readonly -HostDisk $hd
Changes the disk state to read-only.
-------------- Example 2 --------------
C:\PS>C:\PS>$h = Get-EmcHostSystem *.148
C:\PS>$h.RefreshDisks()
C:\PS>$h.HostDisks | select hostdiskidentifier
HostDiskIdentifier
------------------ \\?\PhysicalDrive4 \\?\PhysicalDrive7 \\?\PhysicalDrive1 \\?\PhysicalDrive2 \\?\PhysicalDrive3 \\?\PhysicalDrive5 \\?\PhysicalDrive6 C:\PS>$hd = $h.HostDisks[1]
C:\PS>Set-EmcHostDiskReadonlyState -HostDisk $hd -ReadWrite
Changes the disk state to read/write.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
129
Set-EmcVolumeMountPoint Sets the volume's drive letter or mount path.
Syntax
• Set-EmcVolumeMountPoint -HostSystem <IHostSystem> -DriveLetter <String> -Volume <Volume> [-Silent] [<CommonParameters>]
• Set-EmcVolumeMountPoint -HostSystem <IHostSystem> -MountPath <String> -Volume <Volume> [-Silent] [<CommonParameters>]
• Set-EmcVolumeMountPoint -ClusterSystem <IClusterSystem> -DriveLetter <String> -Volume <Volume> [-Silent] [<CommonParameters>]
• Set-EmcVolumeMountPoint -ClusterSystem <IClusterSystem> -MountPath <String> -Volume <Volume> [-Silent] [<CommonParameters>]
Parameters
-HostSystem <IHostSystem>
Attributes: Required, Position: named
Specifies the ESI host system object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a host system object by using the Get-EmcHostSystem cmdlet. It can be a standalone host system, a virtual machine, or a hypervisor.
-DriveLetter <String>
Attributes: Required, Position: named
Specifies the drive letter.
-Volume <Volume>
Attributes: Required, Position: named
Specifies the ESI volume object. You can obtain a volume object from the ESI host system object or by using the Get-EmcHostVolume cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-MountPath <String>
Attributes: Required, Position: named
Specifies the mount path.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
130
-ClusterSystem <IClusterSystem>
Attributes: Required, Position: named
Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can obtain a cluster system object by using the Get-EmcClusterSystem cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters Examples
-------------- Example 1 --------------
C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -CapacityInMB 1024 -Silent -Thin
C:\PS>$h = Get-EmcHostSystem *.148
C:\PS>Set-EmcLunAccess -Lun $l -HostSystem $h -Available
TaskStatus: Started
C:\PS>$hd = Find-EmcHostDisk -HostSystem $h -Lun $l -Silent
C:\PS>Initialize-EmcHostDisk -HostDisk $hd -HostSystem $h
C:\PS>$v = New-EmcVolume -HostSystem $h -HostDisk $hd -Label volume_1 -silent
C:\PS>$drives = Get-EmcAvailableDriveLetter -HostSystem $h
C:\PS>$drives[0]
G
C:\PS>Set-EmcVolumeMountPoint -HostSystem $h -Volume $v -DriveLetter $drives[0] -Silent
C:\PS>Set-EmcVolumeMountPoint -HostSystem $h -Volume $v -MountPath "c:\foo" -silent
The examples show how to create a LUN, unmask onto a host system, find the corresponding disk, initialize it, create a volume, and set a mount point to a drive letter or mount path.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
131
-------------- Example 2 --------------
C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -CapacityInMB 1024 -Silent -Thin
C:\PS>$h = Get-EmcClusterSystem myclus*
C:\PS>Set-EmcLunAccess -Lun $l -ClusterSystem $h -Available -silent
C:\PS>$hd = Find-EmcHostDisk -ClusterSystem $h -Lun $l -Silent
C:\PS>$hd.HostDiskIdentifier
\\?\PhysicalDrive5
C:\PS>Initialize-EmcHostDisk -HostDisk $hd -ClusterSystem $h -PartitionStyle gpt
C:\PS>$v = New-EmcVolume -HostSystem $h -HostDisk $hd -Label volume_1 -Silent
C:\PS>$drives = $h | Get-EmcAvailableDriveLetter
C:\PS>Set-EmcVolumeMountPoint -ClusterSystem $h -Volume $v -DriveLetter $drives[0] -Silent
C:\PS>Set-EmcVolumeMountPoint -ClusterSystem $h -Volume $v
-MountPath "c:\foo" -silent
The examples show how to create a LUN, unmask onto a cluster system, find the corresponding disk, initialize it, create a volume, and set a mount point to a drive letter or mount path.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
132
Hypervisor virtualization operations
Add-EmcFilebasedDiskToVirtualMachine Attaches a file-based disk to a virtual machine.
Syntax
Add-EmcFilebasedDiskToVirtualMachine -Path <String> -VirtualMachineConfiguration <VirtualMachineConfiguration> -Hypervisor <IHypervisor> [-ScsiControllerId <String>] [-ScsiControllerIndex <UInt32>] -Location <UInt32> [-Silent] [<CommonParameters>]
Parameters
-Path <String>
Attributes: Required, Position: named
Specifies the file-based disk path.
-VirtualMachineConfiguration <VirtualMachineConfiguration>
Attributes: Required, Position: named
Specifies the ESI virtual machine configuration object. The virtual machine configuration can be obtained from the ESI hypervisor host system object's VirtualMachinesConfigurations property or by using the Get-EmcVirtualMachineConfiguration cmdlet. It encapsulates virtual machine configuration information such as status, macaddresses, guid, attached file-based disks, and passthrough disks.
-Hypervisor <IHypervisor>
Attributes: Required, Position: named
Specifies the hypervisor host system object. ESI hypervisor object is derived from the host system. You can add a hypervisor to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets just like the host system. A hypervisor object is obtained by using the Get-EmcHostSystem cmdlet.
-ScsiControllerId <String>
Attributes: Optional, Position: named
Specifies the SCSI Controller Id to attach a specified file-based disk. You can obtain the virtual machine’s SCSI controller information from the ESI hypervisor object or by using the Get-EmcVirtualMachineScsiController cmdlet.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
133
-ScsiControllerIndex <UInt32>
Attributes: Optional, Position: named
Specifies the SCSI Controller zero-based index to attach a specified file-based disk. You can obtain the virtual machine’s SCSI controller information from the ESI hypervisor object or by using the Get-EmcVirtualMachineScsiController cmdlet.
-Location <UInt32>
Attributes: Required, Position: named
Specifies the available location (LUN) number of the specified SCSI controller to attach the file-based disk. You can obtain the available SCSI controller location from the virtual machine’s hypervisor object or by using the Get-EmcAvailableScsiControllerLocation cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$hyperv = Get-EmcHostSystem *.133
C:\PS>$hyperv.Model
Hyper-V, PowerEdge R710
C:\PS>$vm = Get-EmcHostSystem *.148
C:\PS>$vm.Model
Virtual Machine
C:\PS>$hyperv | Update-EmcSystem -Silent
C:\PS>$vm | Update-EmcSystem -Silent
C:\PS>$vmconfig = $vm | Get-EmcVirtualMachineConfiguration
C:\PS>$vmconfig.VmId.guid
C4908C4C-6564-4688-B8EC-E47E7758E17E
C:\PS>New-EmcFileBasedDisk -Hypervisor $hyperv -SizeInGB 1 -DiskType fIXeD -Path "E:\ps_test1.vhd"
TaskStatus: Started
10% : Creating file-based disk...
100% : Successfully created FileBasedDisk
TaskStatus: Completed
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
134
C:\PS>$locations =Get-EmcAvailableScsiControllerLocation -Hypervisor $hyperv -VirtualMachineConfiguration $vmconfig -ScsiControllerIndex 0
C:\PS>$locations[0]
0
C:\PS>$diskConfig = Add-EmcFilebasedDiskToVirtualMachine -Hypervisor $hyperv -VirtualMachineConfiguration $vmconfig -Path "E:\ps_test1.vhd" -Location $locations[0]
The examples describe how to attach a file-based disk to a virtual machine. They also show how to get a hypervisor and virtual machine system objects, update them, get the virtual machine configuration, create a file-based disk, get the available SCSI controller locations, and attach the created file-based disk to the virtual machine.
Add-EmcPassthroughDiskToVirtualMachine Adds a passthrough disk to a virtual machine.
Syntax
• Add-EmcPassthroughDiskToVirtualMachine -DiskId <String> -VirtualMachineConfiguration <VirtualMachineConfiguration> -Hypervisor <IHypervisor> [-ScsiControllerId <String>] [-ScsiControllerIndex <UInt32>] -Location <UInt32> [-Silent] [<CommonParameters>]
• Add-EmcPassthroughDiskToVirtualMachine -DiskNumber <UInt32> -VirtualMachineConfiguration <VirtualMachineConfiguration> -Hypervisor <IHypervisor> [-ScsiControllerId <String>] [-ScsiControllerIndex <UInt32>] -Location <UInt32> [-Silent] [<CommonParameters>]
• Add-EmcPassthroughDiskToVirtualMachine -HostDisk <Disk> -VirtualMachineConfiguration <VirtualMachineConfiguration> -Hypervisor <IHypervisor> [-ScsiControllerId <String>] [-ScsiControllerIndex <UInt32>] -Location <UInt32> [-Silent] [<CommonParameters>]
• Add-EmcPassthroughDiskToVirtualMachine -ScsiLun <ScsiLun> [-Persistence <VirtualDevicePersistence>] [-Compatibility <RDMCompatibilityMode>] [-Datastore <Datastore>] -VirtualMachineConfiguration <VirtualMachineConfiguration> [-ScsiControllerId <String>] [-ScsiControllerIndex <UInt32>] -Location <UInt32> [-Silent] [<CommonParameters>]
Parameters
-DiskId <String>
Attributes: Required, Position: named
Specifies the passthrough disk identifier in hypervisor.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
135
-VirtualMachineConfiguration <VirtualMachineConfiguration>
Attributes: Required, Position: named
Specifies the ESI virtual machine configuration object. You can obtain the virtual machine configuration from the ESI hypervisor host system object's VirtualMachinesConfigurations property or by using Get-EmcVirtualMachineConfiguration cmdlet.
-ScsiControllerId <String>
Attributes: Optional, Position: named
Specifies the SCSI controller Id to attach the specified file-based disk. You can obtain the virtual machine’s SCSI controller information from the ESI hypervisor object or by using the Get-EmcVirtualMachineScsiController cmdlet.
-ScsiControllerIndex <UInt32>
Attributes: Optional, Position: named
Specifies the SCSI controller zero based index to attach the specified file-based disk. You can obtain the virtual machine’s SCSI controller information from the ESI hypervisor object or by using the Get-EmcVirtualMachineScsiController cmdlet.
-Location <UInt32>
Attributes: Required, Position: named
Specifies the available location (LUN) number of the specified SCSI controller to add the file-based disk. You can obtain the available SCSI controller location from the virtual machine’s hypervisor object or by using the Get-EmcAvailableScsiControllerLocation cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
-DiskNumber <UInt32>
Attributes: Required, Position: named
Specifies the passthrough disk number in hypervisor.
-HostDisk <Disk>
Attributes: Required, Position: named
Specifies the ESI host disk object. You can obtain it from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.
-ScsiLun <ScsiLun>
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
136
Attributes: Required, Position: named
Specifies the ESI (EMC Storage Integrator) ScsiLun object. A ScsiLun object can be obtained by using ESI Storage System object or by using Get-EmcScsiLun Cmdlet.
-Persistence <VirtualDevicePersistence>
Attributes: Optional, Position: named
Specify VMware virtual disk mode. Valid values are: "Persistent", "IndependentPersistent" and "IndependentNonPersistent".
-Compatibility <RDMCompatibilityMode>
Attributes: Optional, Position: named
Specifies the compatibility modes for raw disk mappings. Valid values are: "Physical" and "Virtual".
-Datastore <Datastore>
Attributes: Optional, Position: named
Specifies the ESI (EMC Storage Integrator) VMware Datastore object. A Datastore object can be obtained by using Get-EmcDataStore Cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$hyperv = Get-EmcHostSystem *.133
C:\PS>$hyperv.Model
Hyper-V, PowerEdge R710
C:\PS>$vm = Get-EmcHostSystem *.148
C:\PS>$vm.Model
Virtual Machine
C:\PS>$h.RefreshVirtualMachinesConfigurations()
C:\PS>$vmconfig = $vm | Get-EmcVirtualMachineConfiguration; $vmconfig
C:\PS>$locations =Get-EmcAvailableScsiControllerLocation -Hypervisor $h -VirtualMachineConfiguration $vmconfig -ScsiControllerIndex 0
C:\PS>$diskConfig = Add-EmcPassthroughDiskToVirtualMachine -Hypervisor $h -VirtualMachineConfiguration $vmconfig -HostDisk $h.AvailablePassthroughDiskCandidates[0] -Location $locations[0]
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
137
C:\PS>$hd = Find-EmcHostDisk -VirtualMachine $vm -VmDiskConfig $diskConfig
C:\PS>Remove-EmcVirtualDiskFromVm -Hypervisor $h -VirtualMachineConfiguration $vmconfig -Location $locations[0] -force
This example adds (attaches) a pass-through disk to a virtual machine (VM) and removes it. The example gets a hypervisor and vm system objects, refreshes VM configurations in hypervisor, gets the VM's configuration, gets the available locations of the SCSI controller, adds (attaches) one of the passthrough-disk candidates to VM, finds the added (attached) pass-through disk in the VM and then removes the disk.
-------------- Example 2 --------------
C:\PS>$h = Get-EmcHostSystem *.133
C:\PS>$h.Model
Hyper-V, PowerEdge R710
C:\PS>$vm = Get-EmcHostSystem *.148
C:\PS>$vm.Model
Virtual Machine
C:\PS>$h | Update-EmcSystem -Silent
C:\PS>$vmconfig = $vm | Get-EmcVirtualMachineConfiguration
C:\PS>$locations =Get-EmcAvailableScsiControllerLocation -Hypervisor $h -VirtualMachineConfiguration $vmconfig -ScsiControllerIndex 0
C:\PS>$passthroughDisks = $h | Get-EmcAvailableEmcPassthroughDiskCandidate
C:\PS>$diskConfig = Add-EmcPassthroughDiskToVirtualMachine -Hypervisor $h -VirtualMachineConfiguration $vmconfig -HostDisk $passthroughDisks[0] -Location $locations[0]
C:\PS>$hd = Find-EmcHostDisk -VirtualMachine $vm -VmDiskConfig $diskConfig
C:\PS>Remove-EmcVirtualDiskFromVm -Hypervisor $h -VirtualMachineConfiguration $vmconfig -Location $locations[0] –force
This example adds or attaches a passthrough disk to a virtual machine, similar to the first example. However, this example uses the Update-EmcSystem cmdlet to refresh virtual machine configurations in the hypervisor and uses the Get-EmcAvailableEmcPassthroughDiskCandidate cmdlet to get the passthrough disk candidates.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
138
Add-EmcXenServerVirtualDisk Adds a virtual disk image (VDI) to a XenServer hosted virtual machine.
Syntax
Add-XenServerVirtualDisk -VirtualDisk <VirtualDiskImage> -VirtualMachineConfiguration <VirtualMachineConfiguration> [-Silent] [<CommonParameters>]
Parameters
-VirtualDisk <VirtualDiskImage>
Attributes: Required, Position: named
The virtual disk image to be attached.
-VirtualMachineConfiguration <VirtualMachineConfiguration>
Attributes: Required, Position: named
The target virtual machine to add the virtual disk image(VDI).
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter that turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>Add-EmcXenServerVirtualDisk -VirtualDisk $vdi -VirtualMachineConfiguration $vm
This example adds the specified virtual disk image(VDI)to the virtual machine.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
139
Get-EmcAvailablePassthroughDiskCandidate Gets the available pass-through disk candidates that can be attached to a virtual machine of a hypervisor.
Syntax
Get-EmcAvailablePassthroughDiskCandidate -Hypervisor <IHypervisor> [-Silent] [<CommonParameters>] Parameters
-Hypervisor <IHypervisor>
Attributes: Required, Position: 1, Accepts pipeline input (by value)
Specifies the ESI hypervisor host system object. The ESI hypervisor object is derived from the host system. You can add a hypervisor just like the host system to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a hypervisor (host system) object by using the Get-EmcHostSystem cmdlet.
-EsxHostSystem <IESXHostSystem>
Attributes: Required, Position: 1, Accepts pipeline input (by value), Accepts pipeline input (by value)
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$h = Get-EmcHostSystem *.133
C:\PS>$h.Model
Hyper-V, PowerEdge R710
C:\PS>$hds = $h | Get-EmcAvailablePassthroughDiskCandidate
C:\PS>$hds[0].hostdiskidentifier
\\?\PhysicalDrive3
C:\PS>$hds[1].hostdiskidentifier
\\?\PhysicalDrive4
C:\PS>$h.AvailablePassthroughDiskCandidates[0].hostdiskidentifier
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
140
\\?\PhysicalDrive3
C:\PS>$h.AvailablePassthroughDiskCandidates[1].hostdiskidentifier
\\?\PhysicalDrive4
This example gets the available pass-through disk candidates of a hypervisor. You can get the same information from the hypervisor object as well.
Get-EmcAvailableScsiControllerLocation Gets the list of available SCSI controllers of a virtual machine to which file-based disks or pass-through disks can be attached.
Syntax
• Get-EmcAvailableScsiControllerLocation -VirtualMachineConfiguration <VirtualMachineConfiguration> -Hypervisor <IHypervisor> -ScsiControllerIndex <UInt32> [-Silent] [<CommonParameters>]
• Get-EmcAvailableScsiControllerLocation -VirtualMachineConfiguration <VirtualMachineConfiguration> -Hypervisor <IHypervisor> -ScsiControllerId <String> [-Silent] [<CommonParameters>]
Parameters
-VirtualMachineConfiguration <VirtualMachineConfiguration>
Attributes: Required, Position: named
Specifies the ESI virtual machine configuration object. You can obtain the virtual machine configuration from the ESI hypervisor host system object's VirtualMachinesConfigurations property or by using the Get-EmcVirtualMachineConfiguration cmdlet. It encapsulates the virtual machine configuration information such as status, macaddresses, guid, attached file- based disks, and pass-through disks.
-ScsiControllerIndex <UInt32>
Attributes: Required, Position: named
Specifies the SCSI controller zero based index to attach a file-based disk. You can obtain the virtual machine’s SCSI controller information from the ESI hypervisor object or by using the Get-EmcVirtualMachineScsiController cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
141
-ScsiControllerId <String>
Attributes: Required, Position: named
Specifies the SCSI controller Id to attach a file-based disk. You can obtain the virtual machine’s SCSI controller information from the ESI hypervisor object or by using the Get-EmcVirtualMachineScsiController cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$hyperv = Get-EmcHostSystem *.133
C:\PS>$hyperv.Model
Hyper-V, PowerEdge R710
C:\PS>Get-EmcHostSystem | Update-EmcSystem -Silent
C:\PS>$vm = Get-EmcHostSystem *.148
C:\PS>$vm.model
Virtual Machine
C:\PS>$vmconfig = $vm | Get-EmcVirtualMachineConfiguration
C:\PS>$vmconfig.status
Running
C:\PS>$locations =Get-EmcAvailableScsiControllerLocation -Hypervisor $hyperv -VirtualMachineConfiguration $vmconfig -S
csiControllerIndex 0
C:\PS>$locations[0]
0
This example gets the available SCSI controllers of a virtual machine.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
142
Get-EmcDataStore Gets a list of VMware datastores.
Syntax
• Get-EmcLUN [-ID <String>] [-Pool <StoragePool>] [-Silent] [<CommonParameters>]
• Get-EmcLUN [-ID <String>] -HostDisk <Disk> [-Silent] [<CommonParameters>]
• Get-EmcLUN [-ID <String>] -Volume <Volume> [-Silent] [<CommonParameters>]
• Get-EmcLUN [-ID <String>] -ClusterDisk <WindowsBasicClusterDisk> [-Silent] [<CommonParameters>]
• Get-EmcLUN [-ID <String>] -BlockStorageSystem <IBlockStorageSystem> [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the VMware Datastore name or Uuid . Wildcards are permitted. It is a positional parameter (position = 0).
-VMwareSystem <IVMwareServer>
Attributes: Optional, Position: named
Specifies the ESI (EMC Storage Integrator) VMware System object. A VMware system object can be added to ESI using the Get-EmcVMwareSystemCredential and Connect-EmcSystem cmdlets. A VMware system object can be obtained by using the Get-EmcVMwareSystem cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
-ESXHostSystem <IESXHostSystem>
Attributes: Optional, Position: named
Specifies the ESI (EMC Storage Integrator) ESX host System object. An ESX host system object can be obtained by using Get-EmcESXHost cmdlet.
-ScsiLun <ScsiLun>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
143
Specifies the ESI (EMC Storage Integrator) ScsiLun object. A ScsiLun object can be obtained by using the ESI Storage System object or by using the Get-EmcScsiLun cmdlet.
-Lun <Lun>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) LUN object. A LUN object can be obtained by using the ESI Storage System object or by using the Get-EmcLun cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$hBlob = Get-EmcVmWareSystemCredential
C:\PS>$h = $hBlob | Connect-EmcSystem
C:\PS>Get-EmcDataStore -VMwareSystem $h
C:\PS>$h | Update-EmcSystem
C:\PS>Get-EmcDataStore -VMwareSystem $h
This example gets all datastores of the given VMware system.
-------------- Example 2 --------------
C:\PS>$h = Get-EmcHostSystem *myVMware*
C:\PS>$h | Update-EmcSystem
C:\PS>$h | Get-EmcDataStore-ID *datastore1
C:\PS>$h | Get-EmcDataStore *datastore1
This example gets the datastores of the given VMware system with the given Name. Wildcards are permitted. Because the ID parameter is positional, you can omit the name.
-------------- Example 3 --------------
C:\PS>$esxhost = Get-EmcESXHost -VMwareSystem $vm
C:\PS>Get-EmcDataStore -ESXHostSystem $esxhost
This example gets all datastores of the given ESX host system.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
144
-------------- Example 4 --------------
C:\PS>$lun = Get-EmcLUN -ID 298
C:\PS> Get-EmcDataStore -Lun $lun
Get the Datastore(s) associated with the given LUN object.
-------------- Example 5 --------------
C:\PS>$sl = Get-ScsiLun -ID *myScsiLun*
C:\PS> Get-EmcDataStore -ScsiLun $sl
This example gets the datastore or datastores associated with the given SCSI LUN object.
Get-EmcESXHost Gets the list of network shares used by a specified host.
Syntax
• Get-EmcESXHost [-ID <String>] [-VMwareSystem <IVMwareServer>] [-Silent] [<CommonParameters>]
• Get-EmcESXHost -ScsiLun <ScsiLun> [-Silent] [<CommonParameters>]
• Get-EmcESXHost -Datastore <Datastore> [-Silent] [<CommonParameters>]
• Get-EmcESXHost -VirtualMachineConfiguration <VirtualMachineConfiguration> [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the VMware ESX host's name or Uuid . Wildcards are permitted. It is a positional parameter (position = 0).
-VMwareSystem <IVMwareServer>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI VMware System object. A VMware system object can be added to ESI using Get-EmcVMwareSystemCredential and Connect-EmcSystem cmdlets. A VMware system object can be obtained by using the Get-EmcVMwareSystem cmdlet.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
145
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
-ScsiLun <ScsiLun>
Attributes: Required, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI SCSI LUN object. A SCSI LUN object can be obtained by using the ESI Storage System object or by using the Get-EmcScsiLun cmdlet.
-Datastore <Datastore>
Attributes: Required, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) VMware Datastore object. A Datastore object can be obtained by using the Get-EmcDataStore cmdlet.
-VirtualMachineConfiguration <VirtualMachineConfiguration>
Attributes: Required, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI Virtual Machine Configuration object. Virtual Machine Configuration can be obtained from the ESI Hypervisor host system object's VirtualMachinesConfigurations property or using the Get-EmcVirtualMachineConfiguration cmdlet. It encapsualtes VM configuration info like status, macaddresses, guid, attached file based disks, and pass-through disks.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$vm = Get-EmcVMwareSystem *myVMware*
C:\PS>Get-EmcESXHost -VMwareSystem $vm
This example gets the ESX host system(s) of a vCenter or a standalone VMware server.
-------------- Example 2 --------------
C:\PS>$sl = Get-EmcScsiLun *myScsiLun*
C:\PS>Get-EmcESXHost -ScsiLun $sl
This example gets the ESX host system of the given SCSI LUN.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
146
-------------- Example 3 --------------
C:\PS>$ds = Get-EmcDataStore *myDatastore*
C:\PS>Get-EmcESXHost -Datastore $ds
This example gets the ESX host system of the given datastore.
GetEmcHyperVSystemCredential Gets the Microsoft Hyper-V system credentials to connect to ESI.
Syntax
Get-EmcHyperVSystemCredential [-Silent] [<CommonParameters>]
Parameters
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$sBlob = Get-EmcHyperVSystemCredential
C:\PS>$s = $sBlob | Connect-EmcSystem
C:\PS>$s = Connect-EmcSystem -CreationBlob $sBlob
The Cmdlet Get-EmcHyperVSystemCredential returns the creation blob, which is used to connect (add) Microsoft Hyper-V system to ESI (EMC Storage Integrator).
Get-EmcVirtualDiskConfiguration Gets the virtual disk (attached file-based disk or pass-through disk) configuration for the specified host disk of a virtual machine.
Syntax
Get-EmcVirtualDiskConfiguration -HostDisk <Disk> [-Silent] [<CommonParameters>]
Parameters
-HostDisk <Disk>
Attributes: Required, Position: named, Accepts pipeline input (by value)
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
147
Specifies the ESI host disk object. You can obtain it from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$vm = Get-EmcHostSystem *.148
C:\PS>$vm | Update-EmcSystem -Silent
C:\PS>$vm.model
Virtual Machine
C:\PS>$hd = $vm.HostDisks[3]
C:\PS>$hd.HostDiskIdentifier
\\?\PhysicalDrive8
C:\PS>$hd.DiskType
FilebasedVmDisk
C:\PS>$diskconfig = $hd | Get-EmcVirtualDiskConfiguration
C:\PS>$diskconfig.Path
E:\ps_test1.vhd
C:\PS>$diskconfig.server
This example gets the virtual disk configuration of a file based disk in a virtual machine.
-------------- Example 2 --------------
C:\PS>$vm = Get-EmcHostSystem *.148 C:\PS>$vm | Update-EmcSystem -Silent C:\PS>$diskconfigs = $vm.HostDisks | Get-EmcVirtualDiskConfiguration WARNING: Unable to get virtual disk configuration for the given disk '[HostDiskIdentifier: \\?\PhysicalDrive4.]'. DiskType: Normal. WARNING: Unable to get virtual disk configuration for the given disk '[HostDiskIdentifier: \\?\PhysicalDrive7.]'. DiskType: Normal.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
148
WARNING: Unable to get virtual disk configuration for the given disk '[HostDiskIdentifier: \\?\PhysicalDrive1.]'. DiskType: Normal. WARNING: Unable to get virtual disk configuration for the given disk '[HostDiskIdentifier: \\?\PhysicalDrive2.]'. DiskType: Normal. WARNING: Unable to get virtual disk configuration for the given disk '[HostDiskIdentifier: \\?\PhysicalDrive3.]'. DiskType: Normal. WARNING: Unable to get virtual disk configuration for the given disk '[HostDiskIdentifier: \\?\PhysicalDrive5.]'. DiskType: Normal. WARNING: Unable to get virtual disk configuration for the given disk '[HostDiskIdentifier: \\?\PhysicalDrive6.]'. DiskType: Normal. C:\PS>$diskconfigs.path E:\ps_test1.vhd C:\PS>$diskconfigs.ScsiControllerIndex 0 C:\PS>$diskconfigs.HostLunIdentifier.ScsiControllerId {9052A0C0-C066-4C6E-95EC-A66CF32336A3} C:\PS>
This example gets the virtual disks configuration of all disks.
Get-EmcVirtualMachineConfiguration Gets the virtual machine configuration.
Syntax Get-EmcVirtualMachineConfiguration -VirtualMachine <IVirtualMachine> [-Silent] [<CommonParameters>]
Parameters
-VirtualMachine <IVirtualMachine>
Attributes: Required, Position: 1, Accepts pipeline input (by value)
Specifies the ESI virtual machine host system object. ESI virtual machine is derived from the host system. You can add a virtual machine to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets just like the host system. A virtual machine (host system) object can be obtained by using the Get-EmcHostSystem cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
149
Example
C:\PS>Get-EmcHostSystem | Update-EmcSystem -Silent
C:\PS>$vm = Get-EmcHostSystem *.148
C:\PS>$vm.model
Virtual Machine
C:\PS>$vmconfig = $vm | Get-EmcVirtualMachineConfiguration
C:\PS>$vmconfig.status
Running
C:\PS>$vmconfig.vmid.guid
C4908C4C-6564-4688-B8EC-E47E7758E17E
C:\PS>$vmconfig.FilebasedVmDisksConfigs[0].path
E:\ps_test1.vhd
C:\PS>
This example gets the virtual machine configuration.
Get-EmcVirtualMachineHypervisor Gets the virtual machine’s hypervisor.
Syntax
• Get-EmcVirtualMachineHypervisor -VirtualMachineConfiguration <VirtualMachineConfiguration> [-Silent] [<CommonParameters>]
• Get-EmcVirtualMachineHypervisor -VirtualMachine <IVirtualMachine> [-Silent] [<CommonParameters>]
Parameters
-VirtualMachineConfiguration <VirtualMachineConfiguration>
Attributes: Required, Position: 1, Accepts pipeline input (by value)
Specifies the ESI virtual machine configuration object. You can obtain the virtual machine configuration from the ESI hypervisor host system object's VirtualMachinesConfigurations property or by using the Get-EmcVirtualMachineConfiguration cmdlet. It encapsulates the virtual machine configuration information such as status, macaddresses, guid, attached file based disks, and pass-through disks.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
150
-VirtualMachine <IVirtualMachine>
Attributes: Required, Position: 1, Accepts pipeline input (by value)
Specifies the ESI virtual machine configuration object. You can obtain the virtual machine configuration from the ESI hypervisor host system object's VirtualMachinesConfigurations property or by using the Get-EmcVirtualMachineConfiguration cmdlet. It encapsulates virtual machine configuration information such as status, macaddresses, guid, attached file based disks, and pass-through disks.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcVirtualMachineConfiguration
C:\PS>Get-EmcHostSystem | Update-EmcSystem -Silent
C:\PS>$vm = Get-EmcHostSystem *.148
C:\PS>$vm.model
Virtual Machine
C:\PS>$h = $vm | Get-EmcVirtualMachineHypervisor
C:\PS>$h.Model
Hyper-V, PowerEdge R710
C:\PS>
This example gets the hypervisor from the virtual machine.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
151
------------- Example 2 --------------
C:\PS>Get-EmcVirtualMachineConfiguration
C:\PS>Get-EmcHostSystem | Update-EmcSystem -Silent
C:\PS>$vm = Get-EmcHostSystem *.148
C:\PS>$vm.model
Virtual Machine
C:\PS>$vmconfig = $vm | Get-EmcVirtualMachineConfiguration
C:\PS>$vmconfig.status
Running
C:\PS>$h = $vmconfig | Get-EmcVirtualMachineHypervisor
C:\PS>$h.Model
Hyper-V, PowerEdge R710
C:\PS>
This example gets the hypervisor from the virtual machine configuration.
Get-EmcVirtualMachineScsiController Gets the virtual machine’s SCSI controllers
Syntax
• Get-EmcVirtualMachineScsiController -VirtualMachineConfiguration <VirtualMachineConfiguration> [-Silent] [<CommonParameters>]
• Get-EmcVirtualMachineScsiController -VirtualMachine <IVirtualMachine> [-Silent] [<CommonParameters>]
Parameters
-VirtualMachineConfiguration <VirtualMachineConfiguration>
Attributes: Required, Position: 1, Accepts pipeline input (by value)
Specifies the ESI virtual machine configuration object. You can obtain the virtual machine configuration from the ESI hypervisor host system object's VirtualMachinesConfigurations property or by using the Get-EmcVirtualMachineConfiguration cmdlet. It encapsulates the virtual machine configuration information such as status, macaddresses, guid, attached file-based disks, and pass-through disks.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
152
-VirtualMachine <IVirtualMachine>
Attributes: Required, Position: 1, Accepts pipeline input (by value)
Specifies the ESI virtual machine configuration object. You can obtain the virtual machine configuration from the ESI hypervisor host system object's VirtualMachinesConfigurations property or by using the Get-EmcVirtualMachineConfiguration cmdlet. It encapsulates virtual machine configuration information such as status, macaddresses, guid, attached file-based disks, and pass-through disks.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcVirtualMachineConfiguration C:\PS>Get-EmcHostSystem | Update-EmcSystem -Silent C:\PS>$vm = Get-EmcHostSystem *.148 C:\PS>$vm.model Virtual Machine C:\PS>$scsi = $vm | Get-EmcVirtualMachineScsiController C:\PS>$scsi.ScsiControllerIndex 0 C:\PS>$scsi.ScsiControllerId {9052A0C0-C066-4C6E-95EC-A66CF32336A3} C:\PS>
This example gets the SCSI controllers from the virtual machine.
-------------- Example 2 --------------
C:\PS>Get-EmcVirtualMachineConfiguration C:\PS>Get-EmcHostSystem | Update-EmcSystem -Silent C:\PS>$vm = Get-EmcHostSystem *.148 C:\PS>$vm.model Virtual Machine C:\PS>$vmconfig = $vm | Get-EmcVirtualMachineConfiguration C:\PS>$vmconfig.status Running C:\PS>$scsi = $vmconfig | Get-EmcVirtualMachineScsiController C:\PS>$scsi.ScsiControllerIndex 0 C:\PS>$scsi.ScsiControllerId {9052A0C0-C066-4C6E-95EC-A66CF32336A3}
This example gets the SCSI controllers from the virtual machine configuration.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
153
-------------- Example 3 --------------
C:\PS>$h = Get-EmcHostSystem *.133 C:\PS>$h.model Hyper-V, PowerEdge R710 C:\PS>$scsi = $h.VirtualMachinesConfigurations | Get-EmcVirtualMachineScsiController C:\PS>$scsi.count 12 C:\PS>$scsi[10].ScsiControllerIndex 2 C:\PS>$scsi[10].ScsiControllerId {4DCFAEF8-A85A-4641-9322-BB9A5A1CE923} C:\PS>$scsi[11].ScsiControllerId {CF06199A-D7C0-4CEE-A87D-FC81A5D96078} C:\PS>$scsi[11].ScsiControllerIndex 3 C:\PS>
This example gets the SCSI controllers from the virtual machine configuration.
Get-EmcVMwareSystem Gets connected VMware systems.
Syntax
• Get-EmcVMwareSystem [-ID <String>] [-Silent] [<CommonParameters>]
• Get-EmcVMwareSystem [-ESXHostSystem <IESXHostSystem>] [-Silent] [<CommonParameters>]
• Get-EmcVMwareSystem -ScsiLun <ScsiLun> [-Silent] [<CommonParameters>]
• Get-EmcVMwareSystem -Datastore <Datastore> [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the VMware System name or IP address or global ID. Wildcards are permitted. It is a positional parameter (position = 0).
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
154
-ESXHostSystem <IESXHostSystem>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) ESX host System object. An ESX host system object can be obtained by using Get-EmcESXHost cmdlet.
-ScsiLun <ScsiLun>
Attributes: Required, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) ScsiLun object. A ScsiLun object can be obtained by using the ESI Storage System object or by using the Get-EmcScsiLun cmdlet.
-Datastore <Datastore>
Attributes: Required, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the ESI (EMC Storage Integrator) VMware Datastore object. A Datastore object can be obtained by using Get-EmcDataStore cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters.
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcVMwareSystem
Get all connected VMware system(s).
-------------- Example 2 --------------
C:\PS>Get-EmcVMwareSystem -ESXHostSystem $esxhost
Get the VMware system of the given ESX Host system.
-------------- Example 3 --------------
C:\PS>$ds = Get-EmcDataStore *myDatastore*
C:\PS>Get-EmcVMwareSystem -Datastore $ds
This example gets the VMware system of the given Datastore.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
155
-------------- Example 4 --------------
C:\PS>$sl = Get-EmcScsiLun *myScsiLun*
C:\PS>Get-EmcVMwareSystem -ScsiLun $sl
This example gets the VMware system of the given SCSI LUN.
Get-EmcVMwareSystemCredential Gets the encrypted connection (system object creation) parameters blob for VMware systems. Generally used along with Connect-EmcSystem cmdlet to add storage systems to ESI.
Syntax
Get-EmcVMwareSystemCredential [-Silent] [<CommonParameters>]
Description
The Get-EmcVMwareSystemCredential cmdlet creates a blob or encrypted string from the given connection or system object creation parameters. It prompts the user for server IP address and credentials. From the given parameters, the cmdlet creates a blob. The blob can be used to connect or add VMware systems to ESI using Connect-EmcSystem cmdlet. You can use test Connection in the dialog to test the connection with the given parameters.
Parameters
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$hBlob = Get-EmcVMwareSystemCredential
C:\PS>$h = $hBlob | Connect-EmcSystem
C:\PS>$h = Connect-EmcSystem -CreationBlob $hBlob
In this example, the Get-EmcVMwareSystemCredential cmdlet returns the creation blob. The blob is used to connect or add a VMware system to ESI.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
156
Get-EmcXenServerHost Gets a XenServer host.
Syntax
Get-XenServerHost [-ID <String>] [-XenServer <IXenServer>] [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the XenServer host name or UUID. Wildcards are permitted. It is a positional parameter (position = 1).
-XenServer <IXenServer>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the owner XenServer.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>Get-EmcXenServerHost -XenServer $xen
This example lists the XenServer hosts of the specified XenServer system.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
157
Get-EmcXenServerStorageRepository Gets a list of XenServer storage repositories.
Syntax
Get-XenServerStorageRepository [-ID <String>] [-XenServer <IXenServer>] [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the storage repository name or UUID. Wildcards are permitted. It is a positional parameter (position = 0).
-XenServer <IXenServer>
Attributes: Optional, Position: named
Specifies the owner XenServer.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcXenServerStorageRepository
Get all storage repositories of all the connected XenServer system(s).
-------------- Example 2 --------------
C:\PS>Get-EmcXenServerStorageRepository -XenServer $xen
Get the storage repositories of the give XenServer system.
-------------- Example 3 --------------
C:\PS>Get-EmcXenServerStorageRepository -XenServer $xen -Id *test*
Get storage repositories with the given ID wild char within the specified XenServer.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
158
Get-EmcXenServerSystem Gets connected XenServer systems.
Syntax
• Get-XenServerSystem [-ID <String>] [-Silent] [<CommonParameters>]
• Get-XenServerSystem [-XenServerHostSystem <IXenServerHostSystem>] [-Silent] [<CommonParameters>]
• Get-XenServerSystem -StorageRepository <StorageRepository> [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the XenServer server name or globalId. Wildcards are permitted. It is a positional parameter (position = 0).
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
-XenServerHostSystem <IXenServerHostSystem>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Get the XenServer system that owns the XenServer host.
-StorageRepository <StorageRepository>
Attributes: Required, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the owner of the XenServer.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
159
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcXenServerSystem
This example gets all of the connected Citrix XenServer systems.
-------------- Example 2 --------------
C:\PS>Get-EmcXenServerSystem -XenServerHostSystem $xenHost
This example gets the XenServer system of the given XenServer Host system.
-------------- Example 3 --------------
C:\PS>Get-EmcXenServerSystem -StorageRepository $sr
This example gets the XenServer system for the given storage repository.
Get-EmcXenServerSystemCredential Gets the encrypted connection (system object creation) parameters blob for XenServer systems. Generally used along with Connect-EmcSystem cmdlet to add storage systems to ESI.
Syntax
Get-XenServerSystemCredential [-Silent] [<CommonParameters>]
Parameters
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$sBlob = Get-EmcXenServerSystemCredential
C:\PS>$s = $sBlob | Connect-EmcSystem
C:\PS>$s = Connect-EmcSystem -CreationBlob $sBlob
This example uses Cmdlet Get-EmcXenServerSystemCredential cmdlet to return the creation blob, which is used to connect or add a XenServer system to ESI.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
160
Get-EmcXenServerVirtualDiskImage Gets a XenServer virtual disk image.
Syntax
• Get-XenServerVirtualDiskImage [-ID <String>] [-XenServer <IXenServer>] [-Silent] [<CommonParameters>]
• Get-XenServerVirtualDiskImage [-StorageRepository <StorageRepository>] [-Silent] [<CommonParameters>]
Parameters
-ID <String>
Attributes: Optional, Position: 1
Specifies the virtual disk image(VDI) name or UUID. Wildcards are permitted. It is a positional parameter (position = 0).
-XenServer <IXenServer>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the owner XenServer.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
-StorageRepository <StorageRepository>
Attributes: Optional, Position: named, Accepts pipeline input (by value), Accepts pipeline input (by value)
Specifies the owner storage repository
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcXenServerVirtualDiskImage
Get all the virtual disk images (VDI) of all the connected XenServer systems.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
161
-------------- Example 2 --------------
C:\PS>Get-EmcXenServerVirtualDiskImage -XenServer $xen
Get all the virtual disk images(VDI) of the specified XenServer system.
-------------- Example 3 --------------
C:\PS>Get-EmcXenServerVirtualDiskImage -StorageRepository $sr
Get the virtual disk image(s) (VDI) of the given storage repository.
New-EmcFileBasedDisk Creates a FilebasedDisk for the specified hypervisor.
Syntax New-EmcFileBasedDisk -Hypervisor <IHypervisor> -Path <String> -SizeInGB <UInt32> -DiskType <FileBasedDiskType> [-Silent] [<CommonParameters>]
Parameters
-Hypervisor <IHypervisor>
Attributes: Required, Position: named
Specifies the ESI hypervisor host system object. ESI hypervisor object is derived from the host system. You can add a hypervisor to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets just like the host system. You can obtain a hypervisor (host system) object by using the Get-EmcHostSystem cmdlet.
-Path <String>
Attributes: Required, Position: named
Specifies the path of the file-based disk.
-SizeInGB <UInt32>
Attributes: Required, Position: named
Specifies the size in GB.
-DiskType <FileBasedDiskType>
Attributes: Required, Position: named
Specifies the type of the file-based disk. Valid values are Fixed and Dynamic.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
162
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$hyperv = Get-EmcHostSystem *.133
C:\PS>$hyperv.Model
Hyper-V, PowerEdge R710
C:\PS>New-EmcFileBasedDisk -Hypervisor $hyperv -SizeInGB 1 -DiskType fIXeD -Path "E:\ps_test1.vhd"
TaskStatus: Started
10% : Creating file-based disk...
100% : Successfully created FileBasedDisk
TaskStatus: Completed
This example creates a file-based disk in a hypervisor.
New-EmcXenServerStorageRepository Creates new XenServer storage repositories.
Syntax
New-XenServerStorageRepository -Lun <Lun> -XenServer <IXenServer> [-Name <String>] [-TargetPort <TargetPort>] [-Description <String>] [-Silent] [<CommonParameters>]
Parameters
-Lun <Lun>
Attributes: Required, Position: named
The LUN that the hosts the storage repository.
-XenServer <IXenServer>
Attributes: Required, Position: named
The XenServer that the storage repository creates on.
-Name <String>
Attributes: Required, Position: named
Name of the created storage repository.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
163
-TargetPort <TargetPort>
Attributes: Required, Position: named
The target port that the created storage repository connects.
-Description <String>
Attributes: Optional, Position: named
Description of the created storage repository.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>$lun = New-EmcLun -Pool $p -Name testlun -Capacity 10gb
Set-EmcLunAccess -Lun $lun -HostSystem $xen -Available
New-EmcXenServerStorageRepository -Lun $lun -XenServer $xen -Name "Test SR" -TargetPort $tp
This example creates a storage repository on a XenServer system with a specified LUN. Then the LUN is unmasked to the XenServer. If the targetport is Fibre Channel port, it creates a hardware HB A storage repository. If the target port is iSCSI, it creates a software iSCSI storage repository.
New-EmcXenServerVirtualDiskImage New virtual disk image(VDI) for storage repository from XenServer
Syntax
New-EmcXenServerVirtualDiskImage -StorageRepository <StorageRepository> -XenServer <IXenServer> -Size <UInt64> -Name <String> [-Silent] [<CommonParameters>]
Parameters
-StorageRepository <StorageRepository>
Attributes: Required, Position: named
The virtual disk image(VDI) will host on.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
164
-XenServer <IXenServer>
Attributes: Required, Position: named
The owner XenServer of storage repository.
-Size <UInt64>
Attributes: Required, Position: named
The size of created virtual disk image(VDI).
-Name <String>
Attributes: Required, Position: named
The name of created virtual disk image(VDI).
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>New-EmcXenServerVirtualDiskImage -XenServer $xen -StorageRepository $sr -Name "Test VDI" -Size 10GB
This example creates a virtual disk image on a storage repository with 10 GB of capacity.
Remove-EmcVirtualDiskFromVm Removes a file-based disk or a pass-through disk from the virtual machine.
Syntax
Remove-EmcVirtualDiskFromVm [-Force] -VirtualMachineConfiguration <VirtualMachineConfiguration> -Hypervisor <IHypervisor> [-ScsiControllerId <String>] [-ScsiControllerIndex <UInt32>] -Location <UInt32> [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
-Force <SwitchParameter>
Attributes: Optional, Position: named
Allows the cmdlet to continue without asking for the user's confirmation.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
165
-VirtualMachineConfiguration <VirtualMachineConfiguration>
Attributes: Required, Position: named
Specifies the ESI virtual machine configuration object. You can obtain the virtual machine configuration from the ESI hypervisor host system object's VirtualMachinesConfigurations property or by using the Get-EmcVirtualMachineConfiguration cmdlet. It encapsulates virtual machine configuration information such as status, macaddresses, guid, attached file based disks, and pass-through disks.
-Hypervisor <IHypervisor>
Attributes: Required, Position: named
Specifies the ESI hypervisor host system object. The ESI hypervisor object is derived from the host system. You can add a hypervisor to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets just like the host system. You can obtain a hypervisor object can by using the Get-EmcHostSystem cmdlet.
-ScsiControllerId <String>
Attributes: Optional, Position: named
Specifies the SCSI controller Id to add the specified file-based disk. You can obtain the virtual machine’s SCSI controller information from the ESI hypervisor object or by using the Get-EmcVirtualMachineScsiController cmdlet.
-ScsiControllerIndex <UInt32>
Attributes: Optional, Position: named
Specifies the SCSI controller zero-based index to add the specified file-based disk. You can obtain the virtual machine’s SCSI controller information from the ESI hypervisor object or by using the Get-EmcVirtualMachineScsiController cmdlet.
-Location <UInt32>
Attributes: Required, Position: named
Specifies the available location (LUN) number of the specified SCSI controller to add the file-based disk. You can obtain an available SCSI controller location from the virtual machine’s hypervisor object or by using the Get-EmcAvailableScsiControllerLocation cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter that turns off all the informational and verbose messages. However, it still displays warnings and errors.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
166
-WhatIf <SwitchParameter>
Attributes: Optional, Position: named
Describes what would happen if the command were executed.
-Confirm <SwitchParameter>
Attributes: Optional, Position: named
Prompts the user for confirmation before executing the command.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Examples
-------------- Example 1 --------------
C:\PS>$hyperv = Get-EmcHostSystem *.133 C:\PS>$hyperv.Model Hyper-V, PowerEdge R710 C:\PS>$vm = Get-EmcHostSystem *.148 C:\PS>$vm.Model Virtual Machine C:\PS>$hyperv | Update-EmcSystem -Silent C:\PS>$vm | Update-EmcSystem -Silent C:\PS>$vmconfig = $vm | Get-EmcVirtualMachineConfiguration C:\PS>$locations =Get-EmcAvailableScsiControllerLocation -Hypervisor $hyperv -VirtualMachineConfiguration $vmconfig -S csiControllerIndex 0 C:\PS>$locations[0] 0 C:\PS>$diskConfig = Add-EmcFilebasedDiskToVirtualMachine -Hypervisor $hyperv -VirtualMachineConfiguration $vmconfig -Path "E:\ps_test1.vhd" -Location $locations[0] C:\PS>Remove-EmcVirtualDiskFromVm -Hypervisor $h -VirtualMachineConfiguration $vmconfig -Location $locations[0] –force
Adds a file-based disk to a virtual machine and removes it.
-------------- Example 2 --------------
C:\PS>$h = Get-EmcHostSystem *.133 C:\PS>$h.Model Hyper-V, PowerEdge R710 C:\PS>$vm = Get-EmcHostSystem *.148 C:\PS>$vm.Model Virtual Machine C:\PS>$h | Update-EmcSystem -Silent C:\PS>$vmconfig = $vm | Get-EmcVirtualMachineConfiguration C:\PS>$locations =Get-EmcAvailableScsiControllerLocation -Hypervisor $h -VirtualMachineConfiguration $vmconfig -ScsiControllerIndex 0 C:\PS>$passthroughDisks = $h | Get-EmcAvailableEmcPassthroughDiskCandidate C:\PS>$diskConfig = Add-EmcPassthroughDiskToVirtualMachine -
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
167
Hypervisor $h -VirtualMachineConfiguration $vmconfig -HostDisk $passthroughDisks[0] -Location $locations[0] C:\PS>$hd = Find-EmcHostDisk -VirtualMachine $vm -VmDiskConfig $diskConfig C:\PS>Remove-EmcVirtualDiskFromVm -Hypervisor $h -VirtualMachineConfiguration $vmconfig -Location $locations[0] –force
Adds a pass-through disk to a virtual machine and removes it.
Remove-EmcXenServerStorageRepository Removes the XenServer storage system.
Syntax
Remove-XenServerStorageRepository -StorageRepository <StorageRepository> [-Silent] [<CommonParameters>]
Parameters
-StorageRepository <StorageRepository>
Attributes: Required, Position: named
Specifies the storage repository to remove
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>Remove-EmcXenServerStorageRepository -StorageRepository $sr
This example removes a storage repository from the XenServer system. Then it confirms there are no virtual disk images remaining on the storage repository.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
168
Remove-EmcXenServerVirtualDisk Removes a XenServer virtual disk.
Syntax
Remove-XenServerVirtualDisk -VirtualMachineConfiguration <VirtualMachineConfiguration> -Location <UInt32> [-Silent] [<CommonParameters>]
Parameters
-VirtualMachineConfiguration <VirtualMachineConfiguration>
Attributes: Required, Position: named
Specifies the virtual machine that the virtual disk attached.
-Location <UInt32>
Attributes: Required, Position: named
The location of virtual disk.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>Remove-EmcXenServerVirtualDisk -VirtualMachineConfiguration $vm -Location 5
This example removes a virtual disk from the virtual machine in the specified location of five.
Cmdlet Reference
EMC Storage Integrator PowerShell Toolkit User Guide
169
Remove-EmcXenServerVirtualDiskImage Removes a virtual disk image(VDI) from a XenServer storage repository.
Syntax
Remove-XenServerVirtualDiskImage -VirtualDiskImage <VirtualDiskImage> [-Silent] [<CommonParameters>]
Parameters
-VirtualDiskImage <VirtualDiskImage>
Attributes: Required, Position: named
Specifies the virtual disk image(VDI) to remove.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
An optional parameter to turn off all the informational and verbose messages. It still displays warnings and errors.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters
Example
C:\PS>Remove-EmcXenServerVirtualDiskImage -VirtualDiskImage $vdi
This example removes the virtual disk image from the storage repository and deletes it.