Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Converting the FileSystemObject's SubFolders Property

Windows PowerShell

Definition: Returns a collection of all the subfolders of a folder.


In PowerShell, use the Get-Item cmdlet to retrieve a reference to the folder. You can then call the GetDirectories method to retrieve the collection of subdirectories.

(Get-Item C:\scripts).GetDirectories()

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.