vSphere PowerCLI Reference

Set-Datastore

Synopsis

Changes the properties of the specified datastore.

Syntax

Set-Datastore [-Datastore] <Datastore[]> [[-Name] <String>] [-CongestionThresholdMillisecond <Int32>] [-StorageIOControlEnabled [<Boolean>]] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Datastore
New-Datastore
Remove-Datastore

Detailed Description

Changes the properties of the specified datastore. You can use the following characters in a path, but not in a datastore name: slash (/), backslash (\), and percent (%).

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
DatastoreDatastore[]Specify the datastore whose properties you want to change.truetrue (ByValue)
NameStringSpecify a new name for the datastore. Do not use slash (/), backslash (\), and percent (%) characters in datastore names.falsefalse
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse$true
CongestionThresholdMillisecondInt32Specify the latency period beyond which the storage array is considered congested. The range of this value is between 10 to 100 milliseconds.falsefalse
ServerVIServer[]Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse
StorageIOControlEnabledBooleanIndicate whether you want to enable the IO control.falsefalse
WhatIfSwitchParameterIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

Datastore

Notes

Examples

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

Get-Datastore -Name Datastore1 | Set-Datastore -Name Datastore2

Renames the Datastore1 datastore to Datastore2.

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

Set-Datastore $datastore1, $datastore2 -StorageIOControlEnabled $true -CongestionThresholdMillisecond 80

Enables the Storage IO Control and set a congestion threshold of 80 milliseconds for the specified datastores.


Copyright © 1998 - 2011 VMware, Inc. All rights reserved.