Does anyone know why the system user on a domain-joined machine will return EVERY DOMAIN USER with this command (Windows 10)? I don’t even know how long it takes to finish. This is from a profile cleanup script.
I know now it’s much faster this way, but I don’t think of the system user is being a member of a domain:
get-wmiobject win32_useraccount -filter 'localaccount = true'