PowerShellRay

Archive for the ‘Exchange 2010’ Category

#Autodiscover Internal
$urlpath = Read-Host "Type internal Client Access FQDN example <http://server.domain.com> or <https://server.domain.com>"
Set-AutodiscoverVirtualDirectory -Identity * -internalurl “$urlpath/autodiscover/autodiscover.xml”
Set-ClientAccessServer -Identity * -AutodiscoverServiceInternalUri “$urlpath/autodiscover/autodiscover.xml”
Set-webservicesvirtualdirectory -Identity * -internalurl “$urlpath/ews/exchange.asmx”
Set-oabvirtualdirectory -Identity * -internalurl “$urlpath/oab”
Set-owavirtualdirectory -Identity * -internalurl “$urlpath/owa”
Set-ecpvirtualdirectory -Identity * -internalurl “$urlpath/ecp”
Set-ActiveSyncVirtualDirectory -Identity * -InternalUrl "$urlpath/Microsoft-Server-ActiveSync"
#Check configuration
get-AutodiscoverVirtualDirectory | ft identity,internalurl
get-ClientAccessServer | ft identity,AutodiscoverServiceInternalUri
get-webservicesvirtualdirectory | ft identity,internalurl
get-oabvirtualdirectory | ft identity,internalurl
get-owavirtualdirectory | ft identity,internalurl
get-ecpvirtualdirectory | ft identity,internalurl
get-ActiveSyncVirtualDirectory | ft identity,internalurl

Tags:

First,
we need to load the server manager module and install NLB. To do this run the
following commands:

Import-Module ServerManager
Add-WindowsFeature NLB, RSAT-NLB

Keep
in mind, you'll need to install these components on both CAS servers. Once NLB
has been installed, load the NetworkLoadBalancingClusters module:

Import-Module NetworkLoadBalancingClusters

I am going to use the New-NlbCluster cmdlet to create a cluster named
"CASArray" with the IP address 192.168.100.100/24:

New-NlbCluster -InterfaceName NLB -ClusterName CASArray -HostName CAS01 -ClusterPrimaryIP 192.168.100

Remove the default
port rule and create separate port rules for the services that I want to include:

Get-NlbClusterPortRule | Remove-NlbClusterPortRule -Force

Create new port rules
for HTTP/S and MAPI RPC ports:

Get-NlbCluster | Add-NlbClusterPortRule -StartPort 80 -EndPort 80 -Protocol TCP -Affinity Single
Get-NlbCluster | Add-NlbClusterPortRule -StartPort 443 -EndPort 443 -Protocol TCP -Affinity Single
Get-NlbCluster | Add-NlbClusterPortRule -StartPort 135 -EndPort 135 -Protocol TCP -Affinity Single
Get-NlbCluster | Add-NlbClusterPortRule -StartPort 1024 -EndPort 65535 -Protocol Both -Affinity Single

Add the second node
to the cluster:

Get-NlbCluster | Add-NlbClusterNode -NewNodeName CAS02 -NewNodeInterface NLB

NLB has been
configured, once both nodes are converged we can create a CAS array using the
following EMS command:

New-ClientAccessArray -Name “CAS Array” -FQDN casarray.litware.internal -Site “Default-First-Site-Name”

If you have
dual NICs and your NLB interface doesn’t not have a default gateway, you'll
want to enable IP forwarding using the following netsh command:

Netsh interface ipv4 set int "NLB NIC NAME" forwarding=enabled 

As long as autodiscover and EWS is working.

  1. Create account without mailbox on both domains  (i.e.ID: domainx.com\Freebusy, Pass: P@ssw0rd
  2. On Coex.com
    1. Set-AvailabilityConfig -OrgWideAccount “domain1.com\freebusy”
    2. $a = get-credential (domain2.com\Freebusy, Pass: P@ssw0rd)
    3. Add-AvailabilityAddressspace -Forestname domain2.com -Accessmethod OrgWideFB -Credential:$a
  3. On Microsoft.com
    1. Set-AvailabilityConfig -OrgWideAccount “domain2.com\Freebusy”
    2. $a = get-credential (domain1.com\Freebusy, Pass: P@ssw0rd)
    3. Add-AvailabilityAddressspace -Forestname domain1.com -Accessmethod OrgWideFB -Credential:$a
Tags:

Follow

Get every new post delivered to your Inbox.

Join 90 other followers

%d bloggers like this: