Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ************************Start of script**********************************************
- $LocalServerName = hostname
- $ActiveSyncMailboxName = "Windows SBS Mobile Mailbox Policy" + " " + $LocalServerName
- $OABVDir = $LocalServerName + "\OAB (SBS Web Applications)"
- $OAB = Get-OfflineAddressBook | Select-Object -Property Name
- $strDomainDNS = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Name
- $DomainAdmins = $strDomainDNS + "\Domain Admins"
- $OrgName = Get-OrganizationConfig | Select-Object -Property DistinguishedName
- $DefaultExchangeCertificate = "CN=" + $LocalServerName
- Get-ExchangeCertificate | Where { $_.Subject -eq "$DefaultExchangeCertificate" } | ForEach { Remove-ExchangeCertificate -Thumbprint $_.Thumbprint }
- Get-OwaVirtualDirectory -server $LocalServerName | Remove-OwaVirtualDirectory
- New-OWAVirtualDirectory -WebsiteName "SBS Web Applications" -OwaVersion "Exchange2007" -ExternalAuthenticationMethods Fba
- Set-OWAVirtualDirectory -InternalUrl "https://sites/owa/" -ClientAuthCleanupLevel "Low" -LogonFormat "UserName" -DefaultDomain $strDomainDNS -Identity "Owa (SBS Web Applications)"
- New-OWAVirtualDirectory -WebsiteName "SBS Web Applications" -OwaVersion "Exchange2003or2000" -VirtualDirectoryType "Exadmin" -ExternalAuthenticationMethods Fba
- New-OWAVirtualDirectory -WebsiteName "SBS Web Applications" -OwaVersion "Exchange2003or2000" -VirtualDirectoryType "Mailboxes" -ExternalAuthenticationMethods Fba
- New-OWAVirtualDirectory -WebsiteName "SBS Web Applications" -OwaVersion "Exchange2003or2000" -VirtualDirectoryType "Exchweb" -ExternalAuthenticationMethods Fba
- New-OWAVirtualDirectory -WebsiteName "SBS Web Applications" -OwaVersion "Exchange2003or2000" -VirtualDirectoryType "PublicFolders" -ExternalAuthenticationMethods Fba
- iisreset /noforce
- cd $env:windir\system32\inetsrv
- .\appcmd.exe unlock config "-section:system.webserver/security/authentication/windowsauthentication"
- .\appcmd.exe set site "Default Web Site" /Bindings:http/*:80:
- .\appcmd.exe start site "Default Web Site"
- .\appcmd.exe start site "SBS Web Applications"
- # ************************End of script********************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement