How to get a list of objects which has Provider=“FileSystem”
If you mean using Get-PSDrive, just pipe to Where-Object and specify the filter criteria. Or, use the -Provider switch of Get-PSDrive.
I got the collection from get-psdrive and since provider is sort of .net property of type System.Management.Automation.ProviderInfo Provider {get;}
I had to compare with the collection object’s property like
$b[1].Provider.Name which was actually a filesystem type.
Output from my pc
Name Used (GB) Free (GB) Provider Root CurrentLocation
Alias Alias
C 168.96 492.78 FileSystem C:\ Users\Abhishe
Get-PSDrive -PSProvider FileSystem