Working with providers
Each provider shares a common set of commands, such as Set-Location
, Get-Item
, and New-Item
.
The full list of commands that you can use when interacting with a provider can be seen by running the following snippet:
$params = @{
Name = @(
'*-Item*'
'*-ChildItem'
'*-Content'
'*-Acl'
'*-Location'
)
Module = @(
'Microsoft.PowerShell.Management'
'Microsoft.PowerShell.Security'
)
}
Get-Command @params
Each group of commands (such as the *-Content
commands) is used when a provider supports a certain behavior. This is indicated by the .NET type it inherits, and the interfaces it implements.
For example, a provider that supports navigation allows the use of Get-Item
, Get-ChildItem
, Set-Location
, and so on. This is possible because the FileSystemProvider
inherits from a NavigationCmdletProvider
type:
PS>...