What is the Guest account in Windows?
Windows guest account is a special user account designed to provide users with limited rights to the computer. It allows basic use, such as running programs and browsing the internet, but prevents system-wide changes, such as installing programs, changing settings, and accessing other users' files.
Although a guest account can be useful for temporary users or in public computers, it poses security risks that can expose the system to attacks.
How to Disable a Guest Account in Windows?
From PowerShell
Windows 10 and newer versions do not by default include an active guest account in the same way as earlier versions, but if the account is activated or you want to ensure that it cannot be used, you can follow these instructions.
- Open PowerShell with administrative privileges (Run as... Administrator)
- Check if the Guest account is enabled using the Get-LocalUser cmdlet.
- If enabled, disable it with the Disable-Localuser cmdlet.
PS C:\Windows\system32> Get-LocalUser Guest
Name Enabled Description
---- ------- -----------
Guest True Built-in account for guest access to the computer/domain
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32> Disable-LocalUser Guest
PS C:\Windows\system32> Get-LocalUser Guest
Name Enabled Description
---- ------- -----------
Guest False Built-in account for guest access to the computer/domain
Group Policy
You can, and should, make the change centrally with a group policy. The path is Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Local Policies -> Accounts: Guest account status
![](https://cdn.sanity.io/images/3unppnk2/ha-content/cd7e022a2f00fbbc4d505b29b8be59b8c479c100-772x388.png?w=1920&q=75&fit=clip&auto=format)
![](https://cdn.sanity.io/images/3unppnk2/ha-content/6ade851a330bdcf2780e431a36e29a6343136ede-1186x674.png?w=3840&q=75&fit=clip&auto=format)
![](https://cdn.sanity.io/images/3unppnk2/ha-content/eea6a624e92b074f85432776a75c36fed81fb52c-642x520.png?w=1920&q=75&fit=clip&auto=format)
Tasks
Disable guest account
You can do it either with group policy or directly locally with PowerShell. When the account is disabled, run Check.ps1 and enter flag 7.
Ticket 7
![hakatemia pro](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fpro_desktop_en.be4531e0.png&w=3840&q=75)
![hakatemia pro](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fpro_mobile_en.937d2b98.png&w=1920&q=75)
Ready to become an ethical hacker?
Start today.
As a member of Hakatemia you get unlimited access to Hakatemia modules, exercises and tools, and you get access to the Hakatemia Discord channel where you can ask for help from both instructors and other Hakatemia members.