< Back

Set-Volume

Wed Jan 30, 2019 6:04 pm

NAME Set-Volume



SYNOPSIS

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





SYNTAX

Set-Volume [-CimSession <Microsoft.Management.Infrastructure.CimSession[]>] [-NewFileSystemLabel <System.String>] [-ThrottleLimit <System.Int32>]

-DriveLetter <System.Char> [<CommonParameters>]



Set-Volume [-CimSession <Microsoft.Management.Infrastructure.CimSession[]>] [-DedupMode {Disabled | GeneralPurpose | HyperV | Backup | NotAvailable}]

[-ThrottleLimit <System.Int32>] [<CommonParameters>]



Set-Volume [-CimSession <Microsoft.Management.Infrastructure.CimSession[]>] [-NewFileSystemLabel <System.String>] [-ThrottleLimit <System.Int32>]

[<CommonParameters>]



Set-Volume [-CimSession <Microsoft.Management.Infrastructure.CimSession[]>] [-NewFileSystemLabel <System.String>] [-ThrottleLimit <System.Int32>]

-FileSystemLabel <System.String> [<CommonParameters>]



Set-Volume [-CimSession <Microsoft.Management.Infrastructure.CimSession[]>] [-NewFileSystemLabel <System.String>] [-ThrottleLimit <System.Int32>] -Path

<System.String> [<CommonParameters>]



Set-Volume [-CimSession <Microsoft.Management.Infrastructure.CimSession[]>] [-NewFileSystemLabel <System.String>] [-ThrottleLimit <System.Int32>]

-UniqueId <System.String> [<CommonParameters>]



Set-Volume [-CimSession <Microsoft.Management.Infrastructure.CimSession[]>] [-DedupMode {Disabled | GeneralPurpose | HyperV | Backup | NotAvailable}]

[-ThrottleLimit <System.Int32>] -UniqueId <System.String> [<CommonParameters>]



Set-Volume [-CimSession <Microsoft.Management.Infrastructure.CimSession[]>] [-DedupMode {Disabled | GeneralPurpose | HyperV | Backup | NotAvailable}]

[-ThrottleLimit <System.Int32>] -Path <System.String> [<CommonParameters>]



Set-Volume [-CimSession <Microsoft.Management.Infrastructure.CimSession[]>] [-DedupMode {Disabled | GeneralPurpose | HyperV | Backup | NotAvailable}]

[-ThrottleLimit <System.Int32>] -FileSystemLabel <System.String> [<CommonParameters>]



Set-Volume [-CimSession <Microsoft.Management.Infrastructure.CimSession[]>] [-DedupMode {Disabled | GeneralPurpose | HyperV | Backup | NotAvailable}]

[-ThrottleLimit <System.Int32>] -DriveLetter <System.Char> [<CommonParameters>]





DESCRIPTION

The Set-Volume cmdlet sets or changes the file system label of an existing volume.





PARAMETERS

-CimSession [<Microsoft.Management.Infrastructure.CimSession[]>]

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or

Get-CimSession cmdlet. The default is the current session on the local computer.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-DedupMode [<Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetVolume.DedupMode>]

Specifies the Data Deduplication mode to use for the volume, if Data Deduplication is enabled on this volume. The acceptable values for this

parameter are:



-- Backup

-- Disabled

-- GeneralPurpose

-- Hyper-V

-- NotAvailable



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-DriveLetter <System.Char>

Specifies a letter used to identify a drive or volume in the system.



Required? true

Position? named

Default value none

Accept pipeline input? true(ByValue)

Accept wildcard characters? false



-FileSystemLabel <System.String>

Specifies the file system label of the object. The acceptable values for this parameter include: NTFS and ReFS.



Required? true

Position? named

Default value none

Accept pipeline input? true(ByValue)

Accept wildcard characters? false



-NewFileSystemLabel [<System.String>]

Specifies a new file system label to use.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-Path <System.String>

Contains valid path information.



Required? true

Position? named

Default value none

Accept pipeline input? true(ByValue)

Accept wildcard characters? false



-ThrottleLimit [<System.Int32>]

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is

entered, then Windows PowerShell???? calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the

computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-UniqueId <System.String>

Specifies a unique ID.



Required? true

Position? named

Default value none

Accept pipeline input? true(ByValue)

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

Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Partition

http://msdn.microsoft.com/library/windo ... 30524.aspx





The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The

path after the pound sign (#) provides the namespace and class name for the underlying WMI object.



Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Volume

http://msdn.microsoft.com/library/windo ... 30604.aspx





The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The

path after the pound sign (#) provides the namespace and class name for the underlying WMI object.





OUTPUTS

Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Partition

http://msdn.microsoft.com/library/windo ... 30524.aspx





The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The

path after the pound sign (#) provides the namespace and class name for the underlying WMI object.



Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Volume

http://msdn.microsoft.com/library/windo ... 30604.aspx





The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The

path after the pound sign (#) provides the namespace and class name for the underlying WMI object.





Example 1: Set the file system label



PS C:\\>Set-Volume -FileSystemLabel "Test" -NewFileSystemLabel "TestData"



This example changes the file system label from test to TestData.





Example 2: Format the volume



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.







RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=816493

Format-Volume

Get-Volume

Optimize-Volume

Repair-Volume