Simple Hierarchy in PowerShell (SHiPS) – An Easier Way to Build PowerShell Providers

AzurePSDrive is built on top of an abstraction layer – SHiPS, which simplifies developing PowerShell providers. SHiPS is also a PowerShell provider that exposes datastores in a hierarchical manner (like a file system). In other words, the data in your datastore can be treated like files and directories so that a user can navigate data via cd or dir commands.

Writing a PowerShell provider can be challenging as one needs to implement various methods exposed by the base PowerShell provider classes and interfaces to make it work. SHiPS simplifies this experience by exposing fewer methods and enables PowerShell providers to be written using PowerShell classes syntax.

Build navigation model that works on both Windows PowerShell (.Net FullCLR) and PowerShell Core (.Net CoreCLR)

Built on Top of Community Contribution

SHiPS is built on top of P2F (PowerShell Provider Framework), created by Jim Christopher, which does the heavy lifting for the implementation of SHiPS. SHiPS with P2F provides the simplification of developing PowerShell provider.

User Experience

Once a SHiPS-based navigation is defined, such as AzurePSDrive, users can easily create a PSDrive by installing the modules from the PowerShell Gallery.

In this example, AzurePSDrive is a PowerShell module written using PowerShell classes. It defines a PowerShell class called Azure as the PowerShell provider root. The syntax for root parameter of PSDrive for SHiPS provider is Module#ClassName. During New-PSDrive, SHiPS loads the module, AzurePSDrive, and creates an instance of an ‘Azure’ object. When a user types dir, SHiPS calls GetChildItem() implemented within the Azure class.

Eric, are you running it on your local machine, right? This might be caused by some old versions of AzureRM modules. AzurePSDrive requires AureRM 4.3.1 or higher. You can find out the version by running

When viewing web applications in my subscription I the property for SiteConfig is empty. I would think that that would be the same value as:
Get-AzureRmWebAppSlot -name webapp -ResourceGroupName myres -slot ‘production’

In the provider my drivename is AZ.

cd az:\mysub\webapps

(gci *webapp).siteconfig
(gci *webapp).sitename — this is valid and has data