Users and Groups on This PC

Every Windows PC has its own list of accounts and groups: Get-LocalUser and Get-LocalGroup read them, Get-LocalGroupMember shows who is in a group such as Administrators, and a quick check tells you whether this window runs as administrator; adding an account takes an administrator window, so rehearse it with -WhatIf.

Updated

Cheat sheet for the lesson Users and Groups on This PC: Every Windows PC has its own list of accounts and groups: Get-LocalUser and Get-LocalGroup read them, Get-LocalGroupMember shows who is in a group such as Administrators, and a quick check tells you whether this window runs as administrator…
Category
PowerShell
Level
Journeyman
Tags
administrator, get-localgroupmember, get-localuser, local-account, local-group, operating-system, powershell, user-account-control