This is the built-in help made by Microsoft for the command 'Optimize-Volume', in PowerShell version 5 - as retrieved from
Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.
For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.
Optimizes a volume.
Optimize-Volume [-DriveLetter] <Char[]> [-Analyze] [-AsJob] [-CimSession <CimSession[]>] [-Defrag] [-ReTrim] [-SlabConsolidate] [-ThrottleLimit <Int32>] [-TierOptimize]
[-Confirm] [-WhatIf] [<CommonParameters>]
Optimize-Volume [-Analyze] [-AsJob] [-CimSession <CimSession[]>] [-Defrag] [-ReTrim] [-SlabConsolidate] [-ThrottleLimit <Int32>] [-TierOptimize] -Path <String[]> [-Confirm]
[-WhatIf] [<CommonParameters>]
Optimize-Volume [-Analyze] [-AsJob] [-CimSession <CimSession[]>] [-Defrag] [-ReTrim] [-SlabConsolidate] [-ThrottleLimit <Int32>] [-TierOptimize] -ObjectId <String[]>
[-Confirm] [-WhatIf] [<CommonParameters>]
Optimize-Volume [-Analyze] [-AsJob] [-CimSession <CimSession[]>] [-Defrag] [-ReTrim] [-SlabConsolidate] [-ThrottleLimit <Int32>] [-TierOptimize] -InputObject <CimInstance[]>
[-Confirm] [-WhatIf] [<CommonParameters>]
Optimize-Volume [-Analyze] [-AsJob] [-CimSession <CimSession[]>] [-Defrag] [-ReTrim] [-SlabConsolidate] [-ThrottleLimit <Int32>] [-TierOptimize] -FileSystemLabel <String[]>
[-Confirm] [-WhatIf] [<CommonParameters>]
The Optimize-Volume cmdlet optimizes a volume, performing such tasks on supported volumes and system SKUs as defragmentation, trim, slab consolidation, and storage tier
processing.
If no parameter is specified, then the default operation will be performed per the drive type as follows.
-- HDD, Fixed VHD, Storage Space. -Analyze -Defrag.
-- Tiered Storage Space. -TierOptimize.
-- SSD with TRIM support. -Retrim.
-- Storage Space (Thinly provisioned), SAN Virtual Disk (Thinly provisioned), Dynamic VHD, Differencing VHD. -Analyze -SlabConsolidate -Retrim.
-- SSD without TRIM support, Removable FAT, Unknown. No operation.
<
Online Version: http://go.microsoft.com/fwlink/?LinkID=307010
Format-Volume
Get-Volume
Repair-Volume
Set-Volume
<
Example 1: Perform TRIM optimization
PS C:\>Optimize-Volume -DriveLetter H -ReTrim –Verbose
This example optimizes drive H by re-sending Trim requests. This is useful on SSD media, and thinly provisioned storage.
Example 2: Analyze a volume
PS C:\>Optimize-Volume -DriveLetter H -Analyze –Verbose
This example reports only the current optimization state of drive H.
Example 3: Defragment a volume
PS C:\>Optimize-Volume -DriveLetter H -Defrag –Verbose
This example defragments drive H.
Example 4: Perform slab consolidation
PS C:\>Optimize-Volume -DriveLetter H -SlabConsolidate –Verbose
This example performs slab consolidation on the storage space backing volume H.
Example 5: Tier optimize a volume
PS C:\>Optimize-Volume -DriveLetter H -TierOptimize
This example performs tier optimization on the tiered storage space backing volume H.