Converting the FileSystemObject's IsReady Property

Windows PowerShell

Definition: Returns True if the specified drive is ready.


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

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

Here we’ve created an instance of the DriveInfo class, passing the argument C: to create an instance referencing the C: drive. We then simply check the IsReady property.

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