Export (0) Print
Expand All
Expand Minimize

Converting the FileSystemObject's FileSystem Property


Windows PowerShell


Definition: Returns the type of file system of the given drive, such as FAT or NTFS.

FileSystem


Use the DriveFormat property of the .NET Framework DriveInfo object:


$d = New-Object -typename System.IO.DriveInfo -argumentlist "C:"
$d.DriveFormat


Here we called the New-Object cmdlet to create a DriveInfo oject, passing New-Object the -typename (the class) and the -argumentlist (in this case, the drive we want to retrieve information on). We then check the DriveFormat property on the object we just created.


See conversions of other FileSystemObject methods and properties.
Return to the VBScript to Windows PowerShell home page

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft