Hi everyone,
I am trying to run the following command:
Get-ADUser -Filter * -SearchBase "OU=Users,OU=COB,DC=mydomain,DC=local" -Properties * -ErrorAction SilentlyContinue
It works at first then hits 'something' in AD and throws an error:
Get-ADUser : Object reference not set to an instance of an object.
At line:1 char:1
+ Get-ADUser -Filter * -SearchBase "OU=Users,OU=COB,DC=brampton,DC=ca" -Properties ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-ADUser], NullReferenceException
+ FullyQualifiedErrorId : Object reference not set to an instance of an object.,Microsoft.ActiveDirectory.Management.Commands.GetADUser
I don't really care what's causing it to fail, if it would just ignore whatever record it doesn't like and continued I would be fine with that.
Any suggestions?