Windows OS allows you to disable Command Prompt. To get rid of Command Prompt, follow the steps below. Type gpedit.msc in the Windows search box and then press Enter. In the Group Policy window, go to the path User Configuration > Administrative Templates > System. Under the System folder, double-click Prevent access to the command prompt from the right pane. Change the Setting to Enabled and click OK.