The script is available for download from https://gallery.technet.microsoft.com/How-to-change-file-8acae28c.
This batch / command script will help in performing the below:
1. This will package all the sites with the help of msdeploy without the site contents and includes just the configurations.
2. This script will also move the application pools into the package
3. This resultant package along with the generated log files will be moved to a different location.
You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery