Providers

Standard .NET interface we can navigate through using a common set of commands (such as Get-ChildItem).

Get-PSProvider    # List available providers

Each provider gives us drives that contain objects. For example, the ENV drive contains the environment variables for the current session.

Clear-Host           # Clear the output window
Get-PSDrive          # List available drives
Set-Location env:    # Select the ENV drive
Get-ChildItem        # List the environment variables

Snap-Ins

We add new providers using snap-ins.

Get-PSSnapin                 # Show a list of snap-ins

Clear-Host
Get-PSSnapin -Registered     # Show only registered snap-ins

Add-PSSnapin SqlServerCmdletSnapin100
Add-PSSnapin SqlServerProviderSnapin100

Clear-Host
Get-PSSnapin -Name "Sql*"    # Show snap-ins whose names start with Sql

Remove-PSSnapin SqlServerCmdletSnapin100
Remove-PSSnapin SqlServerProviderSnapin100

results matching ""

    No results matching ""