# Bitlocker Status, Computer from AD

**URL:** <https://forums.powershell.org/t/bitlocker-status-computer-from-ad/12339>\
**Category:** PowerShell Help\
**Created:** [April 4, 2019, 3:53pm UTC](https://forums.powershell.org/t/bitlocker-status-computer-from-ad/12339 "2019-04-04T15:53:48Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@sokoban](https://forums.powershell.org/u/sokoban)\
**Post date:** [April 4, 2019, 3:53pm UTC](https://forums.powershell.org/t/bitlocker-status-computer-from-ad/12339/1 "2019-04-04T15:53:48Z")

</div>

Hi

I am looking for script there I can see Bitlocker Status on all computers from AD,

Please help

&nbsp;

Sokoban 😉

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [April 4, 2019, 4:03pm UTC](https://forums.powershell.org/t/bitlocker-status-computer-from-ad/12339/2 "2019-04-04T16:03:56Z")

</div>

Have you tried to search for it?

Google:[Bitlocker Status, Computer from AD](https://www.google.com/search?client=firefox-b-d&q=Bitlocker+Status%2C+Computer+from+AD)

or Microsoft Technet Script Gallery: [Retrieve BitLocker recovery information from AD DS](https://gallery.technet.microsoft.com/scriptcenter/6ef4ba51-3738-4dd6-a80d-dd8c93ffbde6).

---

<div class="post-metadata">

**Author:** ![pwshliquori](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/pwshliquori/32/222_2.png) [@pwshliquori](https://forums.powershell.org/u/pwshliquori)\
**Post date:** [April 4, 2019, 5:39pm UTC](https://forums.powershell.org/t/bitlocker-status-computer-from-ad/12339/3 "2019-04-04T17:39:42Z")

</div>

[pre]  
Get-ADObject -Filter “ObjectClass -eq ‘msFVE-RecoveryInformation’” -SearchBase “distinguishedComputerName” -Properties msFVE-RecoveryPassword  
[/pre]

pwshliquori

---

<div class="post-metadata">

**Author:** ![sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@sokoban](https://forums.powershell.org/u/sokoban)\
**Post date:** [April 5, 2019, 1:46am UTC](https://forums.powershell.org/t/bitlocker-status-computer-from-ad/12339/4 "2019-04-05T01:46:57Z")

</div>

[quote quote=149526][/quote]

et-ADObject : The supplied distinguishedName must belong to one of the following partition(s): 'XXXXXXXXXXXXXXXX  
At line:1 char:1

- Get-ADObject -Filter “ObjectClass -eq ‘msFVE-RecoveryInformation’” -S …
- 

```auto

```

- CategoryInfo : InvalidArgument: (🙂 [Get-ADObject], ArgumentException
- FullyQualifiedErrorId : ActiveDirectoryCmdlet:System.ArgumentException,Microsoft.ActiveDirectory.Management.Commands.GetADObject

Can you explain Why it’s not working ?

Sokoban

&nbsp;

---

<div class="post-metadata">

**Author:** ![pwshliquori](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/pwshliquori/32/222_2.png) [@pwshliquori](https://forums.powershell.org/u/pwshliquori)\
**Post date:** [April 5, 2019, 5:36am UTC](https://forums.powershell.org/t/bitlocker-status-computer-from-ad/12339/5 "2019-04-05T05:36:35Z")

</div>

That usually means that you supplied the wrong distinguished name. To get the distinguished name of the computer, use the `Get-ADComputer -Identity computer1 |Select-Object DistinguishedName`

pwshliquori

---

<div class="post-metadata">

**Author:** ![sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@sokoban](https://forums.powershell.org/u/sokoban)\
**Post date:** [April 8, 2019, 4:22am UTC](https://forums.powershell.org/t/bitlocker-status-computer-from-ad/12339/6 "2019-04-08T04:22:01Z")

</div>

ok,

I have All Computers in OU,

Get-ADComputer -Filter \* -SearchBase “OU=Clients,OU=TEST,DC=ad,DC=Test,DC=se” -Properties \* |  
Select -Property Name,OperatingSystem,

How will I do to get Bitlocker information here 😉

Sokoban

---

<div class="post-metadata">

**Author:** ![pwshliquori](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/pwshliquori/32/222_2.png) [@pwshliquori](https://forums.powershell.org/u/pwshliquori)\
**Post date:** [April 8, 2019, 5:41am UTC](https://forums.powershell.org/t/bitlocker-status-computer-from-ad/12339/7 "2019-04-08T05:41:53Z")

</div>

Take out the Select-Object portion of your script, you will not be able to use Get-ADObject if you are selecting properties from Get-ADComputer.

`Get-ADComputer -Filter * -SearchBase “OU=Clients,OU=Test,DC=ad,DC=test,DC=se” -Properties * |Get-ADObject`

If you would like to see how this works, please see Microsoft’s docs on the `Get-ADObject` Cmdlet under the `-Identity` parameter.

[https://docs.microsoft.com/en-us/powershell/module/addsadministration/get-adobject?view=win10-ps#required-parameters](https://docs.microsoft.com/en-us/powershell/module/addsadministration/get-adobject?view=win10-ps#required-parameters)

pwshliquori

---

<div class="post-metadata">

**Author:** ![simbrook](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@simbrook](https://forums.powershell.org/u/simbrook)\
**Post date:** [April 8, 2019, 5:55am UTC](https://forums.powershell.org/t/bitlocker-status-computer-from-ad/12339/8 "2019-04-08T05:55:48Z")

</div>

Also take out the -Properties \* only select the properties you wish to work with. -Properties \* is fine(ish) in a test lab but if you hit the whole domain with -Properties \* your net admin would have a fit 🙂

---

<div class="post-metadata">

**Author:** ![postanote](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@postanote](https://forums.powershell.org/u/postanote)\
**Post date:** [April 8, 2019, 9:39pm UTC](https://forums.powershell.org/t/bitlocker-status-computer-from-ad/12339/9 "2019-04-08T21:39:58Z")

</div>

This is a very common thing to do, and there are plenty of pre-built scripts publicly a to leverage or tweak as needed.  
So, little reason to do this from scratch, unless it’s a learning exercise. Even then, learn from others efforts when and where you can.

> Query BitLocker status on remote computers This PowerShell script will remotely query each computer found in the specified OU (using manage-bde.exe) to determine if BitLocker protection is on or off a https://gallery.technet.microsoft.com/scriptcenter/Query-BitLocker-status-on-f44e443c
> 
> How to get BitLocker Encryption Status for multiple computers (PowerShell)  
> This PowerShell script sample shows how to get BitLocker Encryption Status for multiple computers.
> 
> > **[Browse code samples](https://learn.microsoft.com/en-us/samples/browse/?redirectedfrom=TechNet-Gallery)**
> >
> > Get started with Microsoft developer tools and technologies. Explore our samples and discover the things you can build.

---

<div class="post-metadata">

**Author:** ![sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@sokoban](https://forums.powershell.org/u/sokoban)\
**Post date:** [April 9, 2019, 3:39am UTC](https://forums.powershell.org/t/bitlocker-status-computer-from-ad/12339/10 "2019-04-09T03:39:09Z")

</div>

I have trying run this one , [https://gallery.technet.microsoft.com/scriptcenter/How-to-get-BitLocker-193ef058](https://gallery.technet.microsoft.com/scriptcenter/How-to-get-BitLocker-193ef058)

**Step 1:** Right click PowerShell and select **Run as Administrator.**

**Step 2:** Then import the PowerShell script module using **Import-Module**.

**Step 3:** Run This

**Get-OSCBitlockerStatus -ComputerName "HUELVA" -Credential $cre**

Get error , Get-OSCBitlockerStatus : The term 'Get-OSCBitlockerStatus' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the p ath is correct and try again. At line:1 char:1 + Get-OSCBitlockerStatus -ComputerName "HUELVA" -Credential $cre + ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-OSCBitlockerStatus:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

Why error, please help 🙂

Sokoban

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:33pm UTC](https://forums.powershell.org/t/bitlocker-status-computer-from-ad/12339/11 "2024-05-16T20:33:01Z")

</div>

Closed on May 16, 2024, 8:33pm UTC


