PowerShell Logo Small

Set-Volume



This is the built-in help made by Microsoft for the command 'Set-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.

SYNOPSIS

Sets or changes the file system label of an existing volume.

SYNTAX


Set-Volume [-DriveLetter] <Char[]> [-AsJob] [-CimSession <CimSession[]>] [-NewFileSystemLabel <String>] [-PassThru] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf]
[<CommonParameters>]
Set-Volume [-AsJob] [-CimSession <CimSession[]>] [-NewFileSystemLabel <String>] [-PassThru] [-ThrottleLimit <Int32>] -FileSystemLabel <String[]> [-Confirm] [-WhatIf]
[<CommonParameters>]
Set-Volume [-AsJob] [-CimSession <CimSession[]>] [-NewFileSystemLabel <String>] [-PassThru] [-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [-Confirm] [-WhatIf]
[<CommonParameters>]
Set-Volume [-AsJob] [-CimSession <CimSession[]>] [-NewFileSystemLabel <String>] [-PassThru] [-ThrottleLimit <Int32>] -ObjectId <String[]> [-Confirm] [-WhatIf]
[<CommonParameters>]
Set-Volume [-AsJob] [-CimSession <CimSession[]>] [-NewFileSystemLabel <String>] [-PassThru] [-ThrottleLimit <Int32>] -Path <String[]> [-Confirm] [-WhatIf]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


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



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=307039
Format-Volume
Get-Volume
Optimize-Volume
Repair-Volume

REMARKS

<

Examples


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.