Forum Discussion
Query Active Directory for Computer Account Enabled/Disabled
- 6 years ago
Hi DSWigfield,
I test this in my enviornment, you could choose computer table, tehn expand User record in it , you will see the UserAccountControl in it
let Source = ActiveDirectory.Domains("domian"), domain name = Source{[Domain=" domain namexxx"]}[#"Object Categories"], computer1 = domain name{[Category="computer"]}[Objects], #"Expanded user" = Table.ExpandRecordColumn(computer1, "user", {"msDS-User-Account-Control-Computed", "userAccountControl"}, {"user.msDS-User-Account-Control-Computed", "user.userAccountControl"}), #"Removed Other Columns" = Table.SelectColumns(#"Expanded user",{"user.userAccountControl", "computer", "displayName"}) in #"Removed Other Columns"Then you could know the status based on value
You could refer to ms-DS-User-Account-Disabled attribute and UserAccountControl Attribute/Flag Values for details.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi DSWigfield,
I test this in my enviornment, you could choose computer table, tehn expand User record in it , you will see the UserAccountControl in it
let
Source = ActiveDirectory.Domains("domian"),
domain name = Source{[Domain=" domain namexxx"]}[#"Object Categories"],
computer1 = domain name{[Category="computer"]}[Objects],
#"Expanded user" = Table.ExpandRecordColumn(computer1, "user", {"msDS-User-Account-Control-Computed", "userAccountControl"}, {"user.msDS-User-Account-Control-Computed", "user.userAccountControl"}),
#"Removed Other Columns" = Table.SelectColumns(#"Expanded user",{"user.userAccountControl", "computer", "displayName"})
in
#"Removed Other Columns"
Then you could know the status based on value
You could refer to ms-DS-User-Account-Disabled attribute and UserAccountControl Attribute/Flag Values for details.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.