![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| Guest | Support for "heterogeneous path hierarchies" in PS? Context Think of a SharePoint site and the URL that names it. e.g. http://server/site1/site1_1/site_1_1_1 site_1_1_1 is a SharePoint site that can have 2 kinds of child objects: subsites and lists/document libraries. Question 1. If I'm building a custom provider and a path can have 2 types of child objects, what should get-childitem return? -- Michael Herman Parallelspace / OpenCanal OpenCanal Community for WinFS: http://www.opencanal.com/community/winfs |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: Support for "heterogeneous path hierarchies" in PS? "Michael Herman (Parallelspace/OpenCanal)" <mwherman@nospam.parallelspace.nospam.net.nospam> wrote in message news:ukDMCOsdHHA.3272@TK2MSFTNGP03.phx.gbl... > Context > > Think of a SharePoint site and the URL that names it. e.g. > http://server/site1/site1_1/site_1_1_1 > > site_1_1_1 is a SharePoint site that can have 2 kinds of child objects: > subsites and lists/document libraries. > > Question > > 1. If I'm building a custom provider and a path can have 2 types of child > objects, what should get-childitem return? It should return all of the child objects. You can return more than one type of object. You will probably want to make sure that your Formats.ps1xml file specifies the same format for all of the objects returned because out-default only looks at the first object to determine how to format. If subsequent objects don't use that same format, they are displayed as a full object dump. |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: Support for "heterogeneous path hierarchies" in PS? Thanks John ...makes sense from a PS philosophy perspective. Also thanks for the heads-up re: Formats.ps1xml. -- Michael Herman Parallelspace / OpenCanal "John Vottero" <JVottero@mvpsi.com> wrote in message news:C55022AA-F794-4332-BB21-03186A17796E@microsoft.com... > "Michael Herman (Parallelspace/OpenCanal)" > <mwherman@nospam.parallelspace.nospam.net.nospam> wrote in message > news:ukDMCOsdHHA.3272@TK2MSFTNGP03.phx.gbl... >> Context >> >> Think of a SharePoint site and the URL that names it. e.g. >> http://server/site1/site1_1/site_1_1_1 >> >> site_1_1_1 is a SharePoint site that can have 2 kinds of child objects: >> subsites and lists/document libraries. >> >> Question >> >> 1. If I'm building a custom provider and a path can have 2 types of child >> objects, what should get-childitem return? > > It should return all of the child objects. You can return more than one > type of object. You will probably want to make sure that your > Formats.ps1xml file specifies the same format for all of the objects > returned because out-default only looks at the first object to determine > how to format. If subsequent objects don't use that same format, they are > displayed as a full object dump. > |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: Support for "heterogeneous path hierarchies" in PS? > It should return all of the child objects. You can return more than one > type of object. In a custom cmdlet, how would I receive/process/detect the different types of objects received via pipeline? -- Michael Herman Parallelspace / OpenCanal "John Vottero" <JVottero@mvpsi.com> wrote in message news:C55022AA-F794-4332-BB21-03186A17796E@microsoft.com... > "Michael Herman (Parallelspace/OpenCanal)" > <mwherman@nospam.parallelspace.nospam.net.nospam> wrote in message > news:ukDMCOsdHHA.3272@TK2MSFTNGP03.phx.gbl... >> Context >> >> Think of a SharePoint site and the URL that names it. e.g. >> http://server/site1/site1_1/site_1_1_1 >> >> site_1_1_1 is a SharePoint site that can have 2 kinds of child objects: >> subsites and lists/document libraries. >> >> Question >> >> 1. If I'm building a custom provider and a path can have 2 types of child >> objects, what should get-childitem return? > > It should return all of the child objects. You can return more than one > type of object. You will probably want to make sure that your > Formats.ps1xml file specifies the same format for all of the objects > returned because out-default only looks at the first object to determine > how to format. If subsequent objects don't use that same format, they are > displayed as a full object dump. > |
My System Specs![]() |
| | #5 (permalink) |
| Guest | Re: Support for "heterogeneous path hierarchies" in PS? "Michael Herman (Parallelspace/OpenCanal)" <mwherman@nospam.parallelspace.nospam.net.nospam> wrote in message news:Oct5Iz%23dHHA.4964@TK2MSFTNGP04.phx.gbl... >> It should return all of the child objects. You can return more than one >> type of object. > > In a custom cmdlet, how would I receive/process/detect the different types > of objects received via pipeline? > You use ParameterSetNames. If your Cmdlet can take a Widget or a Gadget as parameter 0, you define both parameters, set both to position 0 but give them different ParameterSetNames. Then, in ProcessRecord you can look at the value of ParameterSetName to see which object you have. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| How to restore "RUN" and "Help and Support" commands | General Discussion | |||
| Problems with the "Require trusted path for credential entry" setting | Vista security | |||
| "select Name,Path from Win32_Share" permissions required by ASP.NET to return paths, | Vista security | |||
| Changing default path of "My Documents" (User files)to D: drive? | Vista file management | |||
| "Open command prompt here" and "Copy as path" | Vista performance & maintenance | |||