none
object reference not set to an instance of an object RRS feed

  • Question

  • I added a managed account into SharePoint and I accidentally deleted the account from Active Directory before removing from SharePoint first.

    I'm now getting this error when I try deleting it from SharePoint Central Admin -

    'Object Reference not set to an instance of an object'

    I am getting this error because I deleted the account from Active Directory before deleting from SharePoint.

    I've tried removing using PowerShell and still no luck, I used Get-Spmanaged account > Remove-spmanaged account domain\username.

    Any ideas?

    Thanks


    Thursday, August 15, 2013 11:50 AM

Answers

  • It might just be formatting but that doesn't look like valid PowerShell.

    $ManAcc = Get-SPManagedAccount -Identity "Domain\UserName"
    Write-Output "Deleting $ManAcc"
    $ManAcc | Remove-SPManagedAccount -confirm:$false
    That would let you see if the PS is finding the correct account at all (line 2) or not.
    Thursday, August 15, 2013 11:58 AM