title: Import-PfxCertificate without prompt?
body: <p>I have a script which runs <code>Import-PfxCertificate</code>. I want it to be able to run automatically, but I am unable to do this because of this prompt:</p>
  
  <p><a href="https://i.stack.imgur.com/k4G3S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k4G3S.png" alt="enter image description here"></a></p>
  
  <p>Is there a way to automatically answer "Yes" or to not show the prompt at all? The prompt won't show if I add the <code>-Confirm</code> flag, but then I can't get that to automatically answer "Y", so is there any possible way to automatically run <code>Import-PfxCertificate</code>?</p>
  
  <p>I tried a couple of simple approaches, none of which have worked:</p>
  
  <ol>
  <li>Setting <code>$ConfirmPreference</code> to <code>None</code></li>
  <li>Trying <code>echo "Y" | Import-PfxCertificate ...</code></li>
  <li>Trying <code>Import-PfxCertificate ... -Confirm:$false</code></li>
  </ol>