Get-Volume

Get-Volume

Gets the specified Volume object, or all Volume objects if no filter is provided.

Sintaxis

Parameter Set: ByDriveLetter
Get-Volume [[-DriveLetter] <Char[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByDiskImage
Get-Volume [-AsJob] [-CimSession <CimSession[]> ] [-DiskImage <CimInstance> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByFilePath
Get-Volume [-AsJob] [-CimSession <CimSession[]> ] [-FilePath <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ById
Get-Volume [-AsJob] [-CimSession <CimSession[]> ] [-ObjectId <String[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByLabel
Get-Volume [-AsJob] [-CimSession <CimSession[]> ] [-FileSystemLabel <String[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByPartition
Get-Volume [-AsJob] [-CimSession <CimSession[]> ] [-Partition <CimInstance> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByPaths
Get-Volume [-AsJob] [-CimSession <CimSession[]> ] [-Path <String[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Descripción detallada

The Get-Volume cmdlet will return a Volume object or a set of Volume objects that match the specified criteria.

Note: Dynamic volumes are supported only by the following cmdlets:
Repair-Volume (chkdsk), Optimize-Volume (defrag), and Format-Volume (format) on basic disks and storage spaces.

Parámetros

-AsJob

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-CimSession<CimSession[]>

Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.

Alias

Session

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-DiskImage<CimInstance>

Gets the volume associated with the specified DiskImage object. Enter a DiskImage CIM object, which is returned by the Get-DiskImage cmdlet.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByValue)

¿Aceptar caracteres comodín?

false

-DriveLetter<Char[]>

Gets the volume(s) with the specified drive letter(s). Separate multiple drive letters with commas.x

Alias

ninguno

¿Requerido?

false

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-FilePath<String>

Specifies the full path of a file. The cmdlet gets the volume for the file path that you specify.

Alias

FullName

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-FileSystemLabel<String[]>

Gets the volume with the specified label.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ObjectId<String[]>

Gets the volume with the specified ObjectID.

Alias

Id

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Partition<CimInstance>

Gets the volume associated with the specified Partition object. Enter a Partition CIM object, which is returned by the Get-Partition cmdlet.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByValue)

¿Aceptar caracteres comodín?

false

-Path<String[]>

Gets the volume with the specified path.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ThrottleLimit<Int32>

Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

Notas

  • El objeto Microsoft.Management.Infrastructure.CimInstance es una clase contenedora que muestra objetos de Instrumental de administración de Windows (WMI). La ruta de acceso después del signo de número (#) proporciona el espacio de nombres y el nombre de clase del objeto WMI subyacente.

Ejemplos

Example 1: Get all volumes

This example returns all volumes on all partitions, on all disks.

PS C:\> Get-Volume

Example 2: Get the volume for a particular drive letter

This example gets the Volume object for drive letter C.

PS C:\> Get-Volume -DriveLetter C

Temas relacionados

Get-Disk

Get-Partition

Format-Volume

Optimize-Volume

Repair-Volume

Set-Volume