Test SQL Server connection with sqlcmd using machine name
You would generally not find an Application pool using the computer account to connect to SQL Server. At most I would not want to allow that type of configuration. 

You should be able to accomplish it by running the process as the local system account,  NT AUTHORITY\SYSTEM. You can do this by using psexec. You would just specify -s parameter to execute it as the system account. 

I think something like this should work: 

psexec -s "sqlcmd -S myserver -E"