You are on page 1of 34

PowerShell Module for Dell EMC Unity

Product Guide
1.1

August 2021
Rev. 1.0
Notes, cautions, and warnings

NOTE: A NOTE indicates important information that helps you make better use of your product.

CAUTION: A CAUTION indicates either potential damage to hardware or loss of data and tells you how to avoid
the problem.

WARNING: A WARNING indicates a potential for property damage, personal injury, or death.

© 2020 - 2021 Dell Inc. or its subsidiaries. All rights reserved. Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries.
Other trademarks may be trademarks of their respective owners.
Contents

Chapter 1: Introduction................................................................................................................. 6
About this Document..........................................................................................................................................................6
Product Overview............................................................................................................................................................... 6
New features in release 1.1................................................................................................................................................6

Chapter 2: Installation...................................................................................................................8
Prerequisites......................................................................................................................................................................... 8
Uninstalling PowerShell Modules............................................................................................................................... 8
Installation............................................................................................................................................................................10
Install from PowerShell Gallery........................................................................................................................................11
Install Windows Installer package................................................................................................................................... 11
Import Unity module.......................................................................................................................................................... 13
Import Unisphere certificates to Certificate Store....................................................................................................15
Download certificates................................................................................................................................................. 16

Chapter 3: Unity cmdlets............................................................................................................. 18


Cmdlets for UnityArray operations................................................................................................................................ 18
Connect-UnityArray.....................................................................................................................................................18
Get-UnityArray..............................................................................................................................................................18
Disconnect-UnityArray................................................................................................................................................18
Cmdlets for Unity discovery............................................................................................................................................19
Get-HostLun..................................................................................................................................................................19
Get-HostGroupLun...................................................................................................................................................... 19
Get-Pool......................................................................................................................................................................... 19
Get-IoLimitPolicy..........................................................................................................................................................19
Get-Tenant.................................................................................................................................................................... 19
Get-ReplicationInterface............................................................................................................................................ 19
Get-RemoteInterface.................................................................................................................................................. 19
Get-StorageResource................................................................................................................................................ 20
Get-NasServer............................................................................................................................................................. 20
Get-NfsServer..............................................................................................................................................................20
Get-SmbServer............................................................................................................................................................20
Cmdlets for LUN operations...........................................................................................................................................20
New-Lun........................................................................................................................................................................ 20
New-LunClone............................................................................................................................................................. 20
Get-Lun..........................................................................................................................................................................20
Expand-Lun...................................................................................................................................................................20
Set-Lun........................................................................................................................................................................... 21
Refresh-Lun...................................................................................................................................................................21
Remove-Lun.................................................................................................................................................................. 21
Cmdlets for ConsistencyGroup operations..................................................................................................................21
New-ConsistencyGroup..............................................................................................................................................21
Get-ConsistencyGroup............................................................................................................................................... 21
Set-ConsistencyGroup................................................................................................................................................21

Contents 3
New-ConsistencyGroupClone.................................................................................................................................. 22
Refresh-ConsistencyGroup.......................................................................................................................................22
Remove-ConsistencyGroup...................................................................................................................................... 22
Cmdlets for MoveSession operations...........................................................................................................................22
New-MoveSession...................................................................................................................................................... 22
Get-MoveSession........................................................................................................................................................ 22
Set-MoveSession........................................................................................................................................................ 23
Cancel-MoveSession.................................................................................................................................................. 23
Remove-MoveSession................................................................................................................................................23
Cmdlets for Host and HostGroup operations.............................................................................................................23
New-Host...................................................................................................................................................................... 23
Get-Host........................................................................................................................................................................23
Set-Host........................................................................................................................................................................ 23
Remove-Host............................................................................................................................................................... 23
New-HostGroup...........................................................................................................................................................23
Get-HostGroup............................................................................................................................................................ 24
Set-HostGroup.............................................................................................................................................................24
Remove-HostGroup.................................................................................................................................................... 24
Cmdlets for HostInitiator operations............................................................................................................................ 24
New-HostInitiator........................................................................................................................................................24
Get-HostInitiator......................................................................................................................................................... 24
Set-HostInitiator..........................................................................................................................................................25
Remove-HostInitiator................................................................................................................................................. 25
Cmdlets for Snapshot operations..................................................................................................................................25
New-Snapshot............................................................................................................................................................. 25
Get-Snapshot............................................................................................................................................................... 25
Set-Snapshot............................................................................................................................................................... 26
Copy-Snapshot............................................................................................................................................................ 26
Refresh-Snapshot....................................................................................................................................................... 26
Replicate-Snapshot.....................................................................................................................................................26
Restore-Snapshot....................................................................................................................................................... 26
Attach-Snapshot......................................................................................................................................................... 26
Detach-Snapshot.........................................................................................................................................................26
Remove-Snapshot....................................................................................................................................................... 27
Cmdlets for SnapshotSchedule operations.................................................................................................................27
New-SnapshotSchedule.............................................................................................................................................27
Get-SnapshotSchedule.............................................................................................................................................. 27
Set-SnapshotSchedule...............................................................................................................................................27
Remove-SnapshotSchedule...................................................................................................................................... 27
Cmdlets for Replication operations...............................................................................................................................27
New-RemoteSystem...................................................................................................................................................28
Get-RemoteSystem.................................................................................................................................................... 28
Set-RemoteSystem.....................................................................................................................................................28
Remove-RemoteSystem............................................................................................................................................ 28
New-ReplicationSession............................................................................................................................................ 29
Get-ReplicationSession.............................................................................................................................................. 29
Set-ReplicationSession.............................................................................................................................................. 29
Pause-ReplicationSession..........................................................................................................................................29
Resume-ReplicationSession...................................................................................................................................... 29
Sync-ReplicationSession............................................................................................................................................29

4 Contents
Remove-ReplicationSession......................................................................................................................................29
Failover-ReplicationSession...................................................................................................................................... 29
Failback-ReplicationSession......................................................................................................................................29
PreserveAsync-ReplicationSession......................................................................................................................... 30
Cmdlets for File System operations..............................................................................................................................30
New-Filesystem........................................................................................................................................................... 30
Get-Filesystem............................................................................................................................................................. 30
Set-Filesystem............................................................................................................................................................. 30
Remove-Filesystem.....................................................................................................................................................30
Cmdlets for NfsShare operations..................................................................................................................................30
New-NfsShare.............................................................................................................................................................. 31
Get-NfsShare................................................................................................................................................................ 31
Set-NfsShare................................................................................................................................................................ 31
Remove-NfsShare........................................................................................................................................................31
Cmdlets for SMB (CIFS) Share operations................................................................................................................. 31
New-SmbShare.............................................................................................................................................................31
Get-SmbShare.............................................................................................................................................................. 31
Set-SmbShare.............................................................................................................................................................. 32
Remove-SmbShare..................................................................................................................................................... 32
Get-Ace..........................................................................................................................................................................32
Set-Ace.......................................................................................................................................................................... 32
Cmdlets for TreeQuota management...........................................................................................................................32
New-TreeQuota........................................................................................................................................................... 32
Get-TreeQuota.............................................................................................................................................................32
Set-TreeQuota............................................................................................................................................................. 32
Remove-TreeQuota.................................................................................................................................................... 32
Update-TreeQuota...................................................................................................................................................... 33
Cmdlets for UserQuota management...........................................................................................................................33
New-UserQuota........................................................................................................................................................... 33
Get-UserQuota.............................................................................................................................................................33
Set-UserQuota............................................................................................................................................................. 33
Remove-UserQuota.................................................................................................................................................... 33
Update-UserQuota......................................................................................................................................................33
Cmdlets for QuotaConfig management....................................................................................................................... 33
Get-QuotaConfig......................................................................................................................................................... 34
Set-QuotaConfig......................................................................................................................................................... 34

Contents 5
1
Introduction
This chapter contains these topics:
Topics:
• About this Document
• Product Overview
• New features in release 1.1

About this Document


This product guide provides information and instructions to install the PowerShell Module for Dell EMC Unity storage system.
This guide provides information on the PowerShell cmdlets that are used to enable and simplify the automation of Dell EMC
Unity storage management activities.

Product Overview
The PowerShell Module for Dell EMC Unity is a PowerShell module that includes various PowerShell commands (cmdlets) to
enable and simplify the automation of Dell EMC Unity storage management activities.
The PowerShell Module for Dell EMC Unity delivers cmdlets for:
● LUN management
● Consistency Group management
● Host and Host Group management
● Snapshot and Snapshot Schedule management
● NFS Share operations
● SMB (CIFS) Share operations
● File System operations
● Tree Quota management operations
● User Quota management operations
● User Quota management operations
● Quota configuration operations
● Replication management
The cmdlets are used to develop end-to-end automation solutions for the Dell EMC Unity storage system.

New features in release 1.1


Release 1.1
This section details the new features implemented in release 1.1.
These cmdlets are implemented:
● cmdlets for NFS Share operations
● cmdlets for SMB (CIFS) Share operations
● cmdlets for File System operations
● cmdlets for Tree Quota management
● cmdlets for User Quota management

6 Introduction
● cmdlets for Quota Configuration
These cmdlets have been enhanced

Cmdlet Enhancement
Discovery These commands have been added:
● Get-StorageResource
● Get-NasServer
● Get-NfsServer
● Get-SmbServer

Snapshot Snapshot cmdlets are enhanced and tested with files system.
Replication Replication cmdlets are enhanced and tested to support file
system replication.
The PreserveAsync-ReplicationSession cmdlet has been
added.

Introduction 7
2
Installation
This chapter contains these topics:
Topics:
• Prerequisites
• Installation
• Install from PowerShell Gallery
• Install Windows Installer package
• Import Unity module
• Import Unisphere certificates to Certificate Store

Prerequisites
● The Windows PowerShell version must be 5.1 or later.
NOTE: To check if PowerShell has old version on Windows 2012 server:
○ In case of an old version of PowerShell, Import-Module will fail with error message. For example
C:\Users\Administrator\Documents\WindowsPowerShell\Modules\Dell.Unity\1.0.0.0\Dell.
Unity.psd1

The following message is displayed:

The version of Windows PowerShell on this computer is '4.0'. The module


'C:\Users\Administrator\Documents\WindowsPowerShell\Modules\Dell.Unity\1.0.0.0\De
ll.Unity.psd1'
requires a minimum Windows PowerShell version of '5.1' to run, if old version of
Powershell is installed

○ To check the PowerShell version, use: $PSVersionTable in Powershell- which gives PowerShell version installed and
current PowerShell session information.
● The .Net Framwork version must be 4.8
● Ensure to save and import all Unisphere server certificates
● If the Powershell Module for Unity 1.0 is installed, it must be uninstalled before version 1.1 can be installed. Refer to the
Uninstalling Powershell Modules procedure.

Uninstalling PowerShell Modules

About this task


There are two ways to uninstall the current PowerShell module.
● Use the uninstall module command if the module was installed from the PowerShell gallery, or
● Use the MSI installer if the module was installed from the MSI package.

Steps
1. If the current module is being used in any sessions, close the sessions before uninstalling the module.
2. Determine how the module was installed using these commands:
Use "Get-InstalledModule", if the module is installed via PowerShell Gallery, it will be listed.
Use "Get-Package -ProviderName msi", if the module is installed via MSI, it will be listed.

8 Installation
3. If the module was installed via PowerShell Gallery, use this command to uninstall the module:

Uninstall-Module -Name Dell.Unity

4. If the module was installed via the MSI package, perform these steps:
a. Open or run the MSI installer. Select Next.

b. On the Change, Repair or Remove Installation screen, select Remove. Select Next.

c. In the Ready to Remove screen, select Remove.

Installation 9
d. When the Completed screen appears, Select Finish.

Installation
The PowerShell module can be installed from:
● PowerShell Gallery
● Dell EMC Support Site

PowerShell Gallery
The PowerShell Gallery is the central repository for PowerShell content. It is a package repository containing scripts, modules,
and resources. The cmdlets in the PowerShellGet module are used to install packages from the PowerShell Gallery.
For more information on PowerShell Gallery, see Getting Started with the PowerShell Gallery.
You can also see, Installing various versions of PowerShell, on how to prepare your system for installation of modules from
PowerShell Gallery.

10 Installation
Install from PowerShell Gallery
Use the procedure in this topic to install the PowerShell module from gallery.

Prerequisites
PowerShell Gallery requires TLS 1.2. To install TLS 1.2, enter the following command:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Refer to https://docs.microsoft.com/en-us/powershell/scripting/gallery/getting-started?view=powershell-5.1 for more


information
NOTE: If there are commands that have the same names with the commands in the Dell.Unity module, use AllowClobber
parameter to use the commands from Dell.Unity module. For more information on the use of AllowClobber, see Help for
Install-Module.

Steps
1. To install the module for all users, start a Windows PowerShell terminal session with Administrator privileges.
Enter the following command:

Install-Module -Name Dell.Unity

2. To install the module for a local user, start a Windows PowerShell terminal session as user, and use the parameter -Scope
CurrentUser.
Enter the following command:

Install-Module -Name Dell.Unity -Scope CurrentUser

Install Windows Installer package


Steps
1. Download the latest .msi package from Dell EMC Support Site.
2. Run the executable .msi file. The PowerShell for Dell EMC Unity setup wizard is displayed.

Installation 11
3. To install the package, click Next.
4. Select the checkbox to agree to End User License Agreement. Click Next.

5. Select the destination directory to install the package. Click Next.

6. To complete the installation, click Install.

12 Installation
7. On completion of the installation, click Finish to exit the setup wizard.

Import Unity module


Information on how to import and use the Unity module.

How to use the module


The PowerShell module for Dell EMC Unity arrays provides cmdlets for management of Unity arrays. Cmdlets in this module
provide tools managing of LUNs, consistency groups, hosts, host groups, snapshots, NFS share, SMB (CIFS) share, file system,
tree quota, user quota, quota configuration, and replication.
● Import the Unity module by executing the following command in a PowerShell command prompt:

Import-Module Dell.Unity

Installation 13
● Import the module using a prefix of Unity for each command:

Import-Module -Prefix Unity Dell.Unity

NOTE:

The use of the prefix will allow for all cmdlets to be called via a prefixed form of the cmdlet, for example, Get-UnityHost
can be used instead of Get-Host. This is useful for cases where there is a name conflict between the cmdlets in
different modules. An alternative is to prefix the cmdlet with the module name, for example, Dell.Unity\Get-Host.

The Unity module communicates with one or more Unisphere servers via HTTPS using the Unisphere REST API. Most
cmdlets require that a Unisphere object be used. Use the Connect-UnityArray cmdlet to connect to the target Unisphere
server and save the output to a variable, for example, $unity.

$unity = Connect-UnityArray -HostName <address> <credential>

The variable can now be used in subsequent cmdlets, for example, Get-Pool $unity.

Only TLS 1.2 protocol is supported. Certificates need to be imported to the Trusted Root Certification Authorities
prior to running the Connect-UnityArray command. To disable certificate validation, run "[ Net.ServicePointManager ]::
ServerCertificateValidationCallback = { $true }" prior to executing the Connect-UnityArray cmdlet. Please note that this will
disable certificate validation for all cmdlets in current PowerShell session including commands from other modules. For steps
to import certificates, please see Import Unisphere Certificates.

Command availability
To find out what commands are available, enter the following command:

Get-Command -Module Dell.Unity

To get help for a specific command, enter the following command:

Get-Help [verb]-[noun]

To get extended help for a specific command, enter the following command:

Get-Help [verb]-[noun] -full

All commands require that you first connect to a Unity array and save the output using the following command:

$unity = Connect-UnityArray -HostName <address> <credential> [options]

To get more information about the module, enter the following command:

Get-Help about_Unity_Module

CAUTON: The names of some imported commands from the module Dell.Unity include unapproved verbs that might make them
less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose
parameter. For a list of approved verbs, use Get-Verb.

Supported Unisphere versions


The minimum supported version is 5.0.6.
Several cmdlets require Unisphere 5.1. Some input parameters may only be applicable to Unisphere 5.1.

Cmdlet input
For cmdlets that have input parameters with nested arrays or IDictionary containing array values, array of objects should be
used, instead of array of a specific type (e.g., array of strings).

14 Installation
For cmdlets that use an integer value for number of seconds as input, New-TimeSpan cmdlet can be used to convert minutes,
hours or days to seconds, e.g., (New-TimeSpan -Days 7).TotalSeconds.

Cmdlet output
Unity resource instance returned from a cmdlet will only have resource ID for referenced object, e.g., Pool property of a LUN.
To get details of the referenced object, use corresponding Get cmdlet for the resource type with the ID, e.g., using Get-Pool to
get details of the pool.

Nested referenced property can be displayed with Format-Table, Format-List, Format-Custom, or Select-Object cmdlets using
calculated property. For example:

Get-Filesystem $unity -Id fs_1 | Format-Table -Property


Id,Name,@{n="StorageResourceId";e={ $_.StorageResource.Id }}

Where $unity is a Unity array instance. Returns ID, Name and storage resource ID of the file system fs_1 on the Unity array.

(Get-Filesystem $unity -Id fs_1).StorageResource.Id | Get-StorageResource $unity


| Format-Table -Property Id,@{n="IsSnapSchedulePasued";e={ $_.IsSnapSchedulePaused
}},@{n="SnapshotScheduleId";e={ $_.SnapSchedule.Id }}

Where $unity is a Unity array instance. Returns ID, IsSnapSchedulePasued and snapshot schedule ID of the storage resource
instance associated with the file system fs_1 on the Unity array.
For more information about calculated property, see https://docs.microsoft.com/en-us/powershell/module/
microsoft.powershell.core/about/about_calculated_properties?view=powershell-5.1.
Instances in output can be filtered based on their property values by using Where-Object command, for example, Get-Host
$unity -Identify | Where-Object Name -eq "HOST1", will display hosts with name HOST1. To learn more about
the Where-Object command, please use help Where-Object.

Force parameter
For all cmdlets where the Force parameter is supported, the parameter is used to skip confirmation before performing the
operation.
It is not related to the "force" parameter (if any) in Unisphere REST API. If Unisphere REST API has a parameter with name
"force", it will be "Force<Operation>", e.g., ForceDelete, as cmdlet parameter.

Switch and boolean parameters in the new and set cmdlets


For same parameter, switch parameter type will be used in New cmdlet, and boolean parameter type will be used in Set cmdlet.
If default value of a parameter is True, the parameter type will be boolean instead of switch in the New cmdlet.

Import Unisphere certificates to Certificate Store


This section describes how to import certificates. If you do not want to import the certificates, Microsoft allows you to disable
them.

Disable certificate validation


To disable certificate validation, run "[Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }" prior to
executing the Connect-UnityArray cmdlet. Please note that this will disable certificate validation for all cmdlets in current
PowerShell session including commands from other modules.

Installation 15
Download certificates
Steps
1. In your browser, navigate to https://<Unity host>

2. Select "Certificate".
3. Download and save all certificates in the path.

16 Installation
Import methods
Certificates can be imported in three ways.
You can use any of these methods to import certificates:
● PowerShell
● Certificate Import Wizard

Import certificates using PowerShell

Steps
1. Start PowerShell as administrator.
2. Enter the Run command.
3. Run the following:Import-Certificate -Filepath <certificate file> -CertStoreLocation 'Cert:
\LocalMachine\Root' -Verbose.
4. Repeat steps 2 and 3 to import each certificate.

Import certificates using the import wizard

Steps
1. Navigate to the directory to which the certificates are saved.
2. Double click the certificate file, Certificate Import Wizard opens.
3. Follow the steps to import the certificate to Root Certification Authorities store.
4. Repeat steps 2 and 3 to import each certificate.

Installation 17
3
Unity cmdlets
This chapter contains these topics:
Topics:
• Cmdlets for UnityArray operations
• Cmdlets for Unity discovery
• Cmdlets for LUN operations
• Cmdlets for ConsistencyGroup operations
• Cmdlets for MoveSession operations
• Cmdlets for Host and HostGroup operations
• Cmdlets for HostInitiator operations
• Cmdlets for Snapshot operations
• Cmdlets for SnapshotSchedule operations
• Cmdlets for Replication operations
• Cmdlets for File System operations
• Cmdlets for NfsShare operations
• Cmdlets for SMB (CIFS) Share operations
• Cmdlets for TreeQuota management
• Cmdlets for UserQuota management
• Cmdlets for QuotaConfig management

Cmdlets for UnityArray operations


These commands are available for UnityArray operations:
● Connect-UnityArray
● Get-UnityArray
● Disconnect-UnityArray

Connect-UnityArray
Connects to a UnityArray and optionally saves credentials for reuse. This command needs to be executed prior to any other
Unity commands in a PowerShell session. When running the command, save the output to a variable, e.g., "$unity = Connect-
UnityArray ...", so that the variable can be used as an input of other commands. Use Get-UnityArray command to get the latest
information of the array.

Get-UnityArray
Gets details of the Unity arrays. If no UnityArray or HostName parameter provided, all Unity arrays will be returned. Use the
Identify option to list only host names or IP addresses. If the Saved option is used, this command will return host names
or the IP addresses of the saved Unity arrays which were connected by using the Connect-UnityArray command with the
SaveCredentials option.

Disconnect-UnityArray
Disconnects from a Unity array. The command will succeed in case the Unity array is not connected. It is required to disconnect
from all connected Unity arrays prior to closing a PowerShell session. With the DeleteCredentials option, if there are credentials
and connection information saved by the Connect-UnityArray command with the SaveCredentials option, they will be deleted.

18 Unity cmdlets
Cmdlets for Unity discovery
These cmdlets are Get cmdlets for resources that are not directly created by other cmdlets.
● Get-HostLun
● Get-HostGroupLun
● Get-Pool
● Get-IoLimitPolicy
● Get-Tenant
● Get-ReplicationInterface
● Get-RemoteInterface
● Get-StorageResource
● Get-NasServer
● Get-NfsServer
● Get-SmbServer

Get-HostLun
Gets details of the host LUNs on a Unity array. The options include listing all host LUNs on the array and getting host LUN by
ID.

Get-HostGroupLun
Gets details of the host group LUNs on a Unity array. The options include listing all host group LUNs on the array and getting
host group LUN by ID. This command is only supported on systems running Unisphere 5.1.0 or greater.

Get-Pool
Gets details of the pools on a Unity array. The options include listing all pools on the array and getting pool by ID or name.

Get-IoLimitPolicy
Gets details of the IO limit policies on a Unity array. The options include listing all IO limit policies on the array and getting IO limit
policy by ID or name.

Get-Tenant
Gets details of the tenants on a Unity array. The options include listing all tenants on the array and getting tenant by ID or name.

Get-ReplicationInterface
Gets details of the replication interfaces on a Unity array. The options include listing all replication interfaces on the array and
getting replication interface by ID or name.

Get-RemoteInterface
Gets details of the remote interfaces on a Unity array. The options include listing all remote interfaces on the array and getting
remote interface by ID or name.

Unity cmdlets 19
Get-StorageResource
Gets details of the storage resources on a Unity array. The options include listing all storage resources on the array, getting
storage resource by ID or name.

Get-NasServer
Gets details of the NAS servers on a Unity array.

Get-NfsServer
Gets details of the NFS servers on a Unity array. The options include listing all NFS servers on the array, getting NFS server by
ID.

Get-SmbServer
Gets details of the SMB servers on a Unity array. The options include listing all SMB servers on the array, getting SMB server by
ID or name.

Cmdlets for LUN operations


These commands are available for Unity LUN operations:
● New-Lun
● New-LunClone
● Get-Lun
● Expand-Lun
● Set-Lun
● Refresh-Lun
● Remove-Lun

New-Lun
Creates a LUN on the Unity array. Optionally adds host access. Optional HostAccess parameter is a dictionary with host ID
as key and an array containing access mask and optional host LUN ID integer as value. Access mask should be 'Production',
'Snapshot' or 'Both'. If host LUN ID is not provided, system will automatically generate with next available ID.

New-LunClone
Creates a LUN clone on the Unity array either by creating a new snapshot or by using an existing snapshot. Optional HostAccess
parameter is a dictionary with host ID as key and an array containing access mask and optional host LUN ID integer as value.
Access mask should be 'Production', 'Snapshot' or 'Both'. If host LUN ID is not provided, system will automatically generate with
next available ID.

Get-Lun
Gets details of the LUNs on a Unity array. The options include listing all LUNs on the array and getting LUN by ID or name.

Expand-Lun
Expands a LUN.

20 Unity cmdlets
Set-Lun
Modifies a LUN name, description, data reduction settings, tiering policy, IO limit policy, host access, default node, snapshot
schedule, and replication destination settings.
At least one property needs to be changed. Existing property values will be replaced with the new values.
For Description, if an empty string is provided, existing description will be removed from the LUN.
For IOLimitPolicyId or SnapshotScheduleId, if "None" (case insensitive) is provided, existing property value will be removed from
the LUN.
For HostAccess, if an empty dictionary is provided, all existing host accesses will be removed from the LUN. The HostAccess
parameter is a dictionary with host ID as key and an array containing access mask and optional host LUN ID integer as value.
Access mask should be 'NoAccess', 'Production', 'Snapshot' or 'Both'. If host LUN ID is not provided, system will automatically
generate with next available ID. When NoAccess mask is used, no host LUN ID is allowed.

Refresh-Lun
Refreshes the LUN. LUN will be overwritten with a copy of the data from the specified snapshot. Returns the snapshot copy
created before the refresh operation.
If snapshot copy name is not provided, the copy name is generated using timestamp in the format of UTC_yyyy-MM-
dd_HH:mm:ss. Eligible snapshots include those which are not Read/Write attached and with no auto-deletion policy and no
expiration policy.

Remove-Lun
Removes one or more LUNs from the Unity array. If ForceSnapshotDeletion is used, LUN snapshots will be deleted along with
the LUNs.

Cmdlets for ConsistencyGroup operations


These commands are available for ConsistencyGroup operations:
● New-ConsistencyGroup
● Get-ConsistencyGrop
● Set-ConsistencyGroup
● New-ConsistencyGroupClone
● Refresh-ConsistecyGroup
● Remove-ConsistencyGroup

New-ConsistencyGroup
Creates a new consistency group on a Unity array. Optional HostAccess parameter is a dictionary with host ID as key and access
mask as value. Access mask should be either 'Production', 'Snapshot' or 'Both'.

Get-ConsistencyGroup
Gets details of the consistency groups on a Unity array. The options include listing all consistency groups on the array and
getting consistency group by ID or name.

Set-ConsistencyGroup
Modifies a consistency group name, description, data reduction settings, tiering policy, snapshot schedule, and replication
destination settings. Supports adding and removing LUNs to the consistency group.
DeleteLun used only with RemoveLun removes LUNs from group and deletes LUNs on unity array.

Unity cmdlets 21
Optional HostAccess parameter is a dictionary with host ID as key and access mask as value. Access mask should be either
'NoAccess', 'Production', 'Snapshot' or 'Both'. The host can be removed from the consistency group using RemoveHost.
For Description, if an empty string is provided, existing description will be removed from the consistency group.
For SnapshotScheduled, if "None" (case insensitive) is provided, existing snapshot schedule value will be removed from the
consistency group. At least one of the optional properties need to be provided.

New-ConsistencyGroupClone
Creates a consistency group clone on the Unity array either by creating a new snapshot or by using existing snapshot. Optional
HostAccess parameter is a dictionary with host ID as key and access mask as value. Access mask should be either 'Production',
'Snapshot' or 'Both'.

Refresh-ConsistencyGroup
Refreshes the consistency group.
Consistency group will be overwritten with a copy of the data from the specified snapshot. Returns the snapshot copy created
before the refresh operation.
If snapshot copy name is not provided, the copy name is generated using timestamp in the format of UTC_yyyy-MM-
dd_HH:mm:ss. Eligible snapshots include those which are not Read/Write attached and with no auto-deletion policy and no
expiration policy.

Remove-ConsistencyGroup
Removes one or more consistency groups from the Unity array. If ForceSnapshotDeletion is used, consistency group snapshots
will be deleted along with the consistency groups.

Cmdlets for MoveSession operations


These commands are available for MoveSession operations:
● New-MoveSession
● Get-MoveSession
● Set-MoveSession
● Cancel-MoveSession
● Remove-MoveSession

New-MoveSession
Creates a move session to move a LUN or a member LUN in a consistency group from one storage pool to another. Optionally
enables or disables thin provisioning, data reduction and advanced duplication for the LUN on the destination pool.
To move a LUN which is in a consistency group, both source ID and member LUN ID must be specified. If a LUN has associated
snapshots, including those in use by applications, these will be deleted.
Thin clone or LUN that has thin clones cannot be moved. If a LUN is participating in a replication session, it cannot be moved.
In order to move the LUN, the replication session must be deleted. Replication can be reconfigured after the move operation
completes.

Get-MoveSession
Gets details of the move sessions on a Unity array. The options include listing all move sessions on the array and getting move
session by ID.

22 Unity cmdlets
Set-MoveSession
Modifies a queued or running move session on the Unity array.

Cancel-MoveSession
Cancels one or more queued or running move sessions on the Unity array.

Remove-MoveSession
Removes one or more move sessions from the Unity array.

Cmdlets for Host and HostGroup operations


These commands are available for Host and HostGroup operations:
● New-Host
● Get-Host
● Set-Host
● Remove-Host
● New-HostGroup
● Get-HostGroup
● Set-HostGroup
● Remove-HostGroup

New-Host
Creates a host on the Unity array.

Get-Host
Gets details of the hosts on a Unity array. The options include listing all hosts on the array, getting host by ID or name.

Set-Host
Modifies the host properties or the HLUs of host LUNs accessible to the host. HostLUNs is a dictionary with host LUN ID as key
and HLU as value.

Remove-Host
Removes one or more hosts from the Unity array.

New-HostGroup
Creates a host group on the Unity array. This command is only supported on systems running Unisphere 5.1.0 or greater. With
HostGroupLun option, LUNs along with optional host LUN IDs (or host access dictionary) can be specified.
The hostGroupLun parameter is a dictionary with LUN ID as key, and an optional integer value representing host LUN ID (HLU).
If HLU is specified for a LUN, all hosts in the host group will be granted production access to the LUN with the HLU. The value
for a LUN ID in the dictionary could also be a dictionary containing host accesses.

Unity cmdlets 23
The host access dictionary contains host ID as key, and HLU integer or null as value. It is not allowed to specify host that is
not in the host group. In the host access dictionary, if HLU is not specified (e.g., with value null), and the host does not have
production access for the LUN, and the LUN has no default HLU, then the system will generate a host LUN ID for it.
To not specify HLU for a LUN, use null as its value. If the HLU is not specified:
1. If host access dictionary is absent, the LUN specified by the LUN ID will be modified to be accessible by all hosts in the host
group.
2. For the hosts that are in the host group, but not appear in the host access dictionary, the LUN will be modified to be
accessible by these hosts.
3. For the hosts that are in the host group and in the host access dictionary, the LUN will be updated according to the
dictionary.

Get-HostGroup
Gets details of the host groups on a Unity array. The options include listing all host groups on the array and getting host group
by ID or name. This command is only supported on systems running Unisphere 5.1.0 or greater.

Set-HostGroup
Modifies a host group name and description. It also, adds, modifies and removes host from host group on the Unity array.
AddHost or ModifyHost parameter takes dictionary input where the host ID is the key and value is an array containing the host
group access merge and dictionary of optional host LUN IDs.
Host group access merge should be either 'NoChange', 'Customized', 'MergeFromHostGroup' , 'MergeToHostGroup' or
'RemoveAccessFromHostGroup'. This command is only supported on systems running Unisphere 5.1.0 or greater.

Remove-HostGroup
Removes one or more host groups from the Unity array. This command is only supported on systems running Unisphere 5.1.0 or
greater.

Cmdlets for HostInitiator operations


These commands are available for HostInitiator operations:
● New-HostInitiaor
● Get-HostInitiator
● Set-HostInitiator
● Remove-HostInitiator

New-HostInitiator
Creates a host initiator on the Unity array. If Ignored flag is provided, initiator will not be part of host access.
For EnableLunZ flag, LunZ is enabled if set to true and not enabled when set to false. By default, LunZ is enabled.
For IsArraySerialNumber flag, Unit Serial Number is Array if set to true and is LUN when set to false. By default, Unit Serial
Number is Array.

Get-HostInitiator
Gets the details of the host initiators on a Unity array. The options include listing all host initiators on the array, getting host
initiator by ID, host ID, or initiator ID.

24 Unity cmdlets
Set-HostInitiator
Modifies a host initiator on the Unity Array. Initiator associated to host, initiator source type, failover mode can all be changed.
If iIgnored, EnableLunZ, IsArraySerialNumber, AddToWhiteList flags can be set. If Ignored flag is true, initiator will not be part of
host access.
ChapUser, ChapSecret and ChapSecretType can be modified for iSCSI initiator.
ChapCredential can be used for ChapUser and ChapSecret. If ChapCredential is provided, ChapUser or ChapSecret is not
allowed.

Remove-HostInitiator
Removes one or more host initiators from the Unity array.

Cmdlets for Snapshot operations


These commands are available for Snapshot operations:
● New-Snapshot
● Get-Snapshot
● Set-Snapshot
● Copy-Snapshot
● Refresh-Snapshot
● Replicate-Snapshot
● Restore-Snapshot
● Attach-Snapshot
● Detach-Snapshot
● Remove-Snapshot

New-Snapshot
Creates a snapshot for block or file system based storage source on the Unity array. Local retention policy can be set as:
1. Pool automatic deletion (AutoDelete),
2. Retain until specified time (RetentionDuration),
3. No Automatic deletion (when both AutoDelete and RetentionDuration are not set).
Snapshot can also be replicated to the destination with remote retention policy same as source
(RemoteRetentionSameAsSource) or one of the 3 retention policies. Unisphere 5.1.0 or greater is needed for optional parameter
RemoteRetentionPolicies.
RemoteRetentionPolicies is a dictionary with remote system ID as the key and array of following values:
1. Remote retention same as source is a boolean value and indicates if the remote policy is same as replication session source.
Default value is false,
2. Remote auto delete is a boolean value and indicates if the snapshot can be automatically deleted when system threshold is
reached on destination. Default value is false,
3. Remote retention duration is a long value and is a period of time in seconds to retain the replicated snapshot on the
destination.
Default value is 0. The array must have three items and to not set a value, use $null or false for boolean values (remote
retention same as source & remote auto delete) and $null or 0L for long(remote retention duration).

Get-Snapshot
Gets details of the snapshots on a Unity array. The options include listing all snapshots on the array, getting snapshot by ID,
name, or source ID.

Unity cmdlets 25
Set-Snapshot
Modifies a snapshot name, description, retention policy (auto delete or retention duration), IO limit policy, and host access on
the Unity array.
Name cannot be modified for snapshots of file systems.
For IOLimitPolicyId, if "None" (case insensitive) is provided, existing property value will be removed from the Snapshot.
Optional HostAccess parameter is a dictionary with host ID as key and snapshot access level as value. Access level permissions
should be either 'ReadOnly' or 'ReadWrite'. If an empty dictionary is provided, all existing host accesses will be removed from
the snapshot.

Copy-Snapshot
Create copies of snapshot on the Unity array.
If copy snapshot name is not provided, default name is generated with pattern 'UTC_yyyy-mm-dd_HH-mm-ss'.
If source snapshot is attached, the new copy has the same source snapshot as a parent and is marked as not modified.
If source snapshot is not attached, the behavior depends on child parameter. By default, child parameter is false and the new
copy is created as a sibling of source snapshot.

Refresh-Snapshot
Refreshes the contents of a snapshot from its parent storage resource. To prevent the data loss, it is recommended that you
create a copy of the snapshot by providing a copy name.

Replicate-Snapshot
Replicates a snapshot on the Unity array. Unisphere 5.1.0 or greater is needed for optional parameter RemoteRetentionPolicies.
RemoteRetentionPolicies is a dictionary with remote system ID as the key and array of following values:
1. Remote retention same as source is a boolean value and indicates if the remote policy is same as replication session source.
Default value is false,
2. Remote auto delete is a boolean value and indicates if the snapshot can be automatically deleted when system threshold is
reached on destination. Default value is false,
3. Remote retention duration is a long value and is a period of time in seconds to retain the replicated snapshot on the
destination. Default value is 0.
The array must have three items and to not set a value, use $null or false for boolean values (remote retention same as source
& remote auto delete) and $null or 0L for long(remote retention duration).

Restore-Snapshot
Restores the snapshot to the associated storage resource. If copy snapshot name is not provided, default name is generated
with pattern 'UTC_yyyy-mm-dd_HH-mm-ss'.

Attach-Snapshot
Attaches a snapshot to hosts on Unity array. To preserve the integrity of any Read/Write snapshots, it is recommended to
create a copy of the snapshot before attaching it to a host. Optional HostAccess parameter is a dictionary with host ID as key
and snapshot access level as value. Access level permissions should be either 'ReadOnly' or 'ReadWrite'.

Detach-Snapshot
Detaches a snapshot from hosts on Unity array.

26 Unity cmdlets
Remove-Snapshot
Removes one or more snapshots from the Unity array.

Cmdlets for SnapshotSchedule operations


These commands are available for SnapshotSchedule operarions:
1. New-SnapshotSchedule
2. Get-SnapshotSchedule
3. Set-SnapshotSchedule
4. Remove-SnapshotSchedule

New-SnapshotSchedule
Creates a snapshot schedule with hourly or daily/weekly frequency, or both.

Get-SnapshotSchedule
Gets details of the snapshot schedules on a Unity array. The options include listing all snapshot schedules on the array and
getting snapshot schedule by ID or name.

Set-SnapshotSchedule
Modifies a snapshot schedule with hourly, daily/weekly frequency, or both.
To unset an hourly rule, set hourly as 0.
To unset a daily/weekly rule, set daily/weekly as empty array.
If a snapshot schedule has only one rule, the rule cannot be unset.

Remove-SnapshotSchedule
Removes one or more snapshot schedules from the Unity array.

Cmdlets for Replication operations


These commands are available for Replication operations:
1. New-RemoteSystem
2. Get-RemoteSystem
3. Set-RemoteSystem
4. Remove-RemoteSystem
5. New-ReplicationSession
6. Get-ReplicationSession
7. Set-ReplicationSession
8. Pause-ReplicationSession
9. Resume-ReplicationSession
10. Sync-ReplicationSession
11. Remove-ReplicationSession
12. Failover-ReplicationSession
13. Failback-ReplicationSession
14. PreserveAsync-ReplicationSession

Unity cmdlets 27
New-RemoteSystem
Creates a remote system configuration for the local system to access. Please ensure that you have set up relevant replication
interface pairs, one on each SP, on the source and destination systems prior to this operation.
LocalUserName and LocalPassword (or LocalCredential) are needed only if the user is different than the one used to
connect to the local array. Unisphere 5.1.0 or greater is needed for optional parameter BandwidthSchedules. The value of
the BandwidthSchedules is an object array with each entry representing a bandwidth schedule. Each bandwidth schedule is an
object array consisting of exactly three items, an object array for hours (fromHour and toHour), an object array for daysOfWeek
and an integer for bandwidth.
To not set value for hours or days, use empty array.
To not set value for bandwidth, use -1.
1. The first item must be an object array containing exactly two integers representing fromHour and toHour. The fromHour is
the starting hour ranging from 0 to 23 indicating when this bandwidth schedule applies. The value of the fromHour should
be smaller than the toHour value. The fromHour will be based on the schedule time zone configured for snapshot schedules
and asynchronous replication bandwidth schedules. The toHour is the ending hour ranging from 1 to 24 indicating when this
bandwidth schedule applies. The value of the toHour should be bigger than the fromHour value. The toHour will be based on
the schedule time zone configured for snapshot schedules and asynchronous replication bandwidth schedules.
2. The second item must be an object array containing strings representing days of a week. It indicates when this bandwidth
schedule applies. The array could contain one or more days of a week, "Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday" and "Saturday".
3. The third item must be bandwidth. It is an integer indicating the maximum bandwidth value in KB/s ranging from 0
to 524288000. If not specified, available bandwidth up to physical network bandwidth will be used. The following is an
example with four bandwidth schedules: @(@(@(0, 2), @("Sunday", "Monday"), 100000), @(@(3, 4), @(), 200000),
@(@(), @("Tuesday", "Wednesday"), 300000), @(@(5, 6), @("Thursday", "Friday"), -1)).

Get-RemoteSystem
Gets details of the remote systems on a Unity array. The options include listing all remote systems on the array and getting
remote system by ID or name.

Set-RemoteSystem
Modifies remote system management address, user, password, connection type, and bandwidth schedules. At least one property
needs to be changed. Existing property values will be replaced with the new values. Unisphere 5.1.0 or greater is needed for
BandwidthSchedules.
If an empty array is provided for BandwidthSchedules, all existing schedules will be removed. The value of the
BandwidthSchedules is an object array with each entry representing a bandwidth schedule. Each bandwidth schedule is an
object array consisting of exactly three items, an object array for hours (fromHour and toHour), an object array for daysOfWeek
and an integer for bandwidth. To not set value for hours and days, use empty array. To not set value for bandwidth, use -1.
1. The first item must be an object array containing exactly two integers representing fromHour and toHour. The fromHour is
the starting hour ranging from 0 to 23 indicating when this bandwidth schedule applies. The value of the fromHour should
be smaller than the toHour value. The fromHour will be based on the schedule time zone configured for snapshot schedules
and asynchronous replication bandwidth schedules. The toHour is the ending hour ranging from 1 to 24 indicating when this
bandwidth schedule applies. The value of the toHour should be bigger than the fromHour value. The toHour will be based on
the schedule time zone configured for snapshot schedules and asynchronous replication bandwidth schedules.
2. The second item must be an object array containing strings representing days of a week. It indicates when this bandwidth
schedule applies. The array could contain one or more days of a week, "Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday" and "Saturday".
3. The third item must be bandwidth. It is an integer indicating the maximum bandwidth value in KB/s ranging from 0
to 524288000. If not specified, available bandwidth up to physical network bandwidth will be used. The following is an
example with four bandwidth schedules: @(@(@(0, 2), @("Sunday", "Monday"), 100000), @(@(3, 4), @(), 200000),
@(@(), @("Tuesday", "Wednesday"), 300000), @(@(5, 6), @("Thursday", "Friday"), -1)).

Remove-RemoteSystem
Removes one or more remote systems from the Unity array.

28 Unity cmdlets
New-ReplicationSession
Creates a replication session on the Unity array. Replication can be configured between like type resources.
Interface options are optional and applicable to remote replication. Unisphere 5.1.0 or greater is needed for
optional parameters CascadeReplicatedSnap, SrcCommonBaseSnapId, DstCommonBaseSnapId, SkipSnapSignatureCheck,
EnableCommonBaseAutoSearch and OverwriteDestination.

Get-ReplicationSession
Gets details of the replication sessions on a Unity array. The options include listing all replication sessions on the array and
getting replication session by ID or name.

Set-ReplicationSession
Modifies the properties of a replication session.

Pause-ReplicationSession
Pauses a replication session on a Unity array. This can be applied to replication session when in the OK state.

Resume-ReplicationSession
Resumes a replication session on a Unity array. This can be applied on a replication session when it's operational status is
reported as failed over or paused. ForceFullCopy option is needed when replication session goes out of sync due to a fault.

Sync-ReplicationSession
Synchronizes a replication session on a Unity array. This operation can be applied to initiate a synchronization on demand
independent of type of session (auto or manual sync).

Remove-ReplicationSession
Removes one or more replication sessions from the Unity array.

Failover-ReplicationSession
Fails over a replication session on a Unity array. Note that if a failover occurs and data is written to the new source (original
destination), new snapshots are taken, and finally a failback occurs. When this occurs, then those snapshots will get replicated
to the new destination (original source). However, we maintain the local retention for the original source and the remote
retention for the original destination. If the same scenario occurs but a resume is requested instead of failback (essentially
switching the replication direction), then the local and remote retentions are switched so that the local retention policy is
applied on the new source and the remote policy is applied on the new destination.

Failback-ReplicationSession
Fails back a replication session on a Unity array. This can be applied on a replication session that is failed over. Fail back will
synchronize the changes done to the original destination back to the original source site, and it will restore the original direction
of the session.

Unity cmdlets 29
PreserveAsync-ReplicationSession
Preserves an async replication session. Preserve recreates one prior async replication from the original source. Preserve tries to
find the prior async session on the destination remote system identified by the RemoteSystemId parameter, and if successful,
removes the existing session, creates a new async session to the remote system, and starts the replication process. If there is
a common base snapshot available, then that will be used to optimize the initial copy. Preserve requires that the original async
sessions are in the hibernated state. It also requires that there is not already an async replication from the local NAS server to
the remote system.

NOTE: This is only applicable for file system storage resource on Unity.

Cmdlets for File System operations


These commands are available for File System operations:
● New-Filesystem
● Get-Filesystem
● Set-Filesystem
● Remove-Filesystem

New-Filesystem
Creates a file system on the Unity array.
Ensure there is a NAS server configured to support the desired file system type, SMB (CIFS), NFS or multiprotocol. Ensure that
a pool exists with enough available storage space. Unless otherwise specified, SMB is the same as CIFS.

Get-Filesystem
Gets details of the file systems on a Unity array. The options include listing all file systems on the array, getting file system by
ID, name, or NAS server ID.

Set-Filesystem
Modifies a file system. At least one property needs to be changed. Existing property values will be replaced with the
new values. For Description, if an empty string is provided, existing description will be removed from the file system. For
SnapshotScheduleId, if "None" (case insensitive) is provided, existing snapshot schedule will be removed from the file system.

Remove-Filesystem
Removes one or more file systems from the Unity array. If ForceSnapshotDeletion is used, file system snapshots will be deleted
along with the file systems.

Cmdlets for NfsShare operations


These commands are available for NfsShare operations:
● New-NfsShare
● Get-NfsShare
● Set-NfsShare
● Remove-NfsShare

30 Unity cmdlets
New-NfsShare
Creates an NFS share for a file system or file system snapshot on the Unity array.
Host access for an NFS share can be configured with a host list either by using registered hosts (i.e. host ID) or by using a
string. Providing both host ID and string is not allowed. Using host string allows you to specify hosts without first having to
register them. Host names, IP addresses, subnets, netgroups, and DNS domains can be specified in the host string.
ExportOption parameter must be specified when configuring host access since it defines whether the access to the NFS share
per host is defined according to the host ID or host string list.

Get-NfsShare
Gets details of the NFS shares on a Unity array. The options include listing all NFS shares on the array, getting NFS share by ID,
name, or file system ID.

Set-NfsShare
Modifies an NFS share for a file system or file system snapshot on the Unity array. Also modifies the host access configured by
replacing the existing host ID or host string list.
Host ID list can be unset by specifying an empty list and host string can be unset by specifying an empty string.

Remove-NfsShare
Removes one or more NFS shares for a file system or file system snapshot from the Unity array.

Cmdlets for SMB (CIFS) Share operations


These commands are available for SmbShare operations:
● New-SmbShare
● Get-SmbShare
● Set-SmbShare
● Remove-SmbShare
● Get-Ace
● Set-Ace

New-SmbShare
Creates an SMB share for a file system or file system snapshot on the Unity array.
The AddACE parameter is a dictionary with user/group security identifier (SID) as key, and access type and level as value.
Accepted access type values are 'Deny', 'Grant', and 'None'. Accepted access level values are 'Read', 'Write', and 'Full'.
In this command, SMB share is corresponding to the related CIFS resource in Unisphere REST API.

Get-SmbShare
Gets details of the SMB shares on a Unity array.
The options include listing all SMB shares on the array, getting SMB share by ID, name, or file system ID.
In this command, SMB share is corresponding to the related CIFS resource in Unisphere REST API.

Unity cmdlets 31
Set-SmbShare
Modifies an SMB share for a file system or file system snapshot on the Unity array.
The AddACE parameter is a dictionary with user/group security identifier (SID) as key, and access type and level as value.
Accepted access type values are 'Deny', 'Grant', and 'None'. Accepted access level values are 'Read', 'Write', and 'Full'. Use
'None' to remove a SID from the access list.
In this command, SMB share is corresponding to the related CIFS resource in Unisphere REST API.

Remove-SmbShare
Removes one or more SMB shares for a file system or file system snapshot from the Unity array.
In this command, SMB share is corresponding to the related CIFS resource in Unisphere REST API.

Get-Ace
Gets the ACEs of an SMB share.

Set-Ace
Sets the ACEs for an SMB share.

Cmdlets for TreeQuota management


These commands are available for TreeQuota management operations:
● New-TreeQuota
● Get-TreeQuota
● Set-TreeQuota
● Remove-TreeQuota
● Update-TreeQuota

New-TreeQuota
Creates a new tree quota on the specified file system and path. The path is relative to the file system root. If the hard or soft
limits are not specified then there is no limit.

Get-TreeQuota
Gets details of the tree quotas on a Unity array. The options include listing all tree quotas on the array, getting tree quota by ID
or file system ID.

Set-TreeQuota
Modifies the description, hard, and soft limits of a tree quota. The limits can be set to unlimited by specifying 0 for both the
hard and soft limits or for just the soft limit.

Remove-TreeQuota
Removes one or more tree quotas from the Unity array.

32 Unity cmdlets
Update-TreeQuota
Updates all tree quota objects within a file system.
The command is only available for the quota configuration instance related to the file system. Most properties in the tree quota
object are kept up to date, however two properties relating to statistic data (remainingGracePeriod and sizeUsed) are updated
only per 24 hours by default. This command will manually update TreeQuota objects including their statistic properties in a file
system immediately.

Cmdlets for UserQuota management


These commands are available for UserQuota management operations:
● New-UserQuota
● Get-UserQuota
● Set-UserQuota
● Remove-UserQuota
● Update-UserQuota

New-UserQuota
Creates a new user quota on the specified file system or tree quota. The user can be specified as either UID, Windows user
name, or Unix user name.

Get-UserQuota
Gets details of the user quotas on a Unity array. The options include listing all user quotas on the array, getting user quota by ID,
tree quote ID, file system ID, or user ID.

Set-UserQuota
Changes the hard and soft limits of a user quota. Setting both the hard and soft limits to 0 results in the user quota being
removed.

Remove-UserQuota
Removes a user quota.

Update-UserQuota
Update all user quota objects within a file system or a quota tree.
Most properties in the user quota object are kept up to date, however two properties relating to statistic data
(remainingGracePeriod and sizeUsed) are updated only per 24 hours by default. This command will manually update user quota
objects including their statistic properties in a file system or a quota tree immediately.

Cmdlets for QuotaConfig management


These commands are available for QuotaConfig management:
● Get-QuotaConfig
● Set-QuotaConfig

Unity cmdlets 33
Get-QuotaConfig
Gets details of the quota configurations on a Unity array.

Set-QuotaConfig
Modifies a quota configuration for a file system or quota tree.

Allows enabling/disabling of user quotas on a file system or quota tree. Allows changing the quota usage computation to be via
the number of file system blocks or file size, sets the default hard and soft limits, and soft limit grace period.
In order to determine the quota config ID you can run the following command if you know the file system ID whose quota config
needs changing:

PS C:\> Get-QuotaConfig $unity -FilesystemId fs_5625

34 Unity cmdlets

You might also like