Solved

List user account names for anyone with TERMED in the description

Posted on 2013-11-08
6
511 Views
Last Modified: 2013-11-08
Hey guys,

For the life of me, i cannot figure out how to whip up a command that will list all AD users with the word TERMED in the description.  

FYI have have the scriptlogic's powershell extensions installed also.

Any advice?
0
Comment
Question by:vrmanrtell
  • 3
  • 3
6 Comments
 
LVL 57

Accepted Solution

by:
Mike Kline earned 250 total points
ID: 39634058
Give this a try using the native powershell cmdlets

Get-ADUser -Filter 'description -like "*termed*"' -properties *| FT samaccountname, description

Thanks

Mike
0
 

Author Comment

by:vrmanrtell
ID: 39634100
Bingo! thanks!!!!!!
0
 

Author Closing Comment

by:vrmanrtell
ID: 39634102
Thanks!
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 57

Expert Comment

by:Mike Kline
ID: 39634122
Glad to help out. by the way you have a lot of cool AD cmdlets at your disposal

http://adisfun.blogspot.com/2013/10/active-directory-powershell-cmdlets-in.html

Thanks

Mike
0
 

Author Comment

by:vrmanrtell
ID: 39634158
Hey, i tried to pipe to a csv and it came out weird.  is this not right?

Get-ADUser -Filter 'description -like "*termed*"' -properties *| FT samaccountname, description | Export-Csv AcctStatus.csv

it comes out

#TYPE Microsoft.PowerShell.Commands.Internal.Format.FormatStartData                              
ClassId2e4f51ef21dd47e99d3c952918aff9cd      pageHeaderEntry      pageFooterEntry      autosizeInfo      shapeInfo      groupingEntry
033ecb2bc07a4d43b5ef94ed5a35d280                        Microsoft.PowerShell.Commands.Internal.Format.TableHeaderInfo      
9e210fe47d09416682b841769c78b8a3                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c                              
27c87ef9bbda4f709f6b4002fa4af63c
0
 
LVL 57

Expert Comment

by:Mike Kline
ID: 39634177
for the export use select-object so

Get-ADUser -Filter 'description -like "*termed*"' -properties *| select-object samaccountname, description | Export-Csv AcctStatus.csv
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html) provided 218 attendees with a step-by-step guide for identifying Acti…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

813 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now