Open CMD as Administrator:
Export AppPools
All
%windir%\system32\inetsrv\appcmd list apppool /config /xml > c:\apppools.xml
Single
%windir%\system32\inetsrv\appcmd list apppool “MyAppPool” /config /xml > c:\myapppool.xml
Export Sites
%windir%\system32\inetsrv\appcmd list site /config /xml > c:\sites.xml
or in txt format (not very useful)
%windir%\system32\inetsrv\appcmd list site > c:\sites.txt