# Update the PATH variable
Sometimes when you first get your reverse shell, the system will throw `Command not found` errors for basic commands like `whoami` and `cmd.exe` . This because the `%PATH%` environment variable is not set with some good defaults.
```powershell
set PATH=%SystemRoot%\system32;%SystemRoot%;
# OR
set PATH=%PATH%C:\Windows\System32;C:\Windows\System32\WindowsPowerShell\v1.0;
```