Here is a guide as you do need to remove some pieces from a ps1 file and configure your file correctly. This guide is for SP 2013 Foundation, if doing SP 2010 Foundation the same will be true except that you can deploy the Secure Store Service and don't use the script within this guide to create your Search Application, use AutoSPInstaller to do that for you instead.
http://sergioblogs.blog.co.uk/2014/02/21/using-autospinstaller-to-install-sharepoint-foundation-17801667/
http://sergioblogs.blog.co.uk/2014/02/21/using-autospinstaller-to-install-sharepoint-foundation-17801667/