Please refer, the script to Get Local User Accounts
The Users folder, which is located in the Local Users and Groups Microsoft Management Console (MMC) snap-in, displays default user accounts as well as the user accounts that you create. These default user accounts are created automatically when you install the operating system.
The script will display the Administrator account,local user account,guest account.
Please run the script procedure as either "system user" or Loggedinuser.