Solved

List user account names for anyone with TERMED in the description

Posted on 2013-11-08
6
525 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
[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
  • 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
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.

 
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

Problems using Powershell and Active Directory?

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
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 …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

623 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