Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-01-24
7
Medium Priority
?
498 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 57

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 2000 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 57

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

Are You Ready for GDPR?

With the GDPR deadline set for May 25, 2018, many organizations are ill-prepared due to uncertainty about the criteria for compliance. According to a recent WatchGuard survey, a staggering 37% of respondents don't even know if their organization needs to comply with GDPR. Do you?

Question has a verified solution.

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

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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

730 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