3 ms·
> what comes back from dir/ls/Get-ChildItem? If you look at the note properties that get added to the objects, they're consistent across providers: PS C:\> (G
by 13of40 11y ago
> what comes back from dir/ls/Get-ChildItem?
If you look at the note properties that get added to the objects, they're consistent across providers:
PS C:\> (Get-Item c:\).PSPath
Microsoft.PowerShell.Core\FileSystem::C:\
PS C:\> (Get-Item env:username).PSPath
Microsoft.PowerShell.Core\Environment::username
PS C:\> (Get-Item HKLM:\software).PSPath
Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\software
There's also some magic that you can do with tab completion to see the properties. For example, if you type...
(Get-ChildItem c:\ | sort).
...and hit tab, you can tab through the list of properties of the objects returned by Get-ChildItem when it's used on the FileSystem provider. (Don't ask me how the hell that works, though...)