< Back
Set-Datastore
Post
NAME Set-Datastore
SYNOPSIS
This cmdlet modifies the properties of the specified datastore.
SYNTAX
Set-Datastore [-Datastore] <Datastore[]> [[-Name] <String>] [-CongestionThresholdMillisecond <Int32>] [-Server
<VIServer[]>] [-StorageIOControlEnabled <Boolean>] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-Datastore [-Datastore] <Datastore[]> [-EvacuateAutomatically] -MaintenanceMode <Boolean> [-RunAsync] [-Server
<VIServer[]>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
This cmdlet modifies 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
-CongestionThresholdMillisecond <Int32>
Specifies the latency period beyond which the storage array is considered congested. The range of this value
is between 10 to 100 milliseconds.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Datastore <Datastore[]>
Specifies the datastore whose properties you want to change.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-EvacuateAutomatically [<SwitchParameter>]
Specifies whether you want to automatically migrate all virtual machines to another datastore if the value of
MaintenanceMode is $true. When the Storage DRS automation level is set to Fully Automated, you do not need to
specify the EvacuateAutomatically parameter because Storage DRS will migrate all virtual machines
automatically.
If EvacuateAutomatically is specified, the SDRS placement and migration recommendations are automatically
applied. If SDRS generates cluster DRS faults, an error report is displayed and the operation is cancelled.
The report contains information about each datastore cluster DRS fault.
If EvacuateAutomatically is not specified, an error report is displayed and the operation is cancelled. The
error report contains information about each SDRS recommendation. If SDRS generates cluster DRS faults, an
error report is displayed and the operation is cancelled. The error report contains information about each
fault.
If EvacuateAutomatically is explicitly set to false, the cmdlet blocks execution without displaying an error
message. If SDRS generates datastore cluster DRS faults, the cmdlet stops responding and an error report is
displayed. The report contains information about each cluster DRS fault.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-MaintenanceMode <Boolean>
Specifies whether you want to put the datastore in maintenance mode. The operation completes when no virtual
machines are present and no provisioning processes are running on the datastore.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
Specifies a new name for the datastore. Do not use slash (/), backslash (\\), and percent (%) characters in
datastore names.
Required? false
Position? 2
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-RunAsync [<SwitchParameter>]
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the
output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help
About_RunAsync" in the VMware PowerCLI console.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Server <VIServer[]>
Specifies the vCenter Server systems 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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-StorageIOControlEnabled <Boolean>
Indicates whether you want to enable the IO control.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
If 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.
Required? false
Position? named
Default value $true
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are
modified.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Zero or more modified Datastore objects
NOTES
-------------------------- 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.
-------------------------- Example 3 --------------------------
Get-Datastore -Name 'MyDatastore1' | Set-Datastore -MaintenanceMode $true -EvacuateAutomatically
Puts the MyDatastore1 datastore in maintenance mode and specifies that all virtual machines on the datastore will
be automatically migrated to another datastore.
RELATED LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... store.html
Get-Datastore
New-Datastore
Remove-Datastore
Move-Datastore
SYNOPSIS
This cmdlet modifies the properties of the specified datastore.
SYNTAX
Set-Datastore [-Datastore] <Datastore[]> [[-Name] <String>] [-CongestionThresholdMillisecond <Int32>] [-Server
<VIServer[]>] [-StorageIOControlEnabled <Boolean>] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-Datastore [-Datastore] <Datastore[]> [-EvacuateAutomatically] -MaintenanceMode <Boolean> [-RunAsync] [-Server
<VIServer[]>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
This cmdlet modifies 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
-CongestionThresholdMillisecond <Int32>
Specifies the latency period beyond which the storage array is considered congested. The range of this value
is between 10 to 100 milliseconds.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Datastore <Datastore[]>
Specifies the datastore whose properties you want to change.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-EvacuateAutomatically [<SwitchParameter>]
Specifies whether you want to automatically migrate all virtual machines to another datastore if the value of
MaintenanceMode is $true. When the Storage DRS automation level is set to Fully Automated, you do not need to
specify the EvacuateAutomatically parameter because Storage DRS will migrate all virtual machines
automatically.
If EvacuateAutomatically is specified, the SDRS placement and migration recommendations are automatically
applied. If SDRS generates cluster DRS faults, an error report is displayed and the operation is cancelled.
The report contains information about each datastore cluster DRS fault.
If EvacuateAutomatically is not specified, an error report is displayed and the operation is cancelled. The
error report contains information about each SDRS recommendation. If SDRS generates cluster DRS faults, an
error report is displayed and the operation is cancelled. The error report contains information about each
fault.
If EvacuateAutomatically is explicitly set to false, the cmdlet blocks execution without displaying an error
message. If SDRS generates datastore cluster DRS faults, the cmdlet stops responding and an error report is
displayed. The report contains information about each cluster DRS fault.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-MaintenanceMode <Boolean>
Specifies whether you want to put the datastore in maintenance mode. The operation completes when no virtual
machines are present and no provisioning processes are running on the datastore.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
Specifies a new name for the datastore. Do not use slash (/), backslash (\\), and percent (%) characters in
datastore names.
Required? false
Position? 2
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-RunAsync [<SwitchParameter>]
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the
output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help
About_RunAsync" in the VMware PowerCLI console.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Server <VIServer[]>
Specifies the vCenter Server systems 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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-StorageIOControlEnabled <Boolean>
Indicates whether you want to enable the IO control.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
If 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.
Required? false
Position? named
Default value $true
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are
modified.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Zero or more modified Datastore objects
NOTES
-------------------------- 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.
-------------------------- Example 3 --------------------------
Get-Datastore -Name 'MyDatastore1' | Set-Datastore -MaintenanceMode $true -EvacuateAutomatically
Puts the MyDatastore1 datastore in maintenance mode and specifies that all virtual machines on the datastore will
be automatically migrated to another datastore.
RELATED LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... store.html
Get-Datastore
New-Datastore
Remove-Datastore
Move-Datastore