![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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 | pspath not neccisarly unique i would presume for a different location that pspath would be different (i.e unique).. basically i am making a tree of providers and their children and was using the pspath as the unique key, it works with all providers other than the cert one.. both of these return the same pspaths.. dir cert:\CurrentUser |Select-Object pspath dir cert:\LocalMachine | select-Object pspath is this by design (then its also by design that we can't assume the uniqueness of the pspath), or an oversight? i understand probably the flexibility you'd want with get-childitem, i.e virtual directories, unique sort of behaviours etc,different views of the same underlying data so its probably by design. Karl |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: pspath not neccisarly unique I believe that this is the underlying resource identifier, so there's no uniqueness guarantee it's all about how the resource sees the data - here's an example in the filesystem. PS> new-psdrive -psp filesystem -root "C:\documents and settings\jimtru" home Name Provider Root CurrentLocation ---- -------- ---- --------------- home FileSystem C:\documents and settings\jimtru PS> ls home:|select pspath PSPath ------ Microsoft.PowerShell.Core\FileSystem::C:\documents and settings\jimtru\Cookies .... PS> ls "c:\documents and settings\jimtru" |select pspath PSPath ------ Microsoft.PowerShell.Core\FileSystem::C:\documents and settings\jimtru\Cookies .... in the cert: case, I assume that it's just different views of the same data -- -- James Truher [MSFT] Windows PowerShell Development Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. <klumsy@xtra.co.nz> wrote in message news:1160349475.750344.285160@m73g2000cwd.googlegroups.com... >i would presume for a different location that pspath would be different > (i.e unique).. basically i am making a tree of providers and their > children and was using the pspath as the unique key, it works with all > providers other than the cert one.. > > both of these return the same pspaths.. > > dir cert:\CurrentUser |Select-Object pspath > dir cert:\LocalMachine | select-Object pspath > > is this by design (then its also by design that we can't assume the > uniqueness of the pspath), or an oversight? > > i understand probably the flexibility you'd want with get-childitem, > i.e virtual directories, unique sort of behaviours etc,different views > of the same underlying data so its probably by design. > > > Karl > |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: pspath not neccisarly unique thanks jim, that is a good usage case other than the certs. i saw you this morning down ath the ISV conf, but i don't know if you recognised me without my long hair. Karl |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: pspath not neccisarly unique The PsPath should be unique: A Windows PowerShell path is designated with the string "PSPath". It is the common mechanism for uniquely identifying an item obtainable through a virtual drive supported by a Windows PowerShell provider. http://windowssdk.msdn.microsoft.com.../ms714658.aspx The fact that the Certificate Provider outputs non-unique PSPaths is a problem in its output -- please file a bug. [C:\temp] PS:19 > dir Microsoft.PowerShell.Security\Certificate::AuthRoot Get-ChildItem : Cannot find path 'AuthRoot' because it does not exist. At line:1 char:4 + dir <<<< Microsoft.PowerShell.Security\Certificate::AuthRoot [C:\temp] PS:20 > dir Microsoft.PowerShell.Security\Certificate::LocalMachine\AuthRoot Directory: Microsoft.PowerShell.Security\Certificate::LocalMachine\AuthRoot Thumbprint Subject ---------- ------- F88015D3F98479E1DA553D24FD42BA3F43886AEF O=C&W HKT SecureNet CA SGC Root, C=hk F44095C238AC73FC4F77BF8F98DF70F8F091BC52 CN=Class 3TS Primary CA, O=Certplus, C= EF2DACCBEABB682D32CE4ABD6CB90025236C07BC O="Colegio Nacional de Correduria Publi EC0C3716EA9EDFADD35DFBD55608E60A05D3CBF3 E=ca@digsigtrust.com, CN=DST (UPS) Root E5DF743CB601C49B9843DCAB8CE86A81109FE48E E=info@valicert.com, CN=http://www.vali -- Lee Holmes [MSFT] Windows PowerShell Development Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. <klumsy@xtra.co.nz> wrote in message news:1160349475.750344.285160@m73g2000cwd.googlegroups.com... >i would presume for a different location that pspath would be different > (i.e unique).. basically i am making a tree of providers and their > children and was using the pspath as the unique key, it works with all > providers other than the cert one.. > > both of these return the same pspaths.. > > dir cert:\CurrentUser |Select-Object pspath > dir cert:\LocalMachine | select-Object pspath > > is this by design (then its also by design that we can't assume the > uniqueness of the pspath), or an oversight? > > i understand probably the flexibility you'd want with get-childitem, > i.e virtual directories, unique sort of behaviours etc,different views > of the same underlying data so its probably by design. > > > Karl > |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is there an opposite to Get-Unique? | Kryten | PowerShell | 4 | 12-07-2007 06:31 PM |
| BUG? Get-Item 'PSPath' => missing PSDriveInfo | =?Utf-8?B?ZHJlZXNjaGtpbmQ=?= | PowerShell | 3 | 09-11-2006 11:32 AM |
| Problem with Get-Unique and strings | =?Utf-8?B?ZHJlZXNjaGtpbmQ=?= | PowerShell | 8 | 08-17-2006 09:42 AM |
| Suggestion: New Parameter Type - PSProviderPath/PSProviderRoot (PsPath/PsRoot) | Alex K. Angelopoulos [MVP] | PowerShell | 4 | 07-02-2006 04:34 PM |
| Get-unique | Dave | PowerShell | 6 | 05-20-2006 04:15 AM |