Link to home
Start Free TrialLog in
Avatar of taartero
taartero

asked on

Search AD with a command line/sript to list a group and it's "Notes"

Hello,

In our environment, we use the Note's field in AD to store the Owner and Co-Owner information.

I need a command line so that I can get the Note's information out of AD (pertaining to AD groups)
Avatar of Bill Prew
Bill Prew

You might want to take a look at ADFIND, it's a great free tool for getting info out pf AD, lots of options, and output formats, etc.

http://www.joeware.net/freetools/tools/adfind/

~bp
Avatar of taartero

ASKER

See the area in Yellow
temp.png
ASKER CERTIFIED SOLUTION
Avatar of SubSun
SubSun
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
With ADFIND, you can try a specific group like this:

adfind -f "&(objectcategory=group)(name=your-group-name)(info=*)" name info

Do you want to extract all groups, or just one or a subset?  Also, what format do you want the output in?

~bp
Your command gets the info I was looking for.
I changed it to be like this:
Get-ADGroup -filter * -Properties info | ? {$_.info -ne $null} | Export-Csv "C:\backup\1.csv"

this also gets the info:
Get-ADGroup -filter * -Properties info | ? {$_.info -ne $null} | fl name, info

unfortunately this doesn't since it only gives the 1st row in the Notes section:
Get-ADGroup -filter * -Properties info | ? {$_.info -ne $null} | ft -auto name, info

Before I saw your reply I was looking at this:
https://www.maxpowersoft.com/

looks pretty cool, but spendy
of course this is going to lead to my next question:
Powershell allows for Format Table, even with   -auto  for columnwidth

but what about  a way to use   FT      where number of rows is also AUTO
You can add a -wrap onto that to get multiple lines from the info field :
  Get-ADGroup -filter * -Properties info | ? {$_.info -ne $null} | ft -auto -wrap name, info

Regards,
Alastair.