title: Can I Talk to My Active Directory Certificate Authority?
body: <p>I've got a lot of servers. Most of those servers can talk to my AD's Certificate Authority, but some can't. When a server can't talk to the CA, calls to <code>Get-Certificate</code> crash the Powershell session. I'd like to wrap <code>Get-Certificate</code> in another function, which checks to see if the host can communicate with the AD Certificate Server. I'm not sure how to do that.</p>
  
  <p>The following will verify connectivity to an ADCS server:</p>
  
  <pre><code>certutil.exe -config - -ping
  </code></pre>
  
  <p>Unfortunately, this brings up a Window, which I can't script from Powershell. It's a cool feature, but I need something script-able.</p>
  
  <p>I believe I can use the Active Directory Certificate Services Admin. module (<a href="https://docs.microsoft.com/en-us/powershell/module/adcsadministration/?view=win10-ps" rel="nofollow noreferrer">adcsadministration</a>), but I'd really rather not have that dependency if I can help it.</p>
  
  <p>Is there anything else? If so, what?</p>
  
  <p>Thank you for any help you can provide.</p>