Saturday, July 28, 2018

Powershell 1.8.0 - What is PSProvider ?

PSProviders are basically data stores. you can handle those like a normal datasystem folder. get-psproviders will get you a list of all the psproviders.

example: with cmd.exe it was not possible to change your current location to the Registry. you had the possibility to change registry settings with cmd, but you can not handle it like a directory or cdto the registry.
in PowerShell, the Registry is a PSProvider. means you can access it like a datasystem folder. if you type cd hklm: you're actually inside the local machine registry, and can access its content with Get-ChildItem
this has the advantage that you can provide for example PSDrives which actually point into the registry.
New-PSDrive -name G -PSProvider Registry -Root HKCU:\Software
The G:\ Drive is now mapped to the Current User > Software Registry. (only for the current PSSession)
There are a lot of functionalities you can do with PSProviders. you should execute and read get-help about_providers for further information.

Featured Posts

Adding Accesspolicy to KeyVault for Service Principal Using Portal and Powershell

  Scripts path : https://drive.google.com/drive/folders/1sbBpnVFgXhUIXLdf2E9heyWDeU2f9427?usp=sharing  Adding Accesspolicy to KeyVault for S...