So I’m working on a powershell script as a temporary workaround until budget for next year lets us implement MBAM. Script will run against all PC’s in a csv and write the recovery key to a text file for us on a hidden network share so we have a copy of the recovery key since Windows seems to change these every so often with no rhyme or reason. I’ve been googling for the past couple hours but I can’t find a simple command or solution that lets me simply insert that the condition for if being that bitlocker is enabled. Is there even a way to do this? Logic tells me there should but I could be wrong.<\/p>","upvoteCount":2,"answerCount":5,"datePublished":"2017-10-04T15:00:39.000Z","author":{"@type":"Person","name":"owengregory","url":"https://community.spiceworks.com/u/owengregory"},"acceptedAnswer":{"@type":"Answer","text":"
Something like this?<\/p>\n
$BLinfo = Get-Bitlockervolume\n\nif($blinfo.ProtectionStatus -eq 'On' -and $blinfo.EncryptionPercentage -eq '100'){\n write-output \"'$env:computername - '$($blinfo.MountPoint)' is encrypted\"\n}\n<\/code><\/pre>","upvoteCount":1,"datePublished":"2017-10-04T15:09:07.000Z","url":"https://community.spiceworks.com/t/check-if-bitlocker-is-enabled-in-if-else-powershell/610097/2","author":{"@type":"Person","name":"Neally","url":"https://community.spiceworks.com/u/Neally"}},"suggestedAnswer":[{"@type":"Answer","text":"
Advertisement
So I’m working on a powershell script as a temporary workaround until budget for next year lets us implement MBAM. Script will run against all PC’s in a csv and write the recovery key to a text file for us on a hidden network share so we have a copy of the recovery key since Windows seems to change these every so often with no rhyme or reason. I’ve been googling for the past couple hours but I can’t find a simple command or solution that lets me simply insert that the condition for if being that bitlocker is enabled. Is there even a way to do this? Logic tells me there should but I could be wrong.<\/p>","upvoteCount":2,"datePublished":"2017-10-04T15:00:39.000Z","url":"https://community.spiceworks.com/t/check-if-bitlocker-is-enabled-in-if-else-powershell/610097/1","author":{"@type":"Person","name":"owengregory","url":"https://community.spiceworks.com/u/owengregory"}},{"@type":"Answer","text":"
Yep. Exactly like that. Thank you!<\/p>","upvoteCount":0,"datePublished":"2017-10-04T15:12:10.000Z","url":"https://community.spiceworks.com/t/check-if-bitlocker-is-enabled-in-if-else-powershell/610097/3","author":{"@type":"Person","name":"owengregory","url":"https://community.spiceworks.com/u/owengregory"}},{"@type":"Answer","text":"
manage-bde -status c:\n<\/code><\/pre>\nThis does the trick too. You can run it from within powershell too ( even on powershell 2 )<\/p>","upvoteCount":1,"datePublished":"2017-10-04T15:24:59.000Z","url":"https://community.spiceworks.com/t/check-if-bitlocker-is-enabled-in-if-else-powershell/610097/4","author":{"@type":"Person","name":"edwineekelaers2","url":"https://community.spiceworks.com/u/edwineekelaers2"}},{"@type":"Answer","text":"
this doesn’t work…<\/p>\n
$BLinfo = manage-bde -status c:<\/strong>
\nif($blinfo.ProtectionStatus -eq ‘On’ -and $blinfo.EncryptionPercentage -eq ‘100’){
\nwrite-output “'$env:computername - ‘$($blinfo.MountPoint)’ is encrypted”
\n}<\/p>\ni need this to work on win7-8-10…<\/p>","upvoteCount":0,"datePublished":"2018-05-17T09:41:39.000Z","url":"https://community.spiceworks.com/t/check-if-bitlocker-is-enabled-in-if-else-powershell/610097/5","author":{"@type":"Person","name":"russring","url":"https://community.spiceworks.com/u/russring"}}]}}