Saw a question asking how to Test local user doesn’t exist before creating. Windows 8 introduced the LocalAccounts module for Windows PowerShell. On Windows 10 1903 it runs in PowerShell v6/7.
There isn’t a Test-Localuser cmdlet but you can attempt… Read the full text.