vSphere PowerCLI Cmdlets Reference

Set-Datastore

Synopsis

Changes the properties of the specified datastore.

Syntax

Set-Datastore [-Datastore] <Datastore> [-Name] <String> [-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

NameDescriptionRequired?Pipeline InputDefault Value
DatastoreSpecify the datastore whose properties you want to change.truetrue (ByValue)
NameSpecify a new name for the datastore. Do not use slash (/), backslash (\), and percent (%) characters in datastore names.truefalse
ServerSpecify 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
WhatIfIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse
ConfirmIf 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

Return Type

Datastore

Notes

Examples

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

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

Renames the Datastore1 datastore to Datastore2.


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