![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Provider Resolution? I'm fixing up my FtpProvider, and I'm getting a *little* confused as to how providers are qualified now in a full PSPath; is it <SnapInName>/<ProviderName>::<DriveName:/<Folder>/<File> ? When I try to use this, PS tells me that it can't find a provider named 'Howell.PowerShell.Provider.Ftp/Ftp', and my snapin is named Howell.PowerShell.Provider.Ftp and my provider is named Ftp. Thanks, Nick |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: Provider Resolution? Can you give an example of the command that fails? You can see the full PowerShell path to an item this way: PS:6 > (get-item c:\temp\test.txt).PsPath Microsoft.PowerShell.Core\FileSystem::C:\temp\test.txt -- Lee Holmes [MSFT] Windows PowerShell Development Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message news:upeCeb95GHA.3452@TK2MSFTNGP05.phx.gbl... > I'm fixing up my FtpProvider, and I'm getting a *little* confused as to > how providers are qualified now in a full PSPath; is it > <SnapInName>/<ProviderName>::<DriveName:/<Folder>/<File> ? > > When I try to use this, PS tells me that it can't find a provider named > 'Howell.PowerShell.Provider.Ftp/Ftp', and my snapin is named > Howell.PowerShell.Provider.Ftp and my provider is named Ftp. > > Thanks, > Nick |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: Provider Resolution? OK, I think my confusion was the difference between \ and / in that; is this a bug? ls Microsoft.PowerShell.Core\FileSystem::C:\ works as expected ls Microsoft.PowerShell.Core/FileSystem::C:/ throws: Get-ChildItem : Cannot find a provider with name 'Microsoft.PowerShell.Core/FileSystem'. At line:1 char:3 + ls <<<< Microsoft.PowerShell.Core/FileSystem::C:/ Should these behaviors be different? Nick Lee Holmes [MSFT] wrote: > Can you give an example of the command that fails? You can see the full > PowerShell path to an item this way: > > PS:6 > (get-item c:\temp\test.txt).PsPath > Microsoft.PowerShell.Core\FileSystem::C:\temp\test.txt > > -- > Lee Holmes [MSFT] > Windows PowerShell Development > Microsoft Corporation > This posting is provided "AS IS" with no warranties, and confers no rights. > > "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message > news:upeCeb95GHA.3452@TK2MSFTNGP05.phx.gbl... >> I'm fixing up my FtpProvider, and I'm getting a *little* confused as to >> how providers are qualified now in a full PSPath; is it >> <SnapInName>/<ProviderName>::<DriveName:/<Folder>/<File> ? >> >> When I try to use this, PS tells me that it can't find a provider named >> 'Howell.PowerShell.Provider.Ftp/Ftp', and my snapin is named >> Howell.PowerShell.Provider.Ftp and my provider is named Ftp. >> >> Thanks, >> Nick > > |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: Provider Resolution? Currently, the separator between Snapin (ie: Microsoft.PowerShell.Core) and Provider (ie: FileSystem) must be a back-slash. This doesn't need to be this way, though. Please file a bug on Connect. -- Lee Holmes [MSFT] Windows PowerShell Development Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message news:OIiI18%235GHA.4304@TK2MSFTNGP03.phx.gbl... > OK, I think my confusion was the difference between \ and / in that; is > this a bug? > > ls Microsoft.PowerShell.Core\FileSystem::C:\ > > works as expected > > ls Microsoft.PowerShell.Core/FileSystem::C:/ > > throws: > > Get-ChildItem : Cannot find a provider with name > 'Microsoft.PowerShell.Core/FileSystem'. > At line:1 char:3 > + ls <<<< Microsoft.PowerShell.Core/FileSystem::C:/ > > Should these behaviors be different? > > Nick > > Lee Holmes [MSFT] wrote: >> Can you give an example of the command that fails? You can see the full >> PowerShell path to an item this way: >> >> PS:6 > (get-item c:\temp\test.txt).PsPath >> Microsoft.PowerShell.Core\FileSystem::C:\temp\test.txt >> >> -- >> Lee Holmes [MSFT] >> Windows PowerShell Development >> Microsoft Corporation >> This posting is provided "AS IS" with no warranties, and confers no >> rights. >> >> "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message >> news:upeCeb95GHA.3452@TK2MSFTNGP05.phx.gbl... >>> I'm fixing up my FtpProvider, and I'm getting a *little* confused as to >>> how providers are qualified now in a full PSPath; is it >>> <SnapInName>/<ProviderName>::<DriveName:/<Folder>/<File> ? >>> >>> When I try to use this, PS tells me that it can't find a provider named >>> 'Howell.PowerShell.Provider.Ftp/Ftp', and my snapin is named >>> Howell.PowerShell.Provider.Ftp and my provider is named Ftp. >>> >>> Thanks, >>> Nick >> |
My System Specs![]() |
| | #5 (permalink) |
| Guest | Re: Provider Resolution? Bug filed. What about this: > $r = resolve-path C:/ > $r.Drive -eq $null False > $r = resolve-path Microsoft.PowerShell.Core\FileSystem::C:/ > $r.Drive -eq $null True If you super-qualify (that's what I've taken to calling the snapin-quaified path) the path, it doesn't have a drive. This popped up, again, in my FtpProvider (particularly the CopyFs function, if you're curious). Nick Lee Holmes [MSFT] wrote: > Currently, the separator between Snapin (ie: Microsoft.PowerShell.Core) and > Provider (ie: FileSystem) must be a back-slash. > > This doesn't need to be this way, though. Please file a bug on Connect. > > -- > Lee Holmes [MSFT] > Windows PowerShell Development > Microsoft Corporation > This posting is provided "AS IS" with no warranties, and confers no rights. > > "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message > news:OIiI18%235GHA.4304@TK2MSFTNGP03.phx.gbl... >> OK, I think my confusion was the difference between \ and / in that; is >> this a bug? >> >> ls Microsoft.PowerShell.Core\FileSystem::C:\ >> >> works as expected >> >> ls Microsoft.PowerShell.Core/FileSystem::C:/ >> >> throws: >> >> Get-ChildItem : Cannot find a provider with name >> 'Microsoft.PowerShell.Core/FileSystem'. >> At line:1 char:3 >> + ls <<<< Microsoft.PowerShell.Core/FileSystem::C:/ >> >> Should these behaviors be different? >> >> Nick >> >> Lee Holmes [MSFT] wrote: >>> Can you give an example of the command that fails? You can see the full >>> PowerShell path to an item this way: >>> >>> PS:6 > (get-item c:\temp\test.txt).PsPath >>> Microsoft.PowerShell.Core\FileSystem::C:\temp\test.txt >>> >>> -- >>> Lee Holmes [MSFT] >>> Windows PowerShell Development >>> Microsoft Corporation >>> This posting is provided "AS IS" with no warranties, and confers no >>> rights. >>> >>> "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message >>> news:upeCeb95GHA.3452@TK2MSFTNGP05.phx.gbl... >>>> I'm fixing up my FtpProvider, and I'm getting a *little* confused as to >>>> how providers are qualified now in a full PSPath; is it >>>> <SnapInName>/<ProviderName>::<DriveName:/<Folder>/<File> ? >>>> >>>> When I try to use this, PS tells me that it can't find a provider named >>>> 'Howell.PowerShell.Provider.Ftp/Ftp', and my snapin is named >>>> Howell.PowerShell.Provider.Ftp and my provider is named Ftp. >>>> >>>> Thanks, >>>> Nick > |
My System Specs![]() |
| | #6 (permalink) |
| Guest | Re: Provider Resolution? The Drive parameter refers to the PsDrive that your path specifies, not the FileSystem drive of the target. The fully qualified path that you gave below could easily map to a data store that has no PowerShell drives configured. For example: [C:\temp] PS:21 > new-PSDrive MyDocs FileSystem ([Environment]::GetFolderPath("MyDocuments")) Name Provider Root ---- -------- ---- MyDocs FileSystem D:\documents Suggestion: An alias for New-PSDrive is ndr Suggestion: An alias for New-PSDrive is mount [C:\temp] PS:22 > $r = Resolve-Path mydocs:\ Suggestion: An alias for Resolve-Path is rvpa [C:\temp] PS:23 > $r.drive Name Provider Root ---- -------- ---- MyDocs FileSystem D:\documents -- Lee Holmes [MSFT] Windows PowerShell Development Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. Since your example doesn't refer to a "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message news:%237hdAqN6GHA.2380@TK2MSFTNGP02.phx.gbl... > Bug filed. What about this: > > > $r = resolve-path C:/ > > $r.Drive -eq $null > False > > $r = resolve-path Microsoft.PowerShell.Core\FileSystem::C:/ > > $r.Drive -eq $null > True > > If you super-qualify (that's what I've taken to calling the > snapin-quaified path) the path, it doesn't have a drive. This popped up, > again, in my FtpProvider (particularly the CopyFs function, if you're > curious). > > Nick > > Lee Holmes [MSFT] wrote: >> Currently, the separator between Snapin (ie: Microsoft.PowerShell.Core) >> and Provider (ie: FileSystem) must be a back-slash. >> >> This doesn't need to be this way, though. Please file a bug on Connect. >> >> -- >> Lee Holmes [MSFT] >> Windows PowerShell Development >> Microsoft Corporation >> This posting is provided "AS IS" with no warranties, and confers no >> rights. >> >> "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message >> news:OIiI18%235GHA.4304@TK2MSFTNGP03.phx.gbl... >>> OK, I think my confusion was the difference between \ and / in that; is >>> this a bug? >>> >>> ls Microsoft.PowerShell.Core\FileSystem::C:\ >>> >>> works as expected >>> >>> ls Microsoft.PowerShell.Core/FileSystem::C:/ >>> >>> throws: >>> >>> Get-ChildItem : Cannot find a provider with name >>> 'Microsoft.PowerShell.Core/FileSystem'. >>> At line:1 char:3 >>> + ls <<<< Microsoft.PowerShell.Core/FileSystem::C:/ >>> >>> Should these behaviors be different? >>> >>> Nick >>> >>> Lee Holmes [MSFT] wrote: >>>> Can you give an example of the command that fails? You can see the >>>> full PowerShell path to an item this way: >>>> >>>> PS:6 > (get-item c:\temp\test.txt).PsPath >>>> Microsoft.PowerShell.Core\FileSystem::C:\temp\test.txt >>>> >>>> -- >>>> Lee Holmes [MSFT] >>>> Windows PowerShell Development >>>> Microsoft Corporation >>>> This posting is provided "AS IS" with no warranties, and confers no >>>> rights. >>>> >>>> "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message >>>> news:upeCeb95GHA.3452@TK2MSFTNGP05.phx.gbl... >>>>> I'm fixing up my FtpProvider, and I'm getting a *little* confused as >>>>> to how providers are qualified now in a full PSPath; is it >>>>> <SnapInName>/<ProviderName>::<DriveName:/<Folder>/<File> ? >>>>> >>>>> When I try to use this, PS tells me that it can't find a provider >>>>> named 'Howell.PowerShell.Provider.Ftp/Ftp', and my snapin is named >>>>> Howell.PowerShell.Provider.Ftp and my provider is named Ftp. >>>>> >>>>> Thanks, >>>>> Nick >> |
My System Specs![]() |
| | #7 (permalink) |
| Guest | Re: Provider Resolution? I see; I guess I fundamentally misunderstand what the meaning of provider-qualifying a path is. I had thought that it just got you a list of all the drives in that provider...what precisely is it for, then? Thanks, Nick Lee Holmes [MSFT] wrote: > The Drive parameter refers to the PsDrive that your path specifies, not the > FileSystem drive of the target. The fully qualified path that you gave > below could easily map to a data store that has no PowerShell drives > configured. > > For example: > > [C:\temp] > PS:21 > new-PSDrive MyDocs FileSystem > ([Environment]::GetFolderPath("MyDocuments")) > > Name Provider Root > ---- -------- ---- > MyDocs FileSystem D:\documents > > > Suggestion: An alias for New-PSDrive is ndr > Suggestion: An alias for New-PSDrive is mount > > [C:\temp] > PS:22 > $r = Resolve-Path mydocs:\ > Suggestion: An alias for Resolve-Path is rvpa > > [C:\temp] > PS:23 > $r.drive > > Name Provider Root > ---- -------- ---- > MyDocs FileSystem D:\documents > > -- > Lee Holmes [MSFT] > Windows PowerShell Development > Microsoft Corporation > This posting is provided "AS IS" with no warranties, and confers no rights. > > > Since your example doesn't refer to a > "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message > news:%237hdAqN6GHA.2380@TK2MSFTNGP02.phx.gbl... >> Bug filed. What about this: >> >>> $r = resolve-path C:/ >>> $r.Drive -eq $null >> False >>> $r = resolve-path Microsoft.PowerShell.Core\FileSystem::C:/ >>> $r.Drive -eq $null >> True >> >> If you super-qualify (that's what I've taken to calling the >> snapin-quaified path) the path, it doesn't have a drive. This popped up, >> again, in my FtpProvider (particularly the CopyFs function, if you're >> curious). >> >> Nick >> >> Lee Holmes [MSFT] wrote: >>> Currently, the separator between Snapin (ie: Microsoft.PowerShell.Core) >>> and Provider (ie: FileSystem) must be a back-slash. >>> >>> This doesn't need to be this way, though. Please file a bug on Connect. >>> >>> -- >>> Lee Holmes [MSFT] >>> Windows PowerShell Development >>> Microsoft Corporation >>> This posting is provided "AS IS" with no warranties, and confers no >>> rights. >>> >>> "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message >>> news:OIiI18%235GHA.4304@TK2MSFTNGP03.phx.gbl... >>>> OK, I think my confusion was the difference between \ and / in that; is >>>> this a bug? >>>> >>>> ls Microsoft.PowerShell.Core\FileSystem::C:\ >>>> >>>> works as expected >>>> >>>> ls Microsoft.PowerShell.Core/FileSystem::C:/ >>>> >>>> throws: >>>> >>>> Get-ChildItem : Cannot find a provider with name >>>> 'Microsoft.PowerShell.Core/FileSystem'. >>>> At line:1 char:3 >>>> + ls <<<< Microsoft.PowerShell.Core/FileSystem::C:/ >>>> >>>> Should these behaviors be different? >>>> >>>> Nick >>>> >>>> Lee Holmes [MSFT] wrote: >>>>> Can you give an example of the command that fails? You can see the >>>>> full PowerShell path to an item this way: >>>>> >>>>> PS:6 > (get-item c:\temp\test.txt).PsPath >>>>> Microsoft.PowerShell.Core\FileSystem::C:\temp\test.txt >>>>> >>>>> -- >>>>> Lee Holmes [MSFT] >>>>> Windows PowerShell Development >>>>> Microsoft Corporation >>>>> This posting is provided "AS IS" with no warranties, and confers no >>>>> rights. >>>>> >>>>> "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message >>>>> news:upeCeb95GHA.3452@TK2MSFTNGP05.phx.gbl... >>>>>> I'm fixing up my FtpProvider, and I'm getting a *little* confused as >>>>>> to how providers are qualified now in a full PSPath; is it >>>>>> <SnapInName>/<ProviderName>::<DriveName:/<Folder>/<File> ? >>>>>> >>>>>> When I try to use this, PS tells me that it can't find a provider >>>>>> named 'Howell.PowerShell.Provider.Ftp/Ftp', and my snapin is named >>>>>> Howell.PowerShell.Provider.Ftp and my provider is named Ftp. >>>>>> >>>>>> Thanks, >>>>>> Nick > > |
My System Specs![]() |
| | #8 (permalink) |
| Guest | Re: Provider Resolution? It's UNC-pathing; it simply provides a qualifier to describe the item domain you're working in. For example, if I want to refer to the HKLM\Software registry key without a mapped drive, I could just use: Registry::HKLM/Software You'll notice that this works as well: Get-Item Registry::HKLM/Software/ So the <Name>:: simply means "the domain for the item that follows has to be <Name>" With the FTP provider, I would expect the following usages (using a name I prefer, 'Howell\Ftp') The PowerShell-universal syntax for referring to the Howell.Ftp provider connected to ftp.microsoft.com would then be this: Howell\Ftp::ftp.microsoft.com The top-level "location" "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message news:OUY40OX6GHA.4608@TK2MSFTNGP05.phx.gbl... >I see; I guess I fundamentally misunderstand what the meaning of >provider-qualifying a path is. I had thought that it just got you a list of >all the drives in that provider...what precisely is it for, then? > > Thanks, > Nick > > > Lee Holmes [MSFT] wrote: >> The Drive parameter refers to the PsDrive that your path specifies, not >> the FileSystem drive of the target. The fully qualified path that you >> gave below could easily map to a data store that has no PowerShell drives >> configured. >> >> For example: >> >> [C:\temp] >> PS:21 > new-PSDrive MyDocs FileSystem >> ([Environment]::GetFolderPath("MyDocuments")) >> >> Name Provider Root >> ---- -------- ---- >> MyDocs FileSystem D:\documents >> >> >> Suggestion: An alias for New-PSDrive is ndr >> Suggestion: An alias for New-PSDrive is mount >> >> [C:\temp] >> PS:22 > $r = Resolve-Path mydocs:\ >> Suggestion: An alias for Resolve-Path is rvpa >> >> [C:\temp] >> PS:23 > $r.drive >> >> Name Provider Root >> ---- -------- ---- >> MyDocs FileSystem D:\documents >> >> -- >> Lee Holmes [MSFT] >> Windows PowerShell Development >> Microsoft Corporation >> This posting is provided "AS IS" with no warranties, and confers no >> rights. >> >> >> Since your example doesn't refer to a >> "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message >> news:%237hdAqN6GHA.2380@TK2MSFTNGP02.phx.gbl... >>> Bug filed. What about this: >>> >>>> $r = resolve-path C:/ >>>> $r.Drive -eq $null >>> False >>>> $r = resolve-path Microsoft.PowerShell.Core\FileSystem::C:/ >>>> $r.Drive -eq $null >>> True >>> >>> If you super-qualify (that's what I've taken to calling the >>> snapin-quaified path) the path, it doesn't have a drive. This popped up, >>> again, in my FtpProvider (particularly the CopyFs function, if you're >>> curious). >>> >>> Nick >>> >>> Lee Holmes [MSFT] wrote: >>>> Currently, the separator between Snapin (ie: Microsoft.PowerShell.Core) >>>> and Provider (ie: FileSystem) must be a back-slash. >>>> >>>> This doesn't need to be this way, though. Please file a bug on >>>> Connect. >>>> >>>> -- >>>> Lee Holmes [MSFT] >>>> Windows PowerShell Development >>>> Microsoft Corporation >>>> This posting is provided "AS IS" with no warranties, and confers no >>>> rights. >>>> >>>> "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message >>>> news:OIiI18%235GHA.4304@TK2MSFTNGP03.phx.gbl... >>>>> OK, I think my confusion was the difference between \ and / in that; >>>>> is this a bug? >>>>> >>>>> ls Microsoft.PowerShell.Core\FileSystem::C:\ >>>>> >>>>> works as expected >>>>> >>>>> ls Microsoft.PowerShell.Core/FileSystem::C:/ >>>>> >>>>> throws: >>>>> >>>>> Get-ChildItem : Cannot find a provider with name >>>>> 'Microsoft.PowerShell.Core/FileSystem'. >>>>> At line:1 char:3 >>>>> + ls <<<< Microsoft.PowerShell.Core/FileSystem::C:/ >>>>> >>>>> Should these behaviors be different? >>>>> >>>>> Nick >>>>> >>>>> Lee Holmes [MSFT] wrote: >>>>>> Can you give an example of the command that fails? You can see the >>>>>> full PowerShell path to an item this way: >>>>>> >>>>>> PS:6 > (get-item c:\temp\test.txt).PsPath >>>>>> Microsoft.PowerShell.Core\FileSystem::C:\temp\test.txt >>>>>> >>>>>> -- >>>>>> Lee Holmes [MSFT] >>>>>> Windows PowerShell Development >>>>>> Microsoft Corporation >>>>>> This posting is provided "AS IS" with no warranties, and confers no >>>>>> rights. >>>>>> >>>>>> "Nick Howell" <msnews-0.5.nlhowell@spamgourmet.com> wrote in message >>>>>> news:upeCeb95GHA.3452@TK2MSFTNGP05.phx.gbl... >>>>>>> I'm fixing up my FtpProvider, and I'm getting a *little* confused as >>>>>>> to how providers are qualified now in a full PSPath; is it >>>>>>> <SnapInName>/<ProviderName>::<DriveName:/<Folder>/<File> ? >>>>>>> >>>>>>> When I try to use this, PS tells me that it can't find a provider >>>>>>> named 'Howell.PowerShell.Provider.Ftp/Ftp', and my snapin is named >>>>>>> Howell.PowerShell.Provider.Ftp and my provider is named Ftp. >>>>>>> >>>>>>> Thanks, >>>>>>> Nick >> |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| WMI Provider | Floridaguy | Vista mail | 13 | 12-14-2007 10:23 AM |
| WMI Provider | Floridaguy | Vista mail | 0 | 10-12-2007 09:54 AM |
| Certificate Provider | Joe G | PowerShell | 5 | 09-06-2007 11:00 AM |
| which provider is best ? | acejase | Vista General | 3 | 06-18-2007 12:21 PM |
| SSL Protocol Provider | hjkim.ajou@gmail.com | Vista security | 0 | 04-08-2007 11:41 PM |