View Single Post
Old 10-24-2007   #3 (permalink)
Darren Gosbell


 
 

Re: Generating a drive function from a provider

Thanks, but I'm actually trying to find a way of doing this from .Net code
inside my provider class. So I can happily create the hard coded script I
want, but I have not been able to find a way of executing it.

--
Darren Gosbell - SQL Server MVP
http://geekswithblogs.net/darrengosbell


"Shay Levi" wrote:
Quote:

> It seems that it'll work
>
> PS > function hkcu { set-location hkcu: }
> PS > hkcu
> PS HKCU:\>
>
> This is a generic function to set locaion to any psdrive
>
> #cdd = cd drive
> function cdd {set-location $args[0]}
>
> #test it
>
> PS HKCU:\> cdd cert:
> PS cert:\>
>
>
> HTH
>
> Shay
> http://scriptolog.blogspot.com
>
>
>
Quote:

> > I have been working on a provider for SQL Server Analysis Services and
> > it is coming across nicely. But if someone creates a new drive I would
> > like to be able to create a function that would enable them to
> > navigate to the new drive like you can with the built-in file system
> > and registry drives.
> >
> > eg.
> >
> > # when someone types the following
> >
> > new-psdrive ssas powerSSAS localhost
> >
> > #I want to do the equivalent of typing the following
> >
> > function ssas: { set-location ssas: }
> >
> > Anyone know if this possible?
> >
>
>
>
My System SpecsSystem Spec