Skip to main content

Windows Administration · Windows 10, Windows 11

How to Disable Command Prompt (CMD) on Windows

On a shared or dedicated Windows PC, the Prevent access to the command prompt user policy can restrict Command Prompt for a defined group. Start by confirming whether its approved sign-in scripts or administration tools depend on batch processing.

By CtrlOne Team

Version-specific guidance

  • Windows 10

    Check Microsoft's edition and cumulative update requirements for the ADMX-backed MDM setting. Test any Windows 10 logon and operational batch scripts.

  • Windows 11

    Check Windows 11 build and edition coverage in the same Microsoft policy reference and verify the applied user scope.

Choose the users who need the restriction

In your authorized Group Policy editor, open User Configuration, Administrative Templates, System. Select Prevent access to the command prompt. Use the equivalent supported management setting if your organization delivers Windows policies through MDM.

Decide how to handle batch files

The policy has an option that separately controls command script processing. Leave required batch processing available when the selected users depend on logon, logoff, startup, shutdown, or Remote Desktop workflows. Have the owner confirm which workflows apply before choosing the setting.

Verify both restricted and approved workflows

Apply the policy to a representative standard-user pilot. Confirm that Command Prompt displays the policy restriction. Check expected scripts, applications and technician access using their intended roles. Record the results and practice restoring the approved prior policy in the pilot.

Pilot the Command Prompt policy

  1. Identify the affected accounts

    Confirm Windows editions, builds, and batch-processing dependencies.

  2. Configure the user policy

    Enable Prevent access to the command prompt in the pilot policy and choose the approved batch-processing setting.

  3. Verify scope and restore

    Test the pilot user and approved administration workflows, and confirm the authorized restore procedure.

Frequently asked questions

Will this change batch script processing?

The policy includes a separate script-processing option. Test your required batch-driven workflows before changing it.

Does this policy also restrict PowerShell?

Review PowerShell separately, using Windows application-control or scripting policies appropriate to the workload.

References

Review the shared-device baseline

Document why the account needs the restriction and verify approved workflows before assigning it beyond the pilot.