2

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 any methods to support this cmdlet.

But I'm getting the error

cd : Provider operation stopped because the provider does not support this operation. At line:1 char:1 + cd banksia:\ + ~~~~~~~~~~~~ + CategoryInfo : NotImplemented: (:) [Set-Location], PSNotSupportedException + FullyQualifiedErrorId : NotSupported,Microsoft.PowerShell.Commands.SetLocationCommand

What do I have to implement to make Set-Location work?

Sigh
  • 659
  • 13
  • 30
  • Could you edit your question to provide a chunk of code that generated this error? I can then try to run the code and see if I can help figure out whats going on. – Vish Dec 05 '13 at 05:54

1 Answers1

3

Did you derive from NavigationCmdletProvider? That is required to support Set-Location IIRC. It relies on the provided implementation of bool IsItemContainer(string path).

Keith Hill
  • 194,368
  • 42
  • 353
  • 369
  • 1
    That was it! Thanks! I had derived from NavigationCmdletProvider, but not implemented IsItemContainer. The documentation I was reading my be out of date. – Sigh Dec 05 '13 at 06:36