This is the built-in help made by Microsoft for the command 'Set-Volume', in PowerShell version 3 - as retrieved from
Windows version 'Microsoft Windows Server 2012 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.
Sets or changes the file system label of an existing volume.
Set-Volume [-DriveLetter] <Char[]> [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-NewFileSystemLabel <String>] [-PassThru
[<SwitchParameter>]] [-ThrottleLimit <Int32>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Set-Volume [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-NewFileSystemLabel <String>] [-PassThru [<SwitchParameter>]]
[-ThrottleLimit <Int32>] -Path <String[]> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Set-Volume [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-NewFileSystemLabel <String>] [-PassThru [<SwitchParameter>]]
[-ThrottleLimit <Int32>] -ObjectId <String[]> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Set-Volume [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-NewFileSystemLabel <String>] [-PassThru [<SwitchParameter>]]
[-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Set-Volume [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-NewFileSystemLabel <String>] [-PassThru [<SwitchParameter>]]
[-ThrottleLimit <Int32>] -FileSystemLabel <String[]> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
The Set-Volume cmdlet sets or changes the file system label of an existing volume.
This cmdlet returns either Success or Failure and corresponding error code as follows.
Type: Volume
Name: Vol
Remarks: InputObj
Type: String []
Name: Pathname
Remarks: Wildcards disabled
Type: String []
Name: DriveLetter
Remarks: InputObj
Type: String []
Name: FileSystemLabel
Remarks: New Label
<
Format-Volume
Get-Volume
Optimize-Volume
Repair-Volume
<
EXAMPLE 1
PS C:\> Set-Volume -FileSystemLabel "Test" -NewFileSystemLabel "TestData"
This example changes the file system label from test to TestData.
EXAMPLE 2
PS C:\> Format-Volume -InputObject $PartitionObject -FileSystem NTFS -NewFileSystemLabel "TestData" -ClusterSize (8K) -ShortFileNameSupport
$False
This example uses the specified Partition object as an input to format the volume on this partition with the NTFS file system, using the file
system label testdata with a cluster size of 8K, and with short filename support disabled.