New
#1
How to list folder properties using Powershell
I have this bit of Powershell code that will list all the folder property friendly names, but I can't figure out how to get a list with the associated system properties.
The code above outputs a list like this:Code:$Folder = (New-Object -ComObject Shell.Application).NameSpace("C:\") 0..400 | ForEach { If ($DataValue = $Folder.GetDetailsOf($null, $_)) { Write-Output "$DataValue" } }
I want to get a list like this:Code:Name Size Item type Type Date modified Date created Date accessed Attributes Owner Folder path ...
Any help would be much appreciated!Code:System.ItemNameDisplay, Name System.Size, Size System.ItemType, Item type System.ItemTypeText, Type System.DateModified, Date modified System.DateCreated, Date created System.DateAccessed, Date accessed System.FileAttributes, Attributes System.FileOwner, Owner System.ItemFolderPathDisplay, Folder path ...