Questions tagged [powershell-provider]

Providers are a Windows PowerShell feature that exposes objects and operations as a file system within the PowerShell environment. Use this tag to discuss development of PowerShell providers.

Description of PowerShell Providers

Providers are a Windows PowerShell feature that exposes objects and operations as a file system within the PowerShell environment.

Resources

14 questions
6
votes
1 answer

In a PowerShell Provider, when do you refresh vs cache data?

I am writing a PowerShell provider in C#. The provider exposes an applications domain objects through a drive-like interface. For example: my:\Users\joe@blow.com my:\Customers\Marty This data ultimately comes from a database. I have been unable to…
Craig Celeste
  • 12,207
  • 10
  • 42
  • 49
2
votes
4 answers

PowerShell provider relative path tab-completion issue

I've implemented a simple PowerShell NavigationCmdletProvider. For those who don't know, this means I can create a snap-in with a cmdlet which is effectively a virtual filesystem drive; this drive can be mounted and navigated into from PowerShell…
2
votes
2 answers

How to support powershell tab expansion in psprovider?

I'm implementing Powershell PSProvider for some internal hierarchical data. Everything works fine, I can navigate through the tree with usual cd/dir commands, the only thing doesn't work is tab completion. What I can see is that Powershell calls…
2
votes
1 answer

Set-Location Powershell provider

I'm having some trouble browsing a powershell I have created. I have implemented the methods listed here The documentation also says Set-Location: This cmdlet sets the current working location to a specified location. You do >not need to overwrite…
Sigh
  • 659
  • 13
  • 30
2
votes
2 answers

PowerShell custom provider RemoveItem

I'm implementing a custom PowerShell provider. I'm now working on the remove-item cmdlet implementation. The RemoveItem method has the following signature: protected override void RemoveItem(string path, bool recurse) When I type: Remove-Item…
rvs01
  • 51
  • 1
  • 3
2
votes
1 answer

How to make zip etc. files appear as folders in PowerShell?

How can I make zip etc. files appear as folders in powershell? Does PowerShell have a concept of folder (item) providers akin to drive providers? Can this be done without implementing a drive provider? Preliminary search turns up some useful…
Sandeep Datta
  • 28,607
  • 15
  • 70
  • 90
2
votes
3 answers

Is there a way in Powershell to provide virtual file systems in other file systems?

I know you can write support for custom PSDrives. But those are always a root of a file system. What would be nice if there was a way to allow for VFS start at arbitrary nodes of the file system, such as using Set-Location to enter archive file…
Joey
  • 344,408
  • 85
  • 689
  • 683
1
vote
0 answers

Adding tab completion to the ItemType parameter of "New-Item" for a custom PowerShell provider

I am creating a custom PowerShell provider using PowerShellStandard.Library. When implementing the New-Item cmdlet, I would like to be able to provide support for argument completion of the -ItemType parameter. I cannot find any documentation from…
1
vote
2 answers

Loading a Powershell Module from the C# code of a custom Provider

I've been working on a VERY specific functionality "need" to tie into a custom Provider I'm writing in C#. Basically I set out to find a way to replicate the A: B: etc functions defined when PowerShell loads so instead of having to type CD…
TofuBug
  • 573
  • 1
  • 6
  • 22
1
vote
1 answer

How do I persist Powershell provider drive information?

In my Powershell provider, which is a business-logic layer over an SQL database, the Powershell drives equate to database connection settings. This collection of connection settings is persisted to an encrypted XML file on the local computer. An…
0
votes
1 answer

How does the command "cd WSMan:\localhost\shell" work? How can I reproduce it?

I am able to use Powershell to configure WinRM using a special "cd" command. Can anyone explain how it works and how I can implement that type of plug in for my own app?
makerofthings7
  • 60,103
  • 53
  • 215
  • 448
0
votes
1 answer

Powershell "Provider execution stopped because the provider does not support this operation."

I am trying to write a script to check a remote server for a certificate by FriendlyName. Once this is returned I want to confirm a removal of this cert. Currently the code below returns "Provider execution stopped because the provider does not…
Fixxer
  • 93
  • 1
  • 9
0
votes
2 answers

Powershell Provider - GetItem Path Error - Custom File as Drive

I'm trying to emulate my custom project file as new PS Drive. I am trying to create my custom Powershell Provider that is derived from NavigationCmdletProvider. I have overridden PSDriveInfo to read and contain the project from the file and filepath…
Marko Stanojevic
  • 418
  • 5
  • 15
0
votes
1 answer

PowerShell InitializeDefaultDrive

In my custom powershell provider I want the user to be able to skip the internal call to InitializeDefaultDrives. The InitializeDefaultDrives method is called when the provider starts. I guess this is when I use the Add-SnapIn cmdlet to load my…
RvS
  • 1