CLI: Unextend / Extend Web Application
If you want to unextend (delete) your SharePoint site, this is an easier way to do it, blogged earlier.
STSADM.exe -o unextendvs -url http://%computername% -deletecontent -deleteiissites
Similar to this is the extend script.
STSADM.exe -o extendvs -sethostheader -url http://%computername% -apcreatenew -apidtype NetworkService -apidname SharePointSite -ownerlogin domain\username -owneremail someone@justsharepoint.com -lcid 1033 -sitetemplate STS#0 -exclusivelyusentlm
If you want Kerberos instead of NTLM, change the last parameter in the script to negotiate. Ignore warnings at your risk, but you do need to refer to the KB mentioned in the warning for additional steps that will be required to be carried out by your systems administrator.
You can find the scripts on my skydrive.
