Queries a drive and lists its type, for example CD-ROM drive.
ntfsinfo
Lists NTFS specific volume information for the specified volume, such as the number of sectors, total clusters, free clusters, and the start and end of the MFT Zone.
sectorinfo
Lists information about the hardware’s sector size and alignment.
statistics
Lists file system statistics for the specified volume, such as metadata, log file, and MFT reads and writes.
volumeinfo
Lists information for the specified volume, such as the file system, and whether the volume supports case-sensitive file names, unicode in file names, disk quotas, or is a DirectAccess (DAX) volume.
<volumepath>:
Specifies the drive letter (followed by a colon).
<rootpath>:
Specifies the drive letter (followed by a colon) of the root drive.
Examples
To list all of the drives in the computer, type:
1
fsutil fsinfo drives
Output similar to the following displays:
1
Drives: A:\ C:\ D:\ E:\
To query the drive type of drive C, type:
1
2
3
4
5
6
7
fsutil fsinfo drivetype c:
C:\>fsutil fsinfo drivetype D:
D: - Fixed Drive
C:\>fsutil fsinfo drivetype Z:
Z: - Remote/Network Drive
Possible results of the query include:
1
2
3
4
5
6
7
Unknown Drive
No such Root Directory
Removable Drive, for example floppy
Fixed Drive
Remote/Network Drive
CD-ROM Drive
Ram Disk
To query the volume information for volume E, type:
1
fsinfo volumeinfo e:\
Output similar to the following displays:
1
2
3
4
5
6
Volume Name : Volume
Serial Number : 0xd0b634d9
Max Component Length : 255
File System Name : NTFS
Supports Named Streams
Is DAX Volume
To query drive F for NTFS-specific volume information, type:
1
fsutil fsinfo ntfsinfo f:
Output similar to the following displays:
1
2
3
4
NTFS Volume Serial Number : 0xe660d46a60d442cb
Number Sectors : 0x00000000010ea04f
Total Clusters : 0x000000000021d409
Mft Zone End : 0x0000000000004700
To query the file system’s underlying hardware for sector information, type:
1
fsinfo sectorinfo d:
Output similar to the following displays:
1
2
3
4
5
D:\>fsutil fsinfo sectorinfo d:
LogicalBytesPerSector : 4096
PhysicalBytesPerSectorForAtomicity : 4096
Trim Not Supported
DAX capable
To query the file system statistics for drive E, type:
1
fsinfo statistics e:
Output similar to the following displays:
1
2
3
4
5
File System Type : NTFS
Version : 1
UserFileReads : 75021
UserFileReadBytes : 1305244512
LogFileWriteBytes : 180936704
Get-PhysicalDisk
The Get-PhysicalDisk cmdlet gets a list of all PhysicalDisk objects visible across any available Storage Management Providers, or optionally a filtered list of disks.
Gets a list of all PhysicalDisk objects visible across any available Storage Management Providers, or optionally a filtered list.
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.
1
2
3
4
5
6
7
8
9
Type: CimSession
Parameter Sets: (All)
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Description
Gets the physical disks that contain the specified description. Enter a description or use wildcard characters to enter a description pattern.
Gets the physical disk with the specified friendly name. Enter a friendly name or use wildcard characters to enter a name pattern.
1
2
3
4
5
6
7
8
9
Type: String
Parameter Sets: ByName
Aliases:
Required:False
Position:0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-HasAllocations
Indicates whether the cmdlet gets a list of physical disks that host the extents of the virtual disk that you specify by using the VirtualDisk parameter.
1
2
3
4
5
6
7
8
9
Type: Boolean
Parameter Sets: ByVirtualDisk
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-HealthStatus
Specifies the health status of physical disks. The acceptable values for this parameter are:
Indicates that this cmdlet gets physical disks that contain the last remaining copy of the data of a virtual disk.
1
2
3
4
5
6
7
8
9
Type: SwitchParameter
Parameter Sets: ByVirtualDisk
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ObjectId
Specifies the ID of the physical disk to get.
1
2
3
4
5
6
7
8
9
Type: String
Parameter Sets: ByObjectId
Aliases: PhysicalDiskObjectId
Required:False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-PhysicallyConnected
Indicates that this cmdlet gets physical disks that are physically connected to the specified storage node.
1
2
3
4
5
6
7
8
9
Type: SwitchParameter
Parameter Sets: ByStorageNode
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SelectedForUse
Indicates whether the cmdlet gets a list of physical disks to host the extents that belong to the virtual disk specified by the VirtualDisk parameter. Specify the physical disks to host the extents of a virtual disk by using the PhysicalDisksToUse parameter of the New-VirtualDisk cmdlet.
1
2
3
4
5
6
7
8
9
Type: Boolean
Parameter Sets: ByVirtualDisk
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SerialNumber
Specifies the serial number of the physical disk to get.
1
2
3
4
5
6
7
8
9
Type: String
Parameter Sets: ByName
Aliases:
Required:False
Position:1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-StorageEnclosure
Specifies a storage enclosure associated with the physical disk that this cmdlet gets. To obtain a StorageEnclosure object, use the Get-StorageEnclosure cmdlet.
1
2
3
4
5
6
7
8
9
Type: CimInstance
Parameter Sets: ByStorageEnclosure
Aliases:
Required:True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-StorageNode
Specifies a storage node as a CimInstance object. The cmdlet gets the physical disk connected to the node that you specify. To obtain a storage node object, use the Get-StorageNode cmdlet.
1
2
3
4
5
6
7
8
9
Type: CimInstance
Parameter Sets: ByStorageNode
Aliases:
Required:True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-StoragePool
Accepts a StoragePool object as input and gets the physical disks that belong to the pool. The Storage Pool CIM object is exposed by the Get-StoragePool cmdlet.
1
2
3
4
5
6
7
8
9
Type: CimInstance
Parameter Sets: ByStoragePool
Aliases:
Required:True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-StorageSubsystem
Specifies a storage subsystem. This cmdlet gets physical disks attached to the storage subsystem that you specify. To obtain a StorageSubsystem object, use the Get-StorageSubSystem cmdlet.
1
2
3
4
5
6
7
8
9
Type: CimInstance
Parameter Sets: ByStorageSubsystem
Aliases:
Required:True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-UniqueId
Gets only the physical disks with the specified IDs. Type one or more IDs (separated by commas), or use wildcard characters to enter a pattern.
1
2
3
4
5
6
7
8
9
Type: String
Parameter Sets: ByUniqueId
Aliases: Id
Required:False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Usage
Specifies an allocation method or usage. This cmdlet gets the physical disks that have the specified allocation method. The acceptable values for this parameter are:
Accepts a VirtualDisk object as input and gets the physical disks used by the virtual disk. The VirtualDisk object is exposed by the Get-VirtualDisk cmdlet.
1
2
3
4
5
6
7
8
9
Type: CimInstance
Parameter Sets: ByVirtualDisk
Aliases:
Required:True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-VirtualRangeMax
This parameter is reserved for future use.
1
2
3
4
5
6
7
8
9
Type: UInt64
Parameter Sets: ByVirtualDisk
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-VirtualRangeMin
This parameter is reserved for future use.
1
2
3
4
5
6
7
8
9
Type: UInt64
Parameter Sets: ByVirtualDisk
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Get-Disk
The Get-Disk cmdlet gets one or more Disk objects visible to the operating system, or optionally a filtered list.
Gets one or more disks visible to the operating system.
[!NOTE] This cmdlet returns physical disk objects like basic disks and partitioned drive partitions. Dynamic disks can span multiple pieces of physical media, so they will not be returned by Get-Disk. For more information, see Basic and Dynamic Disks.
This example gets all disks attached via the USB bus by piping the output of Get-Disk to the Where-Object cmdlet, and filtering by the USB value of the Bustype property.
Example 4: Get the iSCSI sessions for all iSCSI disks
This example gets all disks attached via the iSCSI bus by piping the output of Get-Disk to the Where-Object cmdlet, and filtering by the iSCSI value of the Bustype property. It then passes the Disk objects in the pipeline to the Get-IscsiSession cmdlet, which gets the associated iSCSI sessions, and then pipes the output to the Format-Table cmdlet for simplified display.
PARAMETERS
-AsJob
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.
1
2
3
4
5
6
7
8
9
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-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.
1
2
3
4
5
6
7
8
9
Type: CimSession[]
Parameter Sets: (All)
Aliases: Session
Required:False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-FriendlyName
Gets the disk with the specified friendly name. Enter a friendly name, or use wildcard characters to enter a name pattern.
1
2
3
4
5
6
7
8
9
Type: String[]
Parameter Sets: ByName
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Number
Specifies the disk number for which to get the associated Disk object.
1
2
3
4
5
6
7
8
9
Type: UInt32[]
Parameter Sets: ByNumber
Aliases: DeviceId
Required:False
Position:0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Partition
Accepts a Partition object as input. The Partition CIM object is exposed by the Get-Partition cmdlet.
1
2
3
4
5
6
7
8
9
Type: CimInstance
Parameter Sets: ByPartition
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Path
Contains valid path information.
1
2
3
4
5
6
7
8
9
Type: String[]
Parameter Sets: ByPath
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-SerialNumber
Specifies an array of serial numbers associated with disks that this cmdlet gets.
1
2
3
4
5
6
7
8
9
Type: String[]
Parameter Sets: ByName
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-StorageJob
Specifies a storage job object that is associated with disks that this cmdlet gets. To obtain a storage job, use the Get-StorageJob cmdlet.
1
2
3
4
5
6
7
8
9
Type: CimInstance
Parameter Sets: ByStorageJob
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-StorageNode
1
2
3
4
5
6
7
8
9
Type: CimInstance
Parameter Sets: ByStorageNode
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-StorageSubSystem
Specifies the storage subsystem from which this cmdlet gets disks. To obtain a StorageSubsystem object, use the Get-StorageSubSystem cmdlet.
1
2
3
4
5
6
7
8
9
Type: CimInstance
Parameter Sets: ByStorageSubSystem
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-ThrottleLimit
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.
1
2
3
4
5
6
7
8
9
Type: Int32
Parameter Sets: (All)
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-UniqueId
Gets only the disks with the specified IDs. Type one or more IDs (separated by commas).
1
2
3
4
5
6
7
8
9
Type: String[]
Parameter Sets: ByUniqueId
Aliases: Id
Required:False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-VirtualDisk
Accepts a VirtualDisk object as input. The Virtual Disk CIM object is exposed by the Get-VirtualDisk cmdlet.
1
2
3
4
5
6
7
8
9
Type: CimInstance
Parameter Sets: ByVirtualDisk
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-iSCSIConnection
Accepts an iSCSIConnection object as input. The iSCSI Connection CIM object is exposed by the Get-IscsiConnection cmdlet.
1
2
3
4
5
6
7
8
9
Type: CimInstance
Parameter Sets: ByiSCSIConnection
Aliases:
Required:False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-iSCSISession
Accepts an iSCSISession object as input. The iSCSI Session CIM object is exposed by the Get-IscsiSession cmdlet.