List all Local Accounts on a Server

Copy the following Below into text pad and save as a .ps1, run script accordingly. Update network path if required.

Echo “Input computer name: ”

$Computer = Read-Host

$Credential = Get-Credential

Get-WmiObject -Class Win32_UserAccount -Filter  “LocalAccount=’True'” | Select PSComputername, Name, Status, Disabled, AccountType, Lockout, PasswordRequired, PasswordChangeable, SID | out-file “\shared\LocalAccounts.csv”