Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
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.


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

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

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
© 2015 Microsoft