external help file | Module Name | ms.date | online version | schema | title |
---|---|---|---|---|---|
Volume.cdxml-help.xml |
Storage |
10/29/2017 |
2.0.0 |
Set-Volume |
Sets or changes the file system label of an existing volume.
Set-Volume [-DriveLetter] <Char[]> [-NewFileSystemLabel <String>] [-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>] [-AsJob] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-Volume -ObjectId <String[]> [-NewFileSystemLabel <String>] [-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>] [-AsJob] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-Volume -Path <String[]> [-NewFileSystemLabel <String>] [-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>] [-AsJob] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-Volume -FileSystemLabel <String[]> [-NewFileSystemLabel <String>] [-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>] [-AsJob] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-Volume -InputObject <CimInstance[]> [-NewFileSystemLabel <String>] [-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>] [-AsJob] [-PassThru] [-WhatIf] [-Confirm] [<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
PS C:\>Set-Volume -FileSystemLabel "Test" -NewFileSystemLabel "TestData"
This example changes the file system label from test to TestData.
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.
ps_cimcommon_asjob
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227967 or Get-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227966 cmdlet. The default is the current session on the local computer.
Type: CimSession[]
Parameter Sets: (All)
Aliases: Session
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Specifies a letter used to identify a drive or volume in the system.
Type: Char[]
Parameter Sets: ByDriveLetter
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the file system label of the object. The acceptable values for this parameter include: NTFS and ReFS.
Type: String[]
Parameter Sets: ByLabel
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Accepts an object from the pipeline as input.
Type: CimInstance[]
Parameter Sets: InputObject (cdxml)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Specifies a new file system label to be used.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies an ID representing the object. The ID is not globally unique.
Type: String[]
Parameter Sets: ById
Aliases: Id
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Sends items from the interactive window down the pipeline as input to other cmdlets. By default, this cmdlet does not generate any output.
To send items from the interactive window down the pipeline, click to select the items and then click OK. Shift-click and Ctrl-click are supported.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Contains valid path information.
Type: String[]
Parameter Sets: ByPaths
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
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.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
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.
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.
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.
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.