User Tools

Site Tools


windows:windows_adinfo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
windows:windows_adinfo [2021/10/06 21:15]
manu
windows:windows_adinfo [2023/02/15 22:04] (current)
manu
Line 1: Line 1:
 ====== Windows AD information in command line ====== ====== Windows AD information in command line ======
 +
 +<cli prompt='>'>​
 +C:​\Users\myuser1>​gpresult /r | find "​OU"​
 +    CN=MYUSER1,​OU=ALL Users,​OU=NDS,​DC=xxx,​DC=xxx,​DC=lu
 +        GPOUSER_ScreenSaver30m
 +</​cli>​
 +
 +List all groups of a user:
 +<cli prompt='>'>​
 +C:​\Users\myuser1>​ (GET-ADUSER –Identity myuser1 –Properties MemberOf | Select-Object MemberOf).MemberOf
 +</​cli>​
  
 Get the extensionAttribute attribute value for all Active Directory users using PowerShell Get the extensionAttribute attribute value for all Active Directory users using PowerShell
  
 How do I return the sAMAccountName and a particular attribute – in this case extensionAttribute1 for all Active Directory users in PowerShell How do I return the sAMAccountName and a particular attribute – in this case extensionAttribute1 for all Active Directory users in PowerShell
 +<cli prompt='>'>​
 +Get-ADUser username -Properties * | Select *
 +</​cli>​
 +
 <cli prompt='>'>​ <cli prompt='>'>​
 Get-ADUser -Properties extensionAttribute1 -Filter * | Select sAMAccountName,​ extensionAttribute1 | export-csv c:​\temp\extensionattribute1.csv Get-ADUser -Properties extensionAttribute1 -Filter * | Select sAMAccountName,​ extensionAttribute1 | export-csv c:​\temp\extensionattribute1.csv
Line 257: Line 272:
 x500uniqueIdentifier x500uniqueIdentifier
 </​code>​ </​code>​
 +
 +https://​www.easy365manager.com/​how-to-get-all-active-directory-user-object-attributes/​
windows/windows_adinfo.1633547717.txt.gz · Last modified: 2021/10/06 21:15 by manu