Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8326155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:40:39+00:00 2026-06-09T00:40:39+00:00

I’m trying to create a custom powershell provider in c# that allows you to

  • 0

I’m trying to create a custom powershell provider in c# that allows you to manage items (in a folder type directory) users should be able to cd to –> files/folder and be able to see child items etc and manipulate that.
My issue is I can always travel to the root directory however as soon as I try and set my location to myAcme:/any_path_here_of_valid_item it will error as seen below. This is strange as I can get-item on this path. Am I missunderstanding something here or is it not possible to set your location to the location of the item (I’m trying to set my location to that item to get its child items)

PS my****:\> cd myAcme:/
PS myAcme:\> get-item /files/folders/****
<Removed so you don' get hit by a wall of text but this displays the items info fine>
PS myAcme:\> cd myAcme:/files/folders/****
Set-Location : Cannot find path 'myAcme:/files/folders/****' because it does not exist.
At line:1 char:3
+ cd <<<<  myAcme:/files/folders/****
    + CategoryInfo          : ObjectNotFound: (myAcme:/files/folders/****:String) [Set-Location], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand

I’m not going display any code here for now as I’m pretty sure it’s more likely I’m miss understanding the concept of containercmdletprovider

EDIT
I forgot to add in the debugger ItemExists is returning true when I do the command cd myAcme:/files/folders/**

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T00:40:42+00:00Added an answer on June 9, 2026 at 12:40 am

    ContainerCmdletProvider is only for simple providers that have no subfolders. Examples of such providers are the function, env and variable drives in PowerShell. Such providers do not support set-location, get-location (cd) or the notion of nested paths. Everything should be in the root, and must be a leaf node (e.g. file.)

    If you want to use a tree structure, you must inherit from NavigationCmdletProvider. You might find it easier to develop if you use my scripted provider framework which allows you to prototype providers very fast using regular PowerShell script. There are some examples and simple docs, as well as the download, up on http://psprovider.codeplex.com/

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.