#Examples of Alternate Access Mappings
#Allows to use SharePoint cmdlets from inside the Windows PowerShell command window

If ((Get-PsSnapin |?{$_.Name -eq “Microsoft.SharePoint.PowerShell”})-eq $null)

{

Add-PsSnapin Microsoft.SharePoint.PowerShell | Out-Null

}

#create the public URL

New-SPAlternateURL -URL “http://spsite” -Zone “Default” -WebApplication “SharePoint – 80” -ErrorAction SilentlyContinue

New-SPAlternateURL -URL “https://spsite” -Zone “Intranet” -WebApplication “SharePoint – 80” -ErrorAction SilentlyContinue

New-SPAlternateURL -URL “https://bi.spsite.com” -Zone “Internet” -WebApplication “SharePoint – 80” -ErrorAction SilentlyContinue

New-SPAlternateURL -URL “https://spsite” -Zone “Default” -WebApplication “SharePoint – 80” -ErrorAction SilentlyContinue

New-SPAlternateURL -URL “http://spsite.com” -Zone “Intranet” -WebApplication “SharePoint – 80” -ErrorAction SilentlyContinue