+ Post New Thread
Results 1 to 4 of 4
Windows Thread, Powershell in Technical; Anyone help me out with a way to find users in AD with no First Name or Last Name?...
  1. #1

    Edu-IT's Avatar
    Join Date
    Nov 2007
    Posts
    7,140
    Thank Post
    403
    Thanked 622 Times in 568 Posts
    Rep Power
    181

    Powershell

    Anyone help me out with a way to find users in AD with no First Name or Last Name?

  2. #2

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    772
    Thank Post
    175
    Thanked 57 Times in 55 Posts
    Rep Power
    35
    Give This a try, modify the output path to a suitable location.

    GET-ADUser -Properties sAMAccountName -Filter {givenName -notlike "*" -and Surname -notlike "*"} | Select-Object -Property sAMAccountName | Export-Csv 'c:\Details.csv' -NoTypeInformation

  3. #3

    Join Date
    Mar 2013
    Location
    Northampton
    Posts
    90
    Thank Post
    15
    Thanked 22 Times in 15 Posts
    Rep Power
    7
    Code:
    Get-ADuser -filter {(surname -notlike "*") -and (givenname -notlike "*")}
    That should work.

    EDIT: Davit's is way better, use his.
    Last edited by madurham; 1st May 2014 at 01:21 PM.

  4. Thanks to madurham from:

    Davit2005 (1st May 2014)

  5. #4

    Edu-IT's Avatar
    Join Date
    Nov 2007
    Posts
    7,140
    Thank Post
    403
    Thanked 622 Times in 568 Posts
    Rep Power
    181
    Thanks :-)

SHARE:
+ Post New Thread

Similar Threads

  1. Powershell
    By Ric_ in forum Windows
    Replies: 3
    Last Post: 25th November 2008, 11:54 PM
  2. Exchange 2007 Powershell Help
    By ezzauk in forum Windows
    Replies: 0
    Last Post: 25th September 2008, 01:02 PM
  3. Replies: 0
    Last Post: 24th January 2008, 02:58 PM
  4. Microsoft Windows PowerShell v1.0
    By tarquel in forum Downloads
    Replies: 20
    Last Post: 26th March 2007, 07:32 PM
  5. PowerShell AKA MONAD RC1 available
    By CyberNerd in forum Windows
    Replies: 1
    Last Post: 26th April 2006, 08:27 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •