This is the default list of PS providers that we can see
when we run Get‑PSProvider command.
The role of each PS provider is to manage some kind of data store.
Each PS provider manages a specific component of Windows OS.
We'll have a detailed look into some of these PS providers like Registry,
Environment, Certificate,
but for now I'll quickly give an overview of each PS provider.
The first one in the list is FileSystem provider.
The PowerShell FileSystem provider enables us to view,
edit, and delete files and directories present on the computer using PowerShell.
FileSystem drive provides a hierarchical structure of files and
folders present either on local drive or network share.
As we saw earlier,
each logical drive in the OS has a PS drive associated with it.
From PowerShell 7 onwards, there's a new temp FileSystem drive introduced,
which is mapped to the user's temp directory.
The Registry provider allows to manage registry keys
and values using PowerShell commands.
The registry values can be retrieved, added,
modified, and deleted using registry PowerShell provider.
There are two PS drives associated with Registry provider, HKLM and HKCU.
The Set‑Location command can be used to enter in the PS
drive and retrieve the registry keys and values using
Get‑Item and Get‑ChildItem commands.
The Alias provider enables us to view and edit
aliases that are available by default, as well as to create new ones.
An alias is an alternate name for the PowerShell command or function.
The alias drive will directly list all the available aliases.
It won't have any child objects.
This example lists some of many aliases available by default.
You can also create your own aliases that will also be listed here.
The PowerShell Environment provider lets you add,
retrieve, and delete environment variables and values in PowerShell.
Now we'll study about Environment provider and
environment variables in deep in next module,
but for now,
just remember environment variables are dynamic variables that
describe the environment in which your script is running.
Just like alias drive, Environment drive does not have any child items,
and all the environment variables are listed directly in Env drive.
PowerShell Function provider gets you all the PowerShell functions
that you create during a PowerShell session.
It also lists some of the building functions, like mkdir, chdir, and Clear‑Host.
The PowerShell variable provider includes the variables that PowerShell creates,
the automatic variables, the preference variables,
and the variables that are created during the PowerShell session.
This is how you can list all variables.
Next,
we can see how we can retrieve built‑in variable isWindows value
that basically tells us that the OS is Windows.
The Certificate provider allows us to manage certificates using PowerShell.
The hierarchical structure allows us to navigate either into
computer certificates denoted by LocalMachine or user
certificates denoted by CurrentUser.
We'll learn more about Certificate provider in later model.
The WSMan provider gives access to WS‑Management configuration settings.
You can view WSMan settings using Get‑ChildItem command.
You can configure WinRM settings using WSMan drive.
The example given below sets up trusted host settings on
local computer using Set‑Item command. The next example adds a WinRM listener on Server1.