Skip to content

Discover-PSMSSQLServers - Cannot index into a null array #5

@amavarick

Description

@amavarick

I'm getting the following error when running Discover-PSMSSQLServers

Processing 4923 (user and computer) accounts with MS SQL SPNs discovered in AD Forest DC=domain,DC=tld

Cannot index into a null array.
At C:\Temp\Discover-PSMSSQLServers.ps1:166 char:93
+[string]$ADServiceAccountSAMAccountName = $ADServiceAccountInfo[ <<<< 0].Properties.samaccountname + CategoryInfo : InvalidOperation: (0:Int32) [], RuntimeException + FullyQualifiedErrorId : NullArray

Thank you for your time!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions