• How to Disable and/or Delete the Guest Account on Windows

    From Marion@21:1/5 to All on Wed Feb 12 18:49:37 2025
    XPost: alt.comp.microsoft.windows, alt.comp.os.windows-11

    I was removing unused accounts from the command line on
    Windows 10 and I noticed that the Guest account was
    apparently not empty & not disabled, so I wiped it out.

    Here are the commands I ran if you need them in the future.
    (They should work for any account, I would think, right?)

    Please let me know if I missed anything important to
    run when you're wiping out an entire account on Windows 10.

    Note: I'm not sure if there is even a Guest account on Win11???

    Win+R > cmd {control+shift+enter}
    C:\Windows\system32> net user
    User accounts for \\Marion
    --------------------------------------------------------------
    Marion Administrator DefaultAccount
    Guest WDAGUtilityAccount User1
    User2 User3
    The command completed successfully.

    C:\Windows\system32> net user user1 /delete
    The command completed successfully.
    C:\Windows\system32>net user user2 /delete
    The command completed successfully.
    C:\Windows\system32>net user user3 /delete
    The command completed successfully.

    C:\Windows\system32> net user
    User accounts for \\Marion
    --------------------------------------------------------------
    Marion Administrator DefaultAccount
    Guest WDAGUtilityAccount
    The command completed successfully.

    C:\Windows\system32> wmic useraccount where name="Guest" get disabled
    Disabled
    FALSE

    C:\Windows\system32> net user guest /active:no
    The command completed successfully.

    C:\Windows\system32> wmic useraccount where name="Guest" get disabled
    Disabled
    TRUE

    C:\Windows\system32> net localgroup
    Aliases for \\Marion
    -----------------------------------------------------------------
    *Access Control Assistance Operators
    *Administrators
    *Backup Operators
    *Cryptographic Operators
    *Device Owners
    *Distributed COM Users
    *docker-users
    *Event Log Readers
    *Guests
    *Hyper-V Administrators
    *IIS_IUSRS
    *Network Configuration Operators
    *Performance Log Users
    *Performance Monitor Users
    *Power Users
    *Remote Desktop Users
    *Remote Management Users
    *Replicator
    *System Managed Accounts Group
    *Users
    The command completed successfully.\

    C:\Windows\system32> net user Guest
    User name Guest
    Full Name
    Comment Built-in account for guest access to the computer/domain
    User's comment
    Country/region code 000 (System Default)
    Account active No
    Account expires Never

    Password last set 2/12/2025 11:11:11 AM
    Password expires Never
    Password changeable 2/12/2025 11:11:11 AM
    Password required No
    User may change password No

    Workstations allowed All
    Logon script
    User profile
    Home directory
    Last logon 10/24/2024 1:14:11 AM

    Logon hours allowed All

    Local Group Memberships *Users
    *Guests
    Global Group memberships *None
    The command completed successfully.

    C:\Windows\system32> net localgroup Users Guest /delete
    The command completed successfully.

    C:\Windows\system32> dir C:\Users\Guest
    Volume in drive C has no label.
    Volume Serial Number is F9A4-23AD

    Directory of C:\Users\Guest

    10/24/2024 10:00 AM <DIR> .
    10/24/2024 10:00 AM <DIR> ..
    10/24/2024 10:01 AM <DIR> Documents
    10/24/2024 10:02 AM <DIR> Desktop
    10/24/2024 10:03 AM <DIR> Downloads
    5 File(s) 0 bytes
    5 Dir(s) 123,456,789,012 bytes free

    C:\Windows\system32> rd /s /q C:\Users\Guest
    C:\Windows\system32>

    C:\Windows\system32> net localgroup Administrators Guest /delete

    C:\Windows\system32> net localgroup "guests"
    Alias name guests
    Comment Guests have the same access as members of the Users group by default, except for the Guest account which is further restricted
    Members
    ----------------------------------------------------------------
    Guest
    The command completed successfully.

    C:\Windows\system32> wmic useraccount where name="Guest" get name,sid,disabled
    Disabled Name SID
    TRUE Guest S-1-5-21-8282494282-384228012-812822281-128

    C:\Windows\system32> sc query type= service state= all|findstr /i guest
    SERVICE_NAME: vmicguestinterface
    DISPLAY_NAME: Hyper-V Guest Service Interface
    DISPLAY_NAME: Hyper-V Guest Shutdown Service

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)