Solved

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

Posted on 2014-01-24
7
497 Views
Last Modified: 2014-01-24
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)
0
Comment
Question by:taartero
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 56

Expert Comment

by:Bill Prew
ID: 39807155
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
0
 

Author Comment

by:taartero
ID: 39807157
See the area in Yellow
temp.png
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 39807165
If you have Windows 2008 R2 or later Domain controller the you can try the following code to get the required details of groups..
Get-ADGroup -Filter * -Properties info | Select Name,info | Export-csv C:\report.csv -nti

Open in new window

0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 56

Expert Comment

by:Bill Prew
ID: 39807224
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
0
 

Author Closing Comment

by:taartero
ID: 39807394
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
0
 

Author Comment

by:taartero
ID: 39807406
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
0
 
LVL 5

Expert Comment

by:alicain
ID: 39807974
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.
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A hard and fast method for reducing Active Directory Administrators members.
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question