Providers

Providers

PS C:\Users\Ryan> Get-PSProvider

Name Capabilities Drives

---- ------------ ------

Registry ShouldProcess, Transactions {HKLM, HKCU}

Alias ShouldProcess {Alias}

Environment ShouldProcess {Env}

FileSystem Filter, ShouldProcess, Credentials {C, D}

Function ShouldProcess {Function}

Variable ShouldProcess {Variable}

Get-PSDrive shows a list of the currently connected drives

For the most part, the cmdlets you use with a PSDrive have the word “Item” somewhere in their noun

PowerShell doesn’t use the terms “file” and “folder.” Instead, it refers to these objects by the more generic term item.

  • Items can, and often do, have properties. For example, a file item might have properties like its last write time, whether or not it’s read-only, and so on.

  • Some items, such as folders, can have child items, which are the items contained within that item.

  • You have to think about what each provider is giving you access to, and understand that even when the cmdlet knows how to do something, that doesn’t mean the particular provider you’re working with will support that operation.

Last updated