title: Running multiple commands in a if statement
body: <p>I'm looking to modify the below <a href="/questions/tagged/powershell" class="post-tag" title="show questions tagged &#39;powershell&#39;" rel="tag">powershell</a> script to do two things on an if statement:</p>
  
  <pre><code>if ($PsCmdlet.ParameterSetName -ieq "DumpCreds")
  {
      $ExeArgs = "privilege::debug"
  
  }
  elseif ($PsCmdlet.ParameterSetName -ieq "DumpCerts")
  {
      $ExeArgs = "crypto::cng crypto::capi `"crypto::certificates /export`" `"crypto::certificates /export /systemstore:CERT_SYSTEM_STORE_LOCAL_MACHINE`" exit"
  }
  else
  {
      $ExeArgs = $Command
  }`
  </code></pre>
  
  <p>The line where it reads - <code>$exeargs = "privilege::debug"</code>, I need run that and I also need to run - <code>$ExeArgs = "sekurlsa::logonpasswords"</code>  The privilege one needs to run first followed by the logonpasswords one.</p>
  
  <p>How do I run 2 commands in 1 if statement in a <a href="/questions/tagged/powershell" class="post-tag" title="show questions tagged &#39;powershell&#39;" rel="tag">powershell</a> script?</p>