This one-liner will remove the intranet zone, change intranet to internet, custom, extranet, according to what your needs require
Get-SPWebApplication http://servername:port | Remove-SPWebApplication -Zone "Intranet"
IF the error message below happens on your next run of the above command to Remove extended zones,
get
Remove-SPWebApplication : An object of the type Microsoft.SharePoint.Administra
tion.SPIisWebsiteUnprovisioningJobDefinition named “Unprovisioning SecretZone” a
lready exists under the parent Microsoft.SharePoint.Administration.SPWebService
named “”. Rename your object or delete the existing object.
At line:1 char:24
+ Remove-SPWebApplication <<<< http://Servername:Port -Zone “intranet”
+ CategoryInfo : InvalidData: (Microsoft.Share…PWebApplication:
SPCmdletRemoveSPWebApplication) [Remove-SPWebApplication], SPDuplicateObje
ctException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRemoveSP
WebApplication
Follow these steps to resolve
Go to:
- Central Administration
- Monitoring
- Review job definitions
- Scroll to the bottom and click the “forward” arrow
- Look for “Unprovisioning Web Application (SharePoint Web Application Name)” (it will be a one-time schedule)
- Delete it