How to Disable or Enable Data Execution Prevention (DEP) in Windows Server 2008

To Disable Data Execution Prevention, execute the following command from a command prompt:

bcdedit.exe /set {current} nx AlwaysOff

To enable Data Execution Protection, execute the following command from a command prompt:

bcdedit.exe /set {current} nx AlwaysOn