Checking the file system if its NTFS of all your volumes

NTFS (New Technology File System) is the default file system used by Windows operating systems. It provides advanced features and capabilities compared to older file systems like FAT32. If you’re curious about the file system being used on your Windows computer or want to check the file system of a specific drive, PowerShell provides a convenient way to retrieve this information. Let’s explore how you can check the file system using PowerShell in this example.

 

The code is skipping USB drives as they are not relevant:

Get-Disk | Where-Object -FilterScript {$_.Bustype -ne “USB”} | Get-Partition | ForEach-Object {
$driveletter = $_.DriveLetter
if ($driveletter -match ‘[C-Z]’)
{
$FileSystemType = (Get-Volume -DriveLetter $driveletter).FileSystemType
if (($FileSystemType) -eq (‘NTFS’))
{
echo “Drive $driveletter is using $FileSystemType”
}
else
{
echo “Drive $driveletter is not using $FileSystemType”
}
}
}

 

 

Leave a comment

Your email address will not be published. Required fields are marked *

ten + eleven =