From 2673c823e8b36e573252d5c0aa842b6451c0606e Mon Sep 17 00:00:00 2001 From: devanladdu Date: Fri, 25 Sep 2026 11:44:59 -0400 Subject: [PATCH] Add Disable-GuestAccount PowerShell doc Add new docs/powershell/disable-guestaccount.md: a client-facing guide for the Disable-GuestAccount PowerShell script. Covers description, requirements (admin + Strapper logging module), usage examples (including -WhatIf), output files, troubleshooting, and changelog (initial version 2026-09-24). --- docs/powershell/disable-guestaccount.md | 62 +++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 docs/powershell/disable-guestaccount.md diff --git a/docs/powershell/disable-guestaccount.md b/docs/powershell/disable-guestaccount.md new file mode 100644 index 000000000..1870192f4 --- /dev/null +++ b/docs/powershell/disable-guestaccount.md @@ -0,0 +1,62 @@ +--- +id: '585e6715-2136-4b26-baca-d8f7e09f8b88' +slug: /585e6715-2136-4b26-baca-d8f7e09f8b88 +title: 'Disable-GuestAccount' +title_meta: 'Disable-GuestAccount' +keywords: ['guest', 'guest-account', 'local-user', 'disable', 'accounts'] +description: 'Disables the built-in Windows Guest account if it is enabled.' +tags: ['accounts', 'security', 'windows'] +draft: false +unlisted: false +last_update: + date: 2026-09-24 +--- + +## Description + +Disables the built-in Windows Guest account if it is enabled. If it is already disabled, nothing changes. It works even if the Guest account has been renamed. + +Use it when a security audit or policy requires the Guest account to be disabled. + +## Requirements + +- Run as administrator. +- Internet access to install the `Strapper` logging module. + +## Usage + +Disable the Guest account: + +```powershell +.\Disable-GuestAccount.ps1 +``` + +Preview the result without making changes: + +```powershell +.\Disable-GuestAccount.ps1 -WhatIf +``` + +## Output + +Results are written to these files in the script's folder: + +```text +Disable-GuestAccount-log.txt +Disable-GuestAccount-error.txt +``` + +You'll know it worked when the log shows `Disabled Guest account` or `already disabled`. + +## Troubleshooting + +| Problem | Cause | Solution | +| --- | --- | --- | +| The Guest account is enabled again later. | A Group Policy or Intune policy turns it back on. | Set **Accounts: Guest account status** to **Disabled** in that policy. | +| The log shows an error. | Windows blocked the change. | Check `Disable-GuestAccount-error.txt` for the reason. | + +## Changelog + +### 2026-09-24 + +- Initial version of the document.