question

IanLindsay-760 avatar image
0 Votes"
IanLindsay-760 asked IanLindsay-760 answered

Cannot delete user, does not exist.

I have a user in my demo AD that I cannot delete. I am getting an error that it does not exist. Despise seeing it right there in the AD. Errors attached. Any ideas?
126707-delete-in-aduc.jpg126755-delete-in-adsi-edit.jpg


windows-active-directory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hello @IanLindsay-760

I would suggest you to please check this user properties and un tick prevent accident deletion.

Also , Please try to remove using below powershell command.

 Remove-ADUser MyUser -recursive -Confirm:$false

If you still can not delete please try to remove from ADSI.

If the reply was helpful, please don’t forget to upvote or accept as answer.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

IanLindsay-760 avatar image
0 Votes"
IanLindsay-760 answered

Accidental deletion is not checked. Did try to delete with ADSI edit, that was the 2nd error posted. And PS fails too:

Remove-ADUser : The specified account does not exist
At line:1 char:1
+ Remove-ADUser -Identity "CN=Fred Schnitzer,OU=Antarctica,OU=Lindsay,O ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (CN=Fred Schnitz...ancorp,DC=local:ADUser) [Remove-ADUser], ADException
+ FullyQualifiedErrorId : ActiveDirectoryServer:1317,Microsoft.ActiveDirectory.Management.Commands.RemoveADUser

In ADSI edit I did notice that the account does not have a SID.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.