Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 532
  • Last Modified:

List user account names for anyone with TERMED in the description

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
vrmanrtell
Asked:
vrmanrtell
  • 3
  • 3
1 Solution
 
Mike KlineCommented:
Give this a try using the native powershell cmdlets

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

Thanks

Mike
0
 
vrmanrtellAuthor Commented:
Bingo! thanks!!!!!!
0
 
vrmanrtellAuthor Commented:
Thanks!
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
Mike KlineCommented:
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
 
vrmanrtellAuthor Commented:
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
 
Mike KlineCommented:
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now