# Get-ADUser all properties issue - LockedOut property is missing

**URL:** <https://forums.powershell.org/t/get-aduser-all-properties-issue-lockedout-property-is-missing/11542>\
**Category:** PowerShell Help\
**Created:** [October 25, 2018, 3:03am UTC](https://forums.powershell.org/t/get-aduser-all-properties-issue-lockedout-property-is-missing/11542 "2018-10-25T03:03:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aduzsardi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/aduzsardi/32/112_2.png) [@aduzsardi](https://forums.powershell.org/u/aduzsardi)\
**Post date:** [October 25, 2018, 3:03am UTC](https://forums.powershell.org/t/get-aduser-all-properties-issue-lockedout-property-is-missing/11542/1 "2018-10-25T03:03:44Z")

</div>

Hi,

I have a strange issue , as the title says , when i issue a command on a powershell console in Windows 2016 DC like

```
Get-ADUser myuser -Properties *
```

The LockedOut property (and possible others) is not displayed , but on another windows server 2016 powershell console is displayed.

```
PS Z:\> Compare-Object -ReferenceObject $(get-aduser myuser -Properties *) -DifferenceObject $(Import-Clixml .\myuser.xml) -Property lockedout

lockedout SideIndicator
--------- -------------
          =>
False <=
```

Difference Server

```
Name Value
---- -----
PSVersion 5.1.14393.2515
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.2515
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```

Reference Server

```
PS Z:\> $PSVersionTable

Name Value
---- -----
PSVersion 5.1.14393.2580
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.2580
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```

Any ideas ?

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [October 25, 2018, 3:50am UTC](https://forums.powershell.org/t/get-aduser-all-properties-issue-lockedout-property-is-missing/11542/2 "2018-10-25T03:50:16Z")

</div>

What is in the object that you used to create myuser.xml. If you didn’t use -Properties \* for that execution, then these properties will not show.

---

<div class="post-metadata">

**Author:** ![js2010](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@js2010](https://forums.powershell.org/u/js2010)\
**Post date:** [October 25, 2018, 10:15am UTC](https://forums.powershell.org/t/get-aduser-all-properties-issue-lockedout-property-is-missing/11542/3 "2018-10-25T10:15:21Z")

</div>

It works for me. Is it possible that before you exported to xml, you didn’t specify the “-properties \*” option to get-aduser?

---

<div class="post-metadata">

**Author:** ![fredrik-kacsmarck](https://avatars.discourse-cdn.com/v4/letter/f/a183cd/32.png) [@fredrik-kacsmarck](https://forums.powershell.org/u/fredrik-kacsmarck)\
**Post date:** [October 25, 2018, 10:51am UTC](https://forums.powershell.org/t/get-aduser-all-properties-issue-lockedout-property-is-missing/11542/4 "2018-10-25T10:51:24Z")

</div>

Where the lockout is not visible, are you running the powershell session as administrator?  
Meaning selecting “Run As Administrator” when you launch powershell.

Some fields are not visible without it.

---

<div class="post-metadata">

**Author:** ![aduzsardi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/aduzsardi/32/112_2.png) [@aduzsardi](https://forums.powershell.org/u/aduzsardi)\
**Post date:** [October 26, 2018, 4:47am UTC](https://forums.powershell.org/t/get-aduser-all-properties-issue-lockedout-property-is-missing/11542/5 "2018-10-26T04:47:54Z")

</div>

Hi , thanks for the the replies.  
Its strange , i haven’t run as administrator in either of the cases but one of the servers is actually a Win 2016 Core , and i noticed that even though i login with my Active Directory account , which is an Enterprise Admin , when it opens the cmd prompt it is opened as administrator , and consequently when i run ‘start powershell’, the powershell console is also opened as administrator. (i’m talking about RDP login/connection here)

On the server where i exported the myuser.xml , i did run the Get-ADUser with -Properties \* and not opened the console as administrator.  
However , as i was reading the replies , i deleted the shortcut on the taskbar , pined it again and now it does display the LockedOut property 🙂  
I really have no idea what was the issue or if there were other properties also that were not displayed , maybe i should have run a measure-object on the properties to see a count.

Now i guess it’s to late , but are the same on both servers.

```
PS C:\Users\sysadmin> get-aduser sysadmin -Properties * | Get-Member -MemberType Properties | measure -Line | select lines

Lines
-----
  117
```

Also , should it display the powershell edition as ‘Desktop’ ? 🙂  
Thank you!

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [October 26, 2018, 6:08am UTC](https://forums.powershell.org/t/get-aduser-all-properties-issue-lockedout-property-is-missing/11542/6 "2018-10-26T06:08:50Z")

</div>

Yes, the edition will show as Desktop even for Server OS

---

<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:34pm UTC](https://forums.powershell.org/t/get-aduser-all-properties-issue-lockedout-property-is-missing/11542/7 "2024-05-16T20:34:47Z")

</div>


