You should try Configuration Editor (included in IIS 7.5 and available for download for IIS 7.0 at http://www.iis.net/download/AdministrationPack), it can generate the AppCmd.exe commands automatically as well as javascript and managed code. Using it I generated the following (for default web site):
appcmd.exe set config "Default Web Site" -section:system.webServer/security/authentication/anonymousAuthentication /enabled:"False"
appcmd.exe set config "Default Web Site" -section:system.web/identity /impersonate:"True"
appcmd.exe set config "Default Web Site" -section:system.webServer/security/authentication/windowsAuthentication /enabled:"True" /commit:apphost
Note that the ones with commit:apphost are because the sections are locked by default which means they need to be set inside ApplicationHost.config using location paths.