Tuesday 15 July 2014

Sorry! We're having trouble processing your request right now. Please try again in a few minutes

If you receive the error "Sorry! We're having trouble processing your request right now. Please try again in a few minutes" while accessing the ECP console.

To fix the ECP issue, follow the below steps

1. Check the connection statistics in Exchange
2. Stop the services HpExMon and HpExMonWD and set it as manual. This will disable the server from LB.
3. Check the connection statistics in Exchange again there shouldn t be any new connections to the server.
4. Stop IISadmin and W3SVC (World Wide Web Publishing Service)
5. Go to "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files" and rename ECP directory to "ECP-old"
6. Start IISadmin and W3SVC (World Wide Web Publishing Service)
6. test whether issue persists or not. If the issue persists go to step 9.
7. If the issue is resolved, start HpExMon and HpExMonWD services and set it as automatic. This will enable the server LB.
8. Check the connection statistics in Exchange and make sure the server is accepting the sessions. This ends the troubleshooting.
9. Remove the ECP virtual directory using the following command, Remove-EcpVirtualDirectory -Identity "EXCHTESTSVR\ecp (default Web site)"
10. Create new ECP virtual directory using , New-EcpVirtualDirectory -externalurl "https://webmail.domain.com/ecp" -internalurl "https://webmail.domain.com/ecp" -Server "EXCHTESTSVR"
11.Restart IIS and verify the ECP functionality
12. Start HpExMon and HpExMonWD services and set it as automatic. This will enable the server LB.
13. Check the connection statistics in Exchange and make sure the server is accepting the sessions. This ends the troubleshooting.

Saturday 5 July 2014

Script for Mailbox Move

##Importing the file 
####Ensure to remove "Target Database" Column with "TargetDatabase" with no space in input csv file

$all = Import-Csv .\Mailboxmove.csv

##Defining the batch name
$OurBatchName = "Mailbox Move - 5 July"

## Creating the move requests for users
foreach($a in $all) 


##Check and clear if there is any existing move request for the user 

Get-MoveRequest $a.PrimarySmtpAddress | Remove-MoveRequest -Confirm:$False

##Wait for 10 seconds before creating the move request 
Start-Sleep 10

##Create the move request 
New-MoveRequest $a.PrimarySmtpAddress -PrimaryOnly -TargetDatabase $a.TargetDatabase -BatchName $OurBatchName
}

Thursday 3 July 2014

How to change the Subnet of LIS from LocationA to LocationB

Before i tell about how to change the Subnet of LIS, i need to tell you how to create the Subnet and associate with the Subnet

Set-CSLisSubnet -Subnet 192.168.1.0 -Description "Test" -Location "LocationA" -CompanyName "" -HouseNumber "123" -HouseNumberSuffix "" -PreDirectional "" -StreetName "No one lives" -StreetSuffix "" -PostDirectional "" -City Bangalore -State "" -PostalCode "123456"  -Country "IND"

Before this can take effect you will need to publish your location information - quite simply execute the Publish-CsLisConfiguration cmdlet to commit changes.

Now coming to the topic how to change the subnet of LIS from LocationA to LocationB

Remove-CsLisSubnet -Subnet 192.168.1.0
Set-CsLisSubnet -Subnet 192.168.1.0 -Location LocationB -CompanyName ABC -HouseNumber 456 -StreetName Kumble -City Bangalore -State KA -PostalCode 342133 -Country IND

If you need to remove the locationA which was disassociated from the subnet, then you need to run the below command and publish the changes

Get-CsLisLocation -Unreferenced | where-object {$_.Location -eq LocationA} | Remove-CsLisLocation



Wednesday 2 July 2014

Get the list of Active Sync Users on a particular OU

Get-ActiveSyncDevice | Where {$_.UserDisplayName -match "TestLab.com/TestOU"} | ft Userdisplay*, deviceid, Friendlyname, WhenCreated, deviceIMEI

Script to update email address

$all = Import-Csv C:\temp\test.csv

foreach($a in $all)
{
  $addr = (get-recipient $a.PrimaryEmail).EmailAddresses

  $temp1 = "smtp:" + $a.NewEmail

  $newaddr = $addr + $temp1

  Set-Mailbox $a.PrimaryEmail -EmailAddresses $newaddr
}



Notes:

In the test.csv there are two columns (PrimaryEmail & NewEmail)
.EmailAddresses is a property and this can be checked by running a command Get-Recipient | Get-member
If you want to make the new email as Primary SMTP address then replace "smtp:" with "SMTP:"


Tuesday 1 July 2014

Find the Lync Front End Server that generates the address book files

For Lync 2010 Infrastructure:

Method 1:

Open command and browse to the location of dbanalyze present in Lync Front End Server

dbanalyze.exe /report:diag > c:\>ocsDiagReport.txt 


Method 2:

Check the task manager on each Front End in the pool and look for ABSServer.exe process should be present on the Lync Front End Server

Method 3:

Check the event viewer on each Front End in the pool and look for the events generated by the LS Address Book Server.

For Lync 2013 Infrastructure:

Debug-CsAddressBookReplication