An Introduction Get-PSProvider
I find the best way to explain PowerShell's Providers is to start with the filesystem. I understand how Get-ChildItem views the C:\ drive; and I see how to extend the filesystem to include network drives.
Now it's only a short step to appreciate how the registry
could be a provider, especially when I see the results of:
Topics for Windows PowerShell Providers
This is how to research Providers, observe how PowerShell refer to them as drives.
# Enumerate PowerShell's Providers
Using Get-ChildItem you can access the values under 'Drives'; but with this method using the 'Name' does not work. For example, Get-ChildItem Filesystem: produces an error, but Get-ChildItem C: works. My point is that you need Get-ChildItem Env: and Get-ChildItem HKLM:\
Let us use Variable: as our example
# Working with PowerShell providers
Note 1: Remember the colon: furthermore, there is no need for a $sign to access any of the Providers. Get-ChildItem $Variable won't work, just as Set-Location $C:\ would also produce an error.
Note 2: Of all the PSProviders, I found the 'Variable': drive the most interesting.
Here is a filesystem example starting with Get-PSProvider, piping into Select-Object, and then using the -ExpandProperties parameter.
Note 3: You can get a list of all drives for all providers by omitting 'Filesystem' in the above example.
SolarWinds' Network Performance Monitor will help you discover what's happening on your network. This utility will also guide you through troubleshooting; the dashboard will indicate whether the root cause is a broken link, faulty equipment or resource overload.
What I like best is the way NPM suggests solutions to network problems. Its also has the ability to monitor the health of individual VMware virtual machines. If you are interested in troubleshooting, and creating network maps, then I recommend that you try NPM now.
It's easy to forget the full range of built-in environmental variables, therefore, let us employ PowerShell to list what you can see in the Control Panel - Advanced system settings:
Note 4: To see how many Windows environment variables you have
Note 5: Environmental variables in 'Proper' case are the newer .Net and PowerShell variables, whereas those in UPPERCASE are older Microsoft (or possibly UNIX) style variables.
Summary of PowerShell Get-PSProvider
Here is a cmdlet which not only reveals the filesystem drives, but also the registry hives, and Environmental variables.
If you like this page then please share it with your friends
See more Windows PowerShell examples of variables
Please email me if you have a better example script. Also please report any factual mistakes, grammatical errors or broken links, I will be happy to correct the fault.