Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Discovering the features of a provider

Closed Thread
 
Thread Tools Display Modes
Old 02-07-2007   #1 (permalink)
Marco Shaw
Guest


 

Discovering the features of a provider

Not wanting to upset the author, I'll not mention the exact provider, unless
the person recognizes my name and jumps in here...

Is there any way to figure out how a provider works? There is no
documentation for it. Seems get-itemproperty would be something to help me
get started, but I get this:

20> gci|%{get-itemproperty $_.name}
Get-ItemProperty : Cannot use interface. The IPropertyCmdletProvider
interface is not supported by this provider.
At line:1 char:23
+ gci|%{get-itemproperty <<<< $_.name}

I'm trying to figure out how I can add a new item along with its properties
to make it work properly.

Marco


Old 02-07-2007   #2 (permalink)
RichS
Guest


 

RE: Discovering the features of a provider

Not sure if this will help

(get-psprovider function).helpfile will give you the help file associated
with the provider - replace function with your provider - may be some info in
there?
--
Richard Siddaway
Please note that all scripts are supplied "as is" and with no warranty
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk


"Marco Shaw" wrote:

> Not wanting to upset the author, I'll not mention the exact provider, unless
> the person recognizes my name and jumps in here...
>
> Is there any way to figure out how a provider works? There is no
> documentation for it. Seems get-itemproperty would be something to help me
> get started, but I get this:
>
> 20> gci|%{get-itemproperty $_.name}
> Get-ItemProperty : Cannot use interface. The IPropertyCmdletProvider
> interface is not supported by this provider.
> At line:1 char:23
> + gci|%{get-itemproperty <<<< $_.name}
>
> I'm trying to figure out how I can add a new item along with its properties
> to make it work properly.
>
> Marco
>
>
>

Old 02-08-2007   #3 (permalink)
Jeffrey Snover [MSFT]
Guest


 

Re: Discovering the features of a provider

I'm not sure whether this will help your or not:

PS> cat Get-ProviderInterfaces.ps1
$hash=@{}
foreach ($p in Get-PsProvider)
{
foreach ($i in $p.ImplementingType.GetInterfaces())
{
$interface = $i.Name
if (!$hash.$interface)
{ $hash.$interface = @()
}
$hash.$interface += $p
}
}
$hash
PS> C:\ps\Get-ProviderInterfaces.ps1

Name Value
---- -----
IContentCmdletProvider {Alias, Environment, FileSystem, Function,
Variable}
IDynamicPropertyCmdletProvider {Registry}
ISecurityDescriptorCmdletPr... {FileSystem, Registry}
IResourceSupplier {Alias, Environment, FileSystem, Function,
Registry, Variable...}
IPropertyCmdletProvider {FileSystem, Registry}


--
Jeffrey Snover [MSFT]
Windows PowerShell Architect
Microsoft Corporation
This posting is provided "AS IS" with no warranties, no confers rights.
Visit the Windows PowerShell Team blog at:
http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at:
http://www.microsoft.com/technet/scr.../hubs/msh.mspx

Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with unabling sharing & discovering on vista 64 maxvista Vista General 1 02-21-2008 03:19 AM
WMP 11 not discovering my Creative Zen V Plus running Vista Home P EvilG Vista music pictures video 0 01-23-2008 02:41 PM
WMI Provider Floridaguy Vista mail 0 10-12-2007 09:54 AM
Problems Discovering other computers on the LAN Duane R D. Vista networking & sharing 3 06-08-2007 09:33 PM
Problems discovering devices on the LAN Oliver Moore Vista networking & sharing 1 06-08-2007 10:57 AM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50