• One key difference between the tested methods appears to be the methods' security contexts. Replace your batch file with a test batch file that redirects WHOAMI.exe output to a text file (such as WHOAMI>>C:\whoranthis.txt). Run the same xp_cmdshell command, using both methods you have been testing, and compare the redirected text file (such as whoranthis.txt). If you still have the 2008 system, do the same test there.