-
Notifications
You must be signed in to change notification settings - Fork 6
user_accounts_report.ps1
Corey Watson edited this page Dec 19, 2025
·
1 revision
Generates a comprehensive report of all local user accounts, group memberships, and profiles.
| Property | Value |
|---|---|
| Platform | Windows |
| Version | 1.0.0 |
| Category | User & Profile Management |
Generates a comprehensive report of all local user accounts, their group memberships, login sessions, and user profiles on the system. Provides a single view of all user-related information for auditing and troubleshooting.
- Windows 10/11 or Windows Server
- PowerShell 5.1+
- Admin privileges recommended for full details
None - script reports on current system state.
- Retrieves all local user accounts with details
- Queries group membership for each user
- Gets current active login sessions
- Lists all user profiles on disk
- Displays formatted report
| Code | Description |
|---|---|
| 0 | Success |
| 1 | Failure |
- Read-only operation, no changes made
- Reports all local users including disabled accounts
- Shows group membership for each user
- Displays active login sessions
- Lists user profile folders with last use time
[ LOCAL USER ACCOUNTS ]
--------------------------------------------------------------
Name Enabled LastLogon PasswordSet
---- ------- --------- -----------
Administrator False 12/1/2025 9:00 AM 11/15/2025
limehawk True 12/1/2025 10:30 AM 11/20/2025
DefaultAccount False <never> <never>
[ ADMINISTRATORS GROUP ]
--------------------------------------------------------------
[User] WORKSTATION\limehawk
[Group] WORKSTATION\Administrators
[ USER GROUP MEMBERSHIPS ]
--------------------------------------------------------------
limehawk:
- Administrators
- Users
[ ACTIVE LOGIN SESSIONS ]
--------------------------------------------------------------
USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME
limehawk console 1 Active none 12/1/2025 8:00 AM
[ USER PROFILES ON DISK ]
--------------------------------------------------------------
Profile Path Last Used Loaded Size(MB)
------------ --------- ------ --------
C:\Users\limehawk 12/1/2025 10:30 AM True 15234
C:\Users\Administrator 11/15/2025 2:00 PM False 1024
[ SUMMARY ]
--------------------------------------------------------------
Total Local Users : 3
Enabled Users : 1
Disabled Users : 2
Administrator Members : 2
User Profiles on Disk : 2
Computer Name : WORKSTATION
Domain/Workgroup : WORKGROUP
[ SCRIPT COMPLETED ]
--------------------------------------------------------------
- 2025-12-01 v1.0.0 Initial release