user guide: emc storage integrator powershell cmdlet · 2020-06-14 · cmdlets, windows powershell...

110
EMC ® Storage Integrator PowerShell Cmdlet User Guide 300-013-775 A01

Upload: others

Post on 11-Jul-2020

25 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

EMC® Storage Integrator PowerShell Cmdlet

User Guide 300-013-775 A01

Page 2: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

EMC Storage Integrator PowerShell Cmdlet User Guide

2

Copyright © 2012 EMC Corporation. All rights reserved.

Published March, 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, Data Domain, RSA, EMC Centera, EMC ControlCenter, EMC LifeLine, EMC OnCourse, EMC Proven, EMC Snap, EMC Source-One, EMC Storage Administrator, Acartus, Access Logix, AdvantEdge, AlphaStor, ApplicationXtender, ArchiveXtender, Atmos, Authentica, Authentic Problems, Automated Resource Manager, AutoStart, AutoSwap, AVALONidm, Avamar, Captiva, C-Clip, Celerra, Celerra Replicator, Centera, CenterStage, CentraStar, ClaimPack, CLARiiON, ClientPak, Codebook Correlation Technology, Common Information Model, Configuration Intelligence, Configuresoft, Connectrix, CopyCross, CopyPoint, CX, Dantz, DatabaseXtender, Data Domain, Direct Matrix Architecture, DiskXtender, DiskXtender 2000, Document Sciences, Documentum, elnput, E-Lab, EmailXaminer, EmailXtender, Enginuity, eRoom, Event Explorer, FarPoint, FirstPass, FLARE, FormWare, Geosynchrony, Global File Virtualization, Graphic Visualization, Greenplum, HighRoad, HomeBase, InfoMover, Infoscape, Infra, InputAccel, InputAccel Express, Invista, Ionix, ISIS, Max Retriever, MediaStor, MirrorView, Navisphere, NetWorker, nLayers, OnAlert, OpenScale, PixTools, PowerPath, PowerSnap, QuickScan, Rainfinity, RepliCare, RepliStor, ResourcePak, Retrospect, RSA, SafeLine, SAN Advisor, SAN Copy, SAN Manager, Smarts, SnapImage, SnapSure, SnapView, SRDF, StorageScope, SupportMate, SymmAPI, SymmEnabler, Symmetrix, Symmetrix DMX, Symmetrix VMAX, TimeFinder, UltraFlex, UltraPoint, UltraScale, Unisphere, Vblock, VMAX, VPLEX, Viewlets, Virtual Matrix, Virtual Matrix Architecture, Virtual Provisioning, VisualSAN, VisualSRM, Voyence, WebXtender, xPression, xPresso, YottaYotta, the EMC logo, the RSA logo, and where information lives 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 EMC Online Support.

EMC Storage Integrator PowerShell Cmdlet

User Guide

Part Number 300-013-775 A01

Page 3: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

EMC Storage Integrator PowerShell Cmdlet 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 .................................................................... 12

Chapter 3 Example Scripts .............................................................. 15

Introduction .............................................................................................. 16

Provisioning a new storage volume ........................................................... 16

Removing a storage volume ...................................................................... 17

Chapter 4 Cmdlet Reference ............................................................ 19

Introduction .............................................................................................. 20

Connection-related operations.................................................................. 22

Connect-EmcSystem ........................................................................................ 22

Disconnect-EmcClusterSystem ......................................................................... 23

Disconnect-EmcStorageSystem ........................................................................ 26

Disconnect-EmcSystem .................................................................................... 28

Get-EmcClusterSystemCredential ..................................................................... 31

Get-EmcHostSystemCredential ......................................................................... 32

Get-EmcStorageSystemCredential .................................................................... 33

Update-EmcSystem .......................................................................................... 34

Storage system operations ....................................................................... 36

Get-EmcLUN ..................................................................................................... 36

Get-EmcSnapshotLUN ...................................................................................... 38

Get-EmcSnapshotPool ..................................................................................... 39

Page 4: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Contents

EMC Storage Integrator PowerShell Cmdlet User Guide

4

Get-EmcSnapshotSession ................................................................................ 39

Get-EmcStoragePool ........................................................................................ 40

Get-EmcStorageSystem .................................................................................... 42

New-EmcLun .................................................................................................... 44

New-EmcSnapshotLun ..................................................................................... 45

New-EmcSnapshotSession .............................................................................. 47

Remove-EmcLun .............................................................................................. 48

Remove-EmcSnapshotLUN ............................................................................... 49

Remove-EmcSnapshotSession ......................................................................... 51

Set-EmcLunAccess ........................................................................................... 52

Host operations ........................................................................................ 55

Add-EmcHostDiskToCluster .............................................................................. 55

Clear-EmcHostDiskSignature ............................................................................ 57

Find-EmcHostDisk ............................................................................................ 58

Get-EmcAvailableDriveLetter ............................................................................ 61

Get-EmcClusterDisk ......................................................................................... 63 Get-EmcClusterGroup ....................................................................................... 64

Get-EmcClusterSystem ..................................................................................... 65

Get-EmcHostDisk ............................................................................................. 67

Get-EmcHostLunIdentifier ................................................................................ 69

Get-EmcHostSystem ......................................................................................... 71

Get-EmcHostVolume ........................................................................................ 73

Initialize-EmcHostDisk ..................................................................................... 75

New-EmcVolume .............................................................................................. 77

Remove-EmcHostDiskFromCluster .................................................................... 79

Remove-EmcVolumeMountPoint ...................................................................... 81

Set-EmcHostDiskOnlineState ........................................................................... 83

Set-EmcHostDiskReadonlyState ....................................................................... 85

Set-EmcVolumeMountPoint ............................................................................. 86

Hyper-V virtualization operations .............................................................. 89

Add-EmcFilebasedDiskToVirtualMachine ......................................................... 89

Add-EmcPassthroughDiskToVirtualMachine ..................................................... 91

Get-EmcAvailablePassthroughDiskCandidate .................................................. 94

Get-EmcAvailableScsiControllerLocation .......................................................... 95

Get-EmcVirtualDiskConfiguration ..................................................................... 97

Get-EmcVirtualMachineConfiguration ............................................................... 99

Get-EmcVirtualMachineHypervisor ................................................................. 100

Get-EmcVirtualMachineScsiController ............................................................ 102

New-EmcFileBasedDisk .................................................................................. 104

Remove-EmcVirtualDiskFromVm .................................................................... 106

Page 5: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Contents

EMC Storage Integrator PowerShell Cmdlet User Guide

5

Chapter 5 Current Limitations and Future Enhancements ................. 109

Current limitations and future enhancements ......................................... 110

Page 6: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Contents

EMC Storage Integrator PowerShell Cmdlet User Guide

6

Page 7: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

EMC Storage Integrator PowerShell Cmdlet User Guide

7

Preface

As part of an effort to improve and enhance the performance and capabilities of its product line, EMC® from time to time releases revisions of its hardware and software. Therefore, some functions described in this guide may not be supported by all revisions of the software or hardware currently in use. For the most up-to-date information on product features, refer to your 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 PowerShell 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 wish 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—Product Guide

• EMC Storage Integrator for Windows—Release Notes

• EMC Storage Integrator for Windows—Technical Notes

Page 8: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Preface

EMC Storage Integrator PowerShell Cmdlet User Guide

8

Page 9: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

EMC Storage Integrator PowerShell Cmdlet User Guide

9

Chapter 1 Getting Started

This chapter presents the following topics:

Introduction ................................................................................. 10

System requirements ............................................................................. 10

Page 10: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Getting Started

EMC Storage Integrator PowerShell Cmdlet User Guide

10

Introduction EMC Storage Integrator (ESI) for Microsoft introduces a lightweight tool to provision storage to Microsoft Windows hosts that use EMC storage. It includes a set of PowerShell cmdlets to provision storage from the command line or from scripting environments.

The ESI PowerShell cmdlet set provides access to all 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 was developed by Microsoft specifically to address Windows System Management automation.

PowerShell cmdlets are provided for managing connections to host and storage systems, provisioning block storage, and managing disk devices in a Hyper-V virtualized environment. Additionally, cmdlets are available to manage block device snapshots (currently supported on EMC VNX™/EMC CLARiiON® storage systems only).

System requirements The ESI PowerShell cmdlet set is installed as part of the ESI product. The requirements are the same as for ESI. However, in order to use the PowerShell cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet set can be installed only on x64 variants of Windows systems.

Page 11: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

EMC Storage Integrator PowerShell Cmdlet 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 ................................................................. 12

Page 12: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

PowerShell Usage

EMC Storage Integrator PowerShell Cmdlet User Guide

12

Introduction To use the ESI PowerShell commands, import the cmdlet module in either the interactive or scripting environment by using the following PowerShell command:

import-module ESIPSToolkit

PowerShell objects The cmdlets in the PowerShell cmdlet set, like all other Windows PowerShell cmdlets, accept objects as inputs. The inputs can be standard objects such as strings and integers are used in this way as well as objects returned by the ESI PowerShell cmdlets. In many instances, these objects 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 allows the user 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.

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.

Page 13: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

PowerShell Usage

EMC Storage Integrator PowerShell Cmdlet User Guide

13

Object Description

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.

Page 14: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

PowerShell Usage

EMC Storage Integrator PowerShell Cmdlet User Guide

14

Page 15: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

EMC Storage Integrator PowerShell Cmdlet 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 ................................................................... 17

Page 16: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Example Scripts

EMC Storage Integrator PowerShell Cmdlet 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 This example script demonstrates 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.

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

Page 17: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Example Scripts

EMC Storage Integrator PowerShell Cmdlet User Guide

17

TaskStatus: Completed PS C:\Users\administrator.BROOKSDOM> Get-EmcAvailableDriveLetter -HostSystem $system A B D E F G H I J K L M N O P Q R S T U V W X Y Z 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>

Removing a storage volume This example script demonstrates how to remove a volume from a host and destroy the LUN that it resides on. The script includes commands to map the Windows volume to the storage LUN, so knowledge of the LUN identity is not assumed.

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

Page 18: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Example Scripts

EMC Storage Integrator PowerShell Cmdlet User Guide

18

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... 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, IpAddress: 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

Page 19: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

EMC Storage Integrator PowerShell Cmdlet User Guide

19

Chapter 4 Cmdlet Reference

This chapter presents the following topics:

Introduction ................................................................................. 20

Connection-related operations ............................................................... 22

Storage system operations ..................................................................... 36

Host operations ................................................................................. 55

Hyper-V virtualization operations ........................................................... 89

Page 20: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

20

Introduction This chapter provides an alphabetical listing of the following PowerShell cmdlets and their syntax, descriptions, and parameter information. The same information is available within PowerShell by using the Get-Help cmdlet. The following is a list of cmdlets grouped by operation type.

• 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 Get-EmcLUN

o Get-EmcSnapshotLUN

o Get-EmcSnapshotPool

o Get-EmcSnapshotSession

o Get-EmcStoragePool

o Get-EmcStorageSystem

o New-EmcLun

o New-EmcSnapshotLun

o New-EmcSnapshotSession

o Remove-EmcLun

o Remove-EmcSnapshotLUN

o Remove-EmcSnapshotSession

o Set-EmcLunAccess

• Host operations

o Add-EmcHostDiskToCluster

o Clear-EmcHostDiskSignature

Page 21: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

21

o Find-EmcHostDisk

o Get-EmcAvailableDriveLetter

o Get-EmcClusterDisk

o Get-EmcClusterGroup

o Get-EmcClusterSystem

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

• Hyper-V virtualization operations

o Add-EmcFilebasedDiskToVirtualMachine

o Add-EmcPassthroughDiskToVirtualMachine

o Get-EmcAvailablePassthroughDiskCandidate

o Get-EmcAvailableScsiControllerLocation

o Get-EmcVirtualDiskConfiguration

o Get-EmcVirtualMachineConfiguration

o Get-EmcVirtualMachineHypervisor

o Get-EmcVirtualMachineScsiController

o New-EmcFileBasedDisk

o Remove-EmcVirtualDiskFromVm

Page 22: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

22

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.

Page 23: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

23

-------------- 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, ipaddress, or globalid. 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.

Page 24: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

24

-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

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

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*

Disconnects the cluster system based on the specified cluster name, ipaddress, or globalid. Wild cards are permitted. Because the id parameter is positional, you can omit the name.

-------------- Example 4 --------------

C:\PS>$cBlob = Get-EmcClusterSystemCredential C:\PS>$c = $cBlob | Connect-EmcSystem C:\PS>Disconnect-EmcClusterSystem -System $c -Force

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

Disconnects the specified cluster system.

Page 25: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

25

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, ipaddress, or globalid. 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>s

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.

-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

Page 26: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

26

Examples

-------------- Example 1 --------------

C:\PS>$hBlob = Get-EmcHostSystemCredential

C:\PS>$h = $hBlob | Connect-EmcSystem

C:\PS>Disconnect-EmcHostSystem

C:\PS>Get-EmcHostSystem | Disconnect-EmcHostSystem

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

Disconnects the host system.

-------------- Example 3 --------------

C:\PS>Disconnect-EmcHostSystem -Id myhost*

C:\PS>Disconnect-EmcHostSystem -Id 10.x.y.*

C:\PS>Disconnect-EmcHostSystem 2cc75087-8ddf*

Disconnects the host system based on the specified host name, ipaddress, or globalid. 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 globalid. Wildcards are permitted. It is a positional parameter (position = 0).

Page 27: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

27

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

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

Page 28: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

28

C:\PS>$s | Disconnect-EmcStorageSystem -Force

Disconnects the storage system.

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

Disconnects the storage system based on the storage system name, userfriendlyname, or globalid. 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 globalid. 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, -Confirm <SwitchParameter> Attributes: Optional, Position: named Prompts the user for confirmation before executing the command. -System <SystemObjectBase>

Page 29: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

29

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

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

Disconnects the host, cluster, or storage systems.

-------------- Example 3 --------------

C:\PS>$hBlob = Get-EmcHostSystemCredential

C:\PS>$h = $hBlob | Connect-EmcSystem

C:\PS>$sBlob = Get-EmcStorageSystemCredential

C:\PS>$s = $sBlob | Connect-EmcSystem

Page 30: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

30

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

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

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*

Disconnects the host, cluster, or storage system based on the specified system's userfriendlyname or globalid. Wild cards are permitted. Because the id parameter is positional, you can omit the name.

Page 31: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

31

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

Outputs

string

Examples

-------------- Example 1 --------------

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 (add) the cluster system to ESI.

Page 32: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

32

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, ipaddress, 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 username 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

Outputs

string

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 (add) the host system to ESI.

Page 33: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

33

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 type of storage system to add (CLARION®, VNX™, VNXe™, VMAX™, VMAXe™, and so on), 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 username 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 the Connect-EmcSystem cmdlet.

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

Outputs

string

Examples

-------------- Example 1 --------------

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 add the storage system to ESI.

Page 34: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

34

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.

Page 35: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

35

-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

Updates the specified host system.

-------------- Example 2 --------------

C:\PS>Get-EmcClusterSystem | Update-EmcSystem -Silent

Updates the specified cluster system.

-------------- Example 3 --------------

C:\PS>Get-EmcStorageSystem | Update-EmcSystem -Silent

Updates the specified storage system.

Page 36: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

36

Storage system operations

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

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

Page 37: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

37

-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

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

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

Gets the LUNs based on the LUN id or name. Wildcards are permitted. Because the id parameter is positional, you can omit the name.

Page 38: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

38

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

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

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

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.

Page 39: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

39

Get-EmcSnapshotPool Gets the list of snapshot pools.

Syntax

Get-EmcSnapshotPool [-ID <String>] [-Silent] [<CommonParameters>]

Parameters

-ID <String>

Attributes: Optional, Position: 1

Specifies the snapshot pool 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.

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

Gets all the snapshot pools from all the connected storage systems.

-------------- Example 2 --------------

C:\PS>Get-EmcSnapshotPool -id 12

C:\PS>Get-EmcSnapshotPool 12

Gets the snapshot pools based on the pool id. Wildcards are permitted. Because the id parameter is positional, you can omit the name.

Get-EmcSnapshotSession Gets the list of snapshot sessions.

Syntax

Get-EmcSnapshotSession [-SessionID <String>] [-SourceID <String>] [-TargetID <String>] [-Silent] [<CommonParameters>]

Page 40: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

40

Parameters

-SessionID <String>

Attributes: Optional, Position: 1

Specifies the snapshot session id. Wildcards are permitted. It is a positional parameter (position = 0).

-SourceID <String>

Attributes: Optional, Position: named

Specifies the snapshot session id. Wildcards are permitted.

-TargetID <String>

Attributes: Optional, Position: named

Specifies the snapshot target id. Wildcards are permitted.

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

Gets all the snapshot sessions.

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

Page 41: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

41

Specifies the storage pool name or id. Wildcards are permitted. It is a positional parameter (position = 0).

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

<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

ArrayPoolId

-----------

pool:0

Gets the list of storage pools from all the connected storage systems or specified storage systems or specified LUNs.

Page 42: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

42

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

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.

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

Page 43: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

43

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.

-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

Gets the storage systems.

-------------- Example 2 --------------

C:\PS>Get-EmcStorageSystem -BlockStorageSystem

Gets the connected block storage systems.

-------------- Example 3 --------------

C:\PS>Get-EmcStorageSystem -FileStorageSystem

Gets the connected file storage systems.

-------------- Example 4 --------------

C:\PS>Get-EmcStorageSystem vnx*

C:\PS>Get-EmcStorageSystem -id vnx*

Gets the storage system based on name, userfriendlyname, or globalid. Wildcards are permitted. Because the id parameter is positional, you can omit the name.

Page 44: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

44

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.

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

Page 45: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

45

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type get-help about_commonparameters

Outputs

LUN

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

Creates a LUN.

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

Creates a LUN with thin provisioning.

New-EmcSnapshotLun Creates a snapshot LUN.

Syntax

New-EmcSnapshotLun -SourceLUN <Lun> [-Silent] [<CommonParameters>]

Page 46: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

46

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

Examples

-------------- Example 1 --------------

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)

Creates a snapshot LUN from a LUN.

Page 47: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

47

New-EmcSnapshotSession Creates a new snapshot session.

Syntax

New-EmcSnapshotSession -SourceLUN <Lun> [-SnapshotLUN <SnapshotLun>] [-SnapshotPool <SnapshotPool>] [-Silent] [<CommonParameters>]

Parameters

-SourceLUN <Lun>

Attributes: Required, Position: named

Specifies the source LUN.

-SnapshotLUN <SnapshotLun>

Attributes: Optional, Position: named

Specifies the snapshot LUN.

-SnapshotPool <SnapshotPool>

Attributes: Optional, Position: named

Specifies the snapshot pool.

-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>$l = get-emclun

C:\PS>$ss = New-EmcSnapshotSession -SourceLUN $l[0]

Creates a snapshot session from a source LUN.

Page 48: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

48

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.

-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

Page 49: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

49

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.

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

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

Page 50: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

50

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.

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

Creates a LUN, creates a snapshot LUN from it, and removes a LUN.

Page 51: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

51

Remove-EmcSnapshotSession Removes the snapshot session.

Syntax Remove-EmcSnapshotSession -SnapshotSession <SnapshotSession> [-RemoveSnapshotLUN] [-Force] [-Silent] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters

-SnapshotSession <SnapshotSession>

Attributes: Required, Position: named

Specifies the ESI snapshot session object. You can obtain a snapshot session object from the storage system or by using Get-EmcSnapshotSession cmdlet.

-RemoveSnapshotLUN <SwitchParameter>

Attributes: Optional, Position: named

Removes the snapshot LUN.

-Force <SwitchParameter>

Attributes: Optional, Position: named

Allows the cmdlet to continue without asking for the user's confirmation.

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

-WhatIf <SwitchParameter>

Attributes: Optional, Position: named

Describes what would happen if a 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

Page 52: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

52

Examples

-------------- Example 1 --------------

C:\PS>$ss = Get-EmcSnapshotSession <snapshot session id>

C:\PS>Remove-EmcSnapshotSession -SnapshotSession $ss

Removes the specified snapshot session.

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> -HostIpAddress <String> -Available [-Silent] [<CommonParameters>]

• Set-EmcLunAccess -Lun <Lun> -InitiatorId <String[]> -HostName <String> -HostIpAddress <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 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 or virtual machine or 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.

Page 53: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

53

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

-HostIpAddress <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, ipaddress

C:\PS>Set-EmcLunAccess -Lun $l -HostSystem $h -Available

Unmasks the LUN on the host system.

Page 54: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

54

-------------- Example 2 --------------

C:\PS>$l | select ArrayLunId, name

C:\PS>$h | select name, ipaddress

C:\PS>Set-EmcLunAccess -Lun $l -HostSystem $h -UnAvailable

Masks the LUN on the host system.

-------------- Example 3 --------------

C:\PS>$l | select ArrayLunId, name

C:\PS>$c | select name, ipaddress

C:\PS>Set-EmcLunAccess -Lun $l -ClusterSystem $c -Available

Unmasks the LUN on the cluster system.

-------------- Example 4 --------------

C:\PS>$l | select ArrayLunId, name

C:\PS>$c | select name, ipaddress

C:\PS>Set-EmcLunAccess -Lun $l -ClusterSystem $c -Unavailable

Masks the LUN on the cluster system.

-------------- Example 5 --------------

C:\PS>$l | select ArrayLunId, name

C:\PS>$c | select name, ipaddress

C:\PS>Set-EmcLunAccess -Lun $l -InitiatorId $id -Available

Unmasks the specified LUN on the specified iSCSI/FC initiator.

-------------- Example 6 --------------

C:\PS>$l | select ArrayLunId, name

C:\PS>$c | select name, ipaddress

C:\PS>Set-EmcLunAccess -Lun $l -InitiatorId $id -Unvailable

Masks the specified LUN on the specified iSCSI/FC initiator.

Page 55: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

55

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.

Page 56: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

56

-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

The examples show how to create a LUN, un-mask onto 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

Page 57: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

57

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

The examples show how to create a LUN, un-mask 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

Examples

-------------- Example 1 --------------

C:\PS>$h = Get-EmcHostSystem *.148

C:\PS>$h | Update-EmcSystem -Silent

C:\PS>$hd = $h.HostDisks[6]

Page 58: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

58

C:\PS>$hd.MbrDiskSignature

3452748690

C:\PS>$hd.HostDiskIdentifier

\\?\PhysicalDrive6

C:\PS>Clear-EmcHostDiskSignature -HostDisk $hd

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>

Clears the host disk signature and assigns a new one.

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.

Page 59: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

59

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.

-VmDiskConfig <VmDiskConfiguration>

Attributes: Required, Position: named

Specifies the ESI VmDiskConfiguration object. It encapsulates the attached file-based disk or passthrough disk configuration information such as the SCSI controller id,

Page 60: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

60

6

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

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

Creates a LUN, un-masks onto a cluster system, and finds the corresponding disk.

Page 61: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

61

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

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

Attaches a passthrough disk to a virtual machine and by using VmDiskConfiguration, the cmdlet Find-EmcHostDisk 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.

Page 62: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

62

6

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

-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

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>

Gets the available drive letters from a cluster system.

Page 63: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

63

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

-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

Page 64: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

64

6

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"

Gets the cluster disks from the cluster system.

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

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

Page 65: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

65

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-EmcClusterSystem | Get-EmcClusterGroup -Silent | select name

Name

----

Available Storage

App1

App2

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, ipaddress, or globalid. 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.

Page 66: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

66

6

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

Examples

-------------- Example 1 -------------- C:\PS>$cBlob = Get-EmcClusterSystemCredential

C:\PS>$c = $cBlob | Connect-EmcSystem

C:\PS>Get-EmcClusterSystem

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*

Gets the cluster system based on the specified cluster name, ipaddress, or globalid. 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

Gets the cluster system based on cluster disk.

Page 67: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

67

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

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

Page 68: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

68

6

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

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

Gets all disks of the specified host.

-------------- Example 2 -------------- C:\PS>Get-EmcHostSystem | Update-EmcSystem

C:\PS>Get-EmcHostDisk

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

Gets the host disks of the specified host system with the specified HostDiskIdentifier or MbrDiskSignature or GptDiskGuid (accepts wildcard). 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

Page 69: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

69

C:\PS>Get-EmcHostDisk *Drive8*

Gets the host disks of all the connected host systems with the specified HostDiskIdentifier or MbrDiskSignature or GptDiskGuid (accepts wildcard). Because the id parameter is positional, you can omit the name.

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

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

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

Page 70: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

70

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 or virtual machine or 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

Gets the HostLunIdentifier for the specified LUN and host system.

-------------- Example 2 -------------- C:\PS>$Cluser1 = Get-EmcClusterSystem

C:\PS>$Cluser1

Page 71: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

71

C:\PS>$Lun29 = Get-EmcLUN 11529*

C:\PS>$Lun29

C:\PS>Get-EmcHostLunIdentifier -Lun $Lun29 -ClusterSystem $Cluster1

Gets the HostLunIdentifier for the specified LUN and cluster system.

-------------- Example 3 -------------- C:\PS>$l = Get-EmcLUN mylun*

C:\PS>Get-EmcHostLunIdentifier -Lun $l

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 ipaddress, or globalid. 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 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.

Page 72: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

72

<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

Gets the connected host systems.

-------------- Example 2 --------------

C:\PS>$Disk = Get-EmcHostDisk -id 4074289894

C:\PS>$Disk

C:\PS>Get-EmcHostSystem -Disk $Disk

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

Gets the host system of the specified volume.

-------------- Example 4 --------------

C:\PS>Get-EmcHostSystem <HostName>

C:\PS>Get-EmcHostSystem <HostIpAddress>

C:\PS>Get-EmcHostSystem <HostGlobalId>

Gets the host system with the specified host name or ipaddress or globalid (accepts wildcard).

Page 73: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

73

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 from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlet.

-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 or virtual machine or 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.

-ClusterSystem <IClusterSystem>

Attributes: Optional, Position: named

Page 74: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

74

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

Gets all volumes of the specified Host.

-------------- Example 2 --------------

C:\PS>Get-EmcHostSystem | Update-EmcSystem

C:\PS>Get-EmcHostVolume

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

Gets the volumes of cluster disks or cluster system.

Page 75: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

75

-------------- 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 \\?\*

Gets the volumes based on the drive letter or mount path or label or volume identifier (accepts wildcard). 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. 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.

Page 76: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

76

-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

C:\PS>$hd = Find-EmcHostDisk -ClusterSystem $h -Lun $l -Silent

Page 77: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

77

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 or virtual machine or 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.

-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

Page 78: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

78

systems, the default value is 65536 bytes, and 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

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

Page 79: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

79

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.

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

Page 80: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

80

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 were executed, without actually executing the command.

-Confirm <SwitchParameter>

Attributes: Optional, Position: named

Prompts for confirmation before executing the command.

-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

Page 81: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

81

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

Removes the disk from the cluster. The example also shows how to add a disk to the cluster.

-------------- Example 2 --------------

C:\PS>$lid = Get-EmcHostLunIdentifier -Lun $l

C:\PS>Remove-EmcHostDiskFromCluster -HostLunIdentifier $lid -ClusterSystem $c -Force

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

Page 82: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

82

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 or virtual machine or 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.

<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

Page 83: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

83

C:\PS>

Unmounts the specified volume.

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

Examples

-------------- Example 1 --------------

C:\PS>$h = Get-EmcHostSystem *.148

C:\PS>$h | Update-EmcSystem -Silent

C:\PS>$h.HostDisks | select hostdiskidentifier

Page 84: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

84

HostDiskIdentifier

------------------

\\?\PhysicalDrive4

\\?\PhysicalDrive7

\\?\PhysicalDrive1

\\?\PhysicalDrive2

\\?\PhysicalDrive3

\\?\PhysicalDrive5

\\?\PhysicalDrive6

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.

Page 85: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

85

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

Examples

-------------- Example 1 --------------

C:\PS>$h = Get-EmcHostSystem *.148

C:\PS>$h | Update-EmcSystem -Silent

C:\PS>$h.HostDisks | select hostdiskidentifier

HostDiskIdentifier

------------------

Page 86: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

86

\\?\PhysicalDrive4

\\?\PhysicalDrive7

\\?\PhysicalDrive1

\\?\PhysicalDrive2

\\?\PhysicalDrive3

\\?\PhysicalDrive5

\\?\PhysicalDrive6

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.

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

Page 87: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

87

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.

-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

Page 88: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

88

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.

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

Page 89: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

89

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.

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

Page 90: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

90

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.

-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

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>$vmconfig.VmId.guid

C4908C4C-6564-4688-B8EC-E47E7758E17E

Page 91: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

91

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

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

ath "E:\ps_test1.vhd" -Location $locations[0]

The examples describe how to attach a file-based disk to a virtual machine. The examples 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>]

Parameters

-DiskId <String>

Attributes: Required, Position: named

Page 92: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

92

Specifies the passthrough disk identifier in hypervisor.

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

-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 the hypervisor (host system) object by using the Get-EmcHostSystem 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

Page 93: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

93

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.

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

C:\PS>$hd = Find-EmcHostDisk -VirtualMachine $vm -VmDiskConfig $diskConfig

C:\PS>Remove-EmcVirtualDiskFromVm -Hypervisor $h -VirtualMachineConfiguration $vmconfig -Location $locations[0] -force

The example gets a hypervisor and virtual machine system objects, refreshes the virtual machine configurations in the hypervisor, gets the virtual machine’s configuration, gets the available locations of the SCSI controller, attaches one of the passthrough disk candidates of the hypervisor to the virtual machine, finds the attached passthrough disk in the virtual machines and finally removes it.

Page 94: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

94

-------------- 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 cmdlet is very similar to the one shown in example 1. But, the difference is that it 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.

Get-EmcAvailablePassthroughDiskCandidate Gets the available passthrough 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 to ESI just like the host system by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can obtain a hypervisor (host system) object by using the Get-EmcHostSystem cmdlet.

Page 95: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

95

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

\\?\PhysicalDrive3

C:\PS>$h.AvailablePassthroughDiskCandidates[1].hostdiskidentifier

\\?\PhysicalDrive4

Gets the available passthrough 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 passthrough 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>]

Page 96: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

96

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 passthrough disks.

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

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

-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

Page 97: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

97

Examples

-------------- Example 1 --------------

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

Gets the available SCSI controllers of a virtual machine.

Get-EmcVirtualDiskConfiguration Gets the virtual disk (attached file-based disk or passthrough 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)

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.

Page 98: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

98

<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

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.

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.]'.

Page 99: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

99

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>

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>

Page 100: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

100

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

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>

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 passthrough disks.

Page 101: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

101

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

Gets the hypervisor 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

Page 102: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

102

C:\PS>$vmconfig.status

Running

C:\PS>$h = $vmconfig | Get-EmcVirtualMachineHypervisor

C:\PS>$h.Model

Hyper-V, PowerEdge R710

C:\PS>

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 passthrough disks.

-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 passthrough disks.

-Silent <SwitchParameter>

Attributes: Optional, Position: named

Turns off all the informational and verbose messages. However, it still displays warnings and errors.

Page 103: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

103

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

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}

Gets the SCSI controllers from the virtual machine configuration.

Page 104: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

104

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

Gets the SCSI controllers from the virtual machine configuration.

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

Page 105: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

105

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.

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

Creates a file-based disk in a hypervisor.

Page 106: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

106

Remove-EmcVirtualDiskFromVm Removes a file-based disk or a passthrough 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.

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

Page 107: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

107

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

-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

Page 108: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Cmdlet Reference

EMC Storage Integrator PowerShell Cmdlet User Guide

108

C:\PS>$locations[0]

0

C:\PS>$diskConfig = Add-EmcFilebasedDiskToVirtualMachine -Hypervisor $hyperv -VirtualMachineConfiguration $vmconfig -P

ath "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 -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 passthrough disk to a virtual machine and removes it.

Page 109: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

EMC Storage Integrator PowerShell Cmdlet User Guide

109

Chapter 5 Current Limitations and Future Enhancements

This chapter presents the following topic:

Current limitations and future enhancements ......................................... 110

Page 110: User Guide: EMC Storage Integrator PowerShell Cmdlet · 2020-06-14 · cmdlets, Windows PowerShell 2.0 must be installed or enabled as a Windows feature. The ESI PowerShell cmdlet

Current Limitations and Future Enhancements

EMC Storage Integrator PowerShell Cmdlet User Guide

110

Current limitations and future enhancements The ESI PowerShell cmdlet set is currently limited to block storage provisioning. Support for file share provisioning on supported systems will be added in a future version.

Block snapshot support is currently supported on VNX/CLARiiON systems. Application provisioning for SharePoint is not available through the ESI PowerShell interface.

The Clear-EmcHostDiskSignature cmdlet is supported only with x64-based host systems.