title: Adding parameter sets to my custom C# cmdlet with no parameter mandatory
body: <p>I have developed a custom c# cmdlet. It has three parameters (all of them are strings) and none of them are mandatory. Two of them belong to parameterset1 and the third belongs to parameterset2. It is working fine, when a user gives parameters from both the parameter sets then it gives message that they do not belong to same parameter set. But I'm getting two problems:</p>
  
  <ol>
  <li>When user doesn't give any parameter(because none of them are mandatory) then it throws the error Parameter set cannot be resolved using the specified named parameter</li>
  <li>When the user give first parameter and type - and then hitting tab should only show second parameter because first and second are in same parameter set but it is showing 2nd and 3rd which is not correct. Likewise it is showing 1st and 2nd even the user enter 3rd parameter first.</li>
  </ol>
  
  <p>Here is the code how I defined the parameters:</p>
  
  <pre><code>    [System.Management.Automation.Cmdlet(System.Management.Automation.VerbsCommon.Get, "Customcmd")]
      public class Get_Customcmd: System.Management.Automation.PSCmdlet
      {
          [System.Management.Automation.Parameter(Mandatory = false, ParameterSetName = "Set1")]
          public string Param1;
          [System.Management.Automation.Parameter(Mandatory = false, ParameterSetName = "Set1")]
          public string Param2;
          [System.Management.Automation.Parameter(Mandatory = false, ParameterSetName = "Set2")]
          public string Param2;
          protected override void ProcessRecord()
          {
  </code></pre>
  
  <p>Can anyone tell me did I miss anything? Should add anymore attributes to the parameters?</p>