Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

Search for username in ad with capitol letter

Is there any way I can search for ad users without it being case sensitive?

get-aduser -filter {surname -like "smith"} -Property DisplayName

This wont show me users with the last name Smith
0
Roccat
Asked:
Roccat
1 Solution
 
Dustin SaundersDirector of OperationsCommented:
It shouldn't be case sensitive, that code should work fine.  I tested it on our production domain and have no issue returning 'Smith'.
0
 
RoccatAuthor Commented:
You are right. I dont know what I was looking at earlier
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

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