Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

[Question] The Search Filter Cannot be Recognized

$
0
0
foreach ($user in $users) { #Search in specified OU and Update existing attributes Get-ADUser -Filter "EmailAddress -eq '$($user.EmailAddress)'" -Properties * -SearchBase "<redacted>" | Set-ADUser -Title $($user.Title) -OfficePhone $($user.OfficePhone) -EmailAddress $($user.EmailAddress) } 

Have been using this to update AD attributes and then out of no where I get the error message “The search filter cannot be recognized”. I haven’t changed a single thing in the code. Anyone have an idea on why this would randomly stop working?

submitted by /u/Keith_St0ne
[link] [comments]

The post [Question] The Search Filter Cannot be Recognized appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Latest Images

Trending Articles



Latest Images