October 30th, 2019

PowerTip: Identify if CredentialGuard is enabled with Windows PowerShell

Doctor Scripto
Scripter

Summary: Easily identify if Credential Guard is enabled using the Get-ComputerInfo Cmdlet in Windows 10

A picture containing scissors Description automatically generated

Question: Hey Doctor Scripto, how can I tell if CredentialGuard has been enabled on my Windows 10 computer?

Answer: Just use the Get-ComputerInfo Cmdlet and target the DeviceGaurdSecurityServicesConfigured property. The following line will produce a Boolean $TRUE if it is enabled.

‘CredentialGuard’ -match ((Get-ComputerInfo).DeviceGuardSecurityServicesConfigured)

PowerShell, Doctor Scripto, PowerTip, Credential Guard, Paul Greeley

 

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

3 comments

Discussion is closed. Login to edit/delete existing comments.

Newest
Newest
Popular
Oldest
  • Dmitry Tolstoy

    If it’s epmty it’s always ‘True’:
    > ‘ILoveScriptingGuy’ -match ((Get-ComputerInfo).DeviceGuardSecurityServicesConfigured)
    True

    It should be like this:
    > ((Get-ComputerInfo).DeviceGuardSecurityServicesConfigured) -match ‘CredentialGuard’
    False

  • Max

    There’s also “DeviceGuardSecurityServicesRunning” which indicates if it’s actually Running.

    • Sean KearneyMicrosoft employee

      Nice share on that additional property! Thanks!

'; block.insertAdjacentElement('beforebegin', codeheader); let button = codeheader.querySelector('.copy-button'); button.addEventListener("click", async () => { let blockToCopy = block; await copyCode(blockToCopy, button); }); } }); async function copyCode(blockToCopy, button) { let code = blockToCopy.querySelector("code"); let text = ''; if (code) { text = code.innerText; } else { text = blockToCopy.innerText; } try { await navigator.clipboard.writeText(text); } catch (err) { console.error('Failed to copy:', err); } button.innerText = "Copied"; setTimeout(() => { button.innerHTML = '' + svgCodeIcon + ' Copy'; }, 1400); }

Feedback