I receive an error "cannot index into null array" for some machines. These machines have an $account.LastLoggedOnUserSID of S-1-5-21-####-####-####-500
I get the error Cannot index into a null array. on line 13, which is $groups = $ds.FindOne().Properties['memberof']
I think that we need to only access the 'MemberOf' property only if $ds.findone() has results.
I receive an error "cannot index into null array" for some machines. These machines have an
$account.LastLoggedOnUserSID
ofS-1-5-21-####-####-####-500
I get the error
Cannot index into a null array.
on line 13, which is$groups = $ds.FindOne().Properties['memberof']
I think that we need to only access the 'MemberOf' property only if $ds.findone() has results.
https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/security-identifiers-in-windows