header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Nested parameters in a cmdlet
Last Post 31 Mar 2009 01:43 PM by EBGreen. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
Random BitsUser is Offline
New Member
New Member
Posts:6
Avatar

--
31 Mar 2009 01:40 PM
    Consider the following command. /drawshape is a parameter which requires a supporting parameter /shape. /shape can not be used if /drawshape is not preceding it. Similarly /radius is a dependent parameter for /shape. It can be used only if the shape is circle.

    graphix /drawshape /shape:circle /radius:10
    graphix /drawshape /shape:square /side:20

    Can this be implemented in cmdlets in powershell? It is a nested parameter situation.
    EBGreenUser is Offline
    Advanced Member
    Advanced Member
    Posts:855
    Avatar

    --
    31 Mar 2009 01:43 PM
    In V2 I think you might be able to do this with the ParameterSet Attribute but I have not tried to do it myself.
    "Look Ma...no strings!"
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer