Tuesday, February 11, 2014

Search query grayed out on in-place hold settings

If you are a domain admin and exchange admin and tried to setup in-place hold setting, you might find the "search query" option is grayed out! You might think "oh no maybe it is the search engine!"
No it is not, you must be a member of "discovery management" group, add your account to be a member of the group, log out form the ECP and log back-in, try to create the in-place hold.

Ok now you done playing with in-place hold and try to delete the in-place hold, and it errors out, and says

Can't remove mailbox search  because there is still at least one mailbox on In-Place Hold.

remove-mailboxsearch will give you the same error, well it has to be disabled first!

Here is a fix:

Set-MailboxSearch   -SourceMailboxes  -InPlaceHoldEnabled $false

If the in-place hold name is "test1" and the last mailbox that are in the in-place hold is "testuser"

Set-MailboxSearch "test1" -SourceMailboxes "testuser" -InPlaceHoldEnabled $false

now remove the in-place hold.


Exchange 2013 disk partition alignment

Visit this page for Exchange 2013 Storage Configuration Options
http://technet.microsoft.com/en-us/library/ee832792(v=exchg.150).aspx


For exchange 2010:
http://exchcluster.blogspot.com/2010/12/disk-partition-alignment-best-practices.html

Monday, February 10, 2014

Trouble shooting exchange 2013 installation problems

1. Errors when you try to install exchange 2013

First,

To fix a problem below, enable IPv6 on the server and DCs, you can disable ipv6 after a successful install.

          if( -not $successfullySetConfigDC)
          {
            Write-ExchangeSetupLog -Error "Unable to set shared config DC.";
          }
        " was run: "Unable to set shared config DC.".

Next..

If you try to install exchange 2013 for the first time and failed, and try again you might see error message below

"Couldn’t attach the data folder 'C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\HostController\Data'. Path doesn’t contain old nodes belonging to the system 'Fsis'."


If you try to install using setup.exe, the setup will tell you to use the server recovery mode, it will still fail.

To fix the problem (warning: If you already have Exchange 2010 or older version, do not follow this instruction!, if you follow this instruction it will remove the current exchange server env. as well)

Open ADSI Edit, select and open "Configuration"

Go down to Services, and delete Microsoft Exchange and Microsoft Exchange Autodiscover

Now open "Default naming context"
Delete  Microsoft Exchange Security Groups and Microsoft Exchange Security Objects

On the server that failed to install exchange 2013

Additional steps:
Delete the C:\Program Files\Microsoft\Exchange Server folder and all the contents

Open IIS
and delete
Exchange Back End and Front End websites (it might be default web site, leave it)

Open AD users and Computers

GO under the users and remove
DiscoverySearch Mailbox*
Exchange Online-ApplicationAccount
FederatedEmail.*
Migration.*
*SystemMailbox*
*HealthMailbox*

Open regedit and delete

HKLM\Software\Microsoft\ExchangeServer
HKLM\CurrentControlSet\Services\MSExchange*


And...

If you successfully install the exchange 2013, you might see...



Exception : Microsoft.Exchange.Management.Deployment.ScriptExecutionException: The following error was generated when "$error.Clear();
.
.
blah blah
.
.
                    {
                        $deleteErrorMsg = "Failure cleaning up SearchFoundation Data folder. - " + $dataFolderPath + " - " + $_.Exception.Message;
                        Write-ExchangeSetupLog -Error $deleteErrorMsg;
                    }
                }
            }
        " was run: "Error occurred while uninstalling Search Foundation for Exchange.System.Exception: Cannot determine the product name registry subkey, neither the 'RegistryProductName' application setting nor the 'CERES_REGISTRY_PRODUCT_NAME' environment variable was set
   at Microsoft.Ceres.Common.Utils.Registry.RegistryUtils.get_ProductKeyName()
   at Microsoft.Ceres.Exchange.PostSetup.DeploymentManager.DeleteDataDirectory()
   at Microsoft.Ceres.Exchange.PostSetup.DeploymentManager.Uninstall(String installDirectory, String logFile)
   at CallSite.Target(Closure , CallSite , Type , Object , Object )".


To fix the error (you might see it again when you apply patches) run this from the powershell

$env:CERES_REGISTRY_PRODUCT_NAME = "Search Foundation for Exchange"



And....

When you try to login to ECP or OWA as domain\administrator you might see

WARNING: the object mydomain/Users/Administrator has been corrupted, and it's in an inconsistent state.


The following validation errors happened:
WARNING: Database is mandatory on UserMailbox.
WARNING: Database is mandatory on UserMailbox.

to fix the problem, re-create the mailbox using disable-mailbox and enable-mailbox command.


Monday, July 23, 2012

How to add a domain user to a sudo group in linux

First you must add your linux in to a windows AD, once it is done, login as root or user that is in wheel group.


Execute this command visudo, that will open etc/sudoers file. if you do vi /etc/sudoers vi will give you an permission error. So besure to use visudo without space.


Find a line that looks like this

%wheel     ALL=(ALL)     ALL

put this just below that like (Yes with \\, in linux \ is an escape charator, so we have to put two \ instead of  one \) this...

domain\\username   ALL=(ALL)

example:   If you want to add a user test1 who is in world.com

world\\test1 ALL=(ALL)

and this is an option you can put just behind the line, so it will not ask for a password if you do sudo. a bit of security issue but if you built a test linux machine gotta do lots of sudo, ye it can be your best friend.

NOPASSWD:  ALL

example: world\\test1 ALL=(ALL)  NOPASSWD: ALL


That is all.



Installing Exchange 2013 preview - quick and dirty

What you will need, a domain controller, a windows server 2008 or R2 or 2012 and some pre-req items

I will use an Windows 2008 R2 x64 Enterprise version for this demo.

Download a Exchange server 2013 preview from here : http://www.microsoft.com/exchange/en-us/exchange-preview.aspx

All Exchange 2010 servers in the organization need to be at Exchange 2010 SP3 orlater, and SP3 is not available at this time (2012, July), so if you try to install it on the current Exchange 2010, you won't be able to install it at all.


Pre-req items list

1. Add RSAT-ADDS

On powershell run

Import-Module ServerManager

Add-WindowsFeature RSAT-ADDS

2. Install IIS 7

On powershell run

Import-Module ServerManager\

Add-WindowsFeature Desktop-Experience, NET-Framework, NET-HTTP-Activation, RPC-over-HTTP-proxy, RSAT-Clustering, RSAT-Web-Server, WAS-Process-Model, Web-Asp-Net, Web-Basic-Auth, Web-Client-Auth, Web-Digest-Auth, Web-Dir-Browsing, Web-Dyn-Compression, Web-Http-Errors, Web-Http-Logging, Web-Http-Redirect, Web-Http-Tracing, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Lgcy-Mgmt-Console, Web-Metabase, Web-Mgmt-Console, Web-Mgmt-Service, Web-Net-Ext, Web-Request-Monitor, Web-Server, Web-Stat-Compression, Web-Static-Content, Web-Windows-Auth, Web-WMI


3. Install hotfix 2619234

http://support.microsoft.com/kb/2619234


4. Microsoft Unified Communications Managed API 4.0, Core Runtime 64-bit.

http://go.microsoft.com/fwlink/?LinkId=238142

5. KB974405

http://support.microsoft.com/kb/974405


6. Microsoft Office 2010 Filter Packs - Version 2.0

http://go.microsoft.com/fwlink/?LinkID=191548

7. Microsoft Office 2010 Filter Packs - Service Pack 1

http://www.microsoft.com/download/en/details.aspx?id=26604



8. Install Windows Media Encoder

http://technet.microsoft.com/library(EXCHG.150)/ms.exch.setupreadiness.LonghornWmvcoreNotInstalled.aspx


9. .Net framework 4.0
http://www.microsoft.com/en-us/download/details.aspx?id=17718

10. .Net framework 4.5

http://msdn.microsoft.com/en-us/library/5a4x27ek(v=VS.110).aspx

11. Windows Management Framework 3.0

http://www.microsoft.com/en-us/download/details.aspx?id=29939

12. Exchange Server 2013 Preview isn't compatible with Microsoft Visual C++ 11 Beta Redistributable (x64) 11.0.050531. Please uninstall it before you install Exchange 2013 Preview.
Uninstall Microsoft Visual C++ 11 Beta using "programs and feafures"



Installation steps

1. Install all pre-req items, and reboot.

2. Fully patch the new windows 2008 r2 server.

3. Run the exchange-x64.exe, it will ask a place to extract the files.

4. Choose a folder to extract.


5. Go to the folder and execute the setup.exe file

6. On Check for updates, I chose not to check, Next






7. Copying files, Next




8. Introduction screen, Next




9. Accept the license term, Next




10. Error reporting, choose no, and Next




11. On checking required software, Next




12. Installation space and location, Next





13. On Malware protection settings, select Yes to disable it and Next





14. On configure client access server, select , "this client server role will be internet-facing" and fill out the domain information




15. On customer experience improvement program window, click Next.






16. Readiness checks, wait until it finishes its task.





17, Once all check got passed, Next


18, setup will start



19, Installed



If you get "The WS-Management service does not support the request" error when you open the exchange powershell execute the command below on command prompt

%SystemDrive%\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir -enable

and reset the  IIS by runnig

IISReset



2013 OWA with new office 2013 logo




First look of OWA 2013

 

Options page


Installed Apps page






Wednesday, July 18, 2012

CentOS 6 : Using DVD/CD as your local repo #2

Put the dvd in to the cdrom, and we need to mount the dvd.
#mkdir /media/CentOS_6.2_Final

after that mount the dvd with this command:

#mount /dev/cdrom /media/CentOS_6.2_Final
and then Edit CentOS-Media.repo
vi /etc/yum.repos.d/CentOS-Media.repo

You will see something like this

baseurl=file:///media/CenOS/
       and blah blah

Change the "file=:///media/CentOS" to "file=:///media/CentOS_6.2_Final"


Save the file


and install package

yum --disablerepo=\* --enablerepo=c6-media

for example to install perl

yum --disablerepo=\* --enablerepo=c6-media install perl

Friday, June 01, 2012

Adding a user to sudo group

Open sudo config file
visudo

Go to the end of the file and uncomment %wheel ALL=(ALL) ALL line, it is located about 10 line above from the end of the file.

This change will activate the wheel group, and allow you to add a user to the wheel group (it is like local admin group in windows)
Save the change and close the file

add a user to the wheel group, in this example add a user called test to the wheel group

usermod -a -G wheel test


Configuring an NTP Client

open ntp.conf and edit it
nano /etc/ntp.conf

check status of ntpd service

service ntpd status

if it is not running start the service

service ntpd start

Wednesday, May 30, 2012

CentOS 6 How to renew DHCP and restart NIC

To release the DHCP address on the system
dhclient -r

To obtain a new address
dhclient

To check the new IP
ifconfig

To restart network service
ifdown eth0
ifup eth0
/etc/init.d/network restart

CentOS 6: Install Packages Via yum Command Using DVD / CD as Repo

Open up the repo file and edit
vi /etc/yum.repos.d/CentOS-Media.repo
read the content carefully

set enabled to 1
enabled=1

Might want to add file:///media/CentOS_6.2_Final on the baseurl

so baseurl would look like this after it is added, the last line woth bold idicated that it is added.

baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
file:///media/CentOS_6.2_Final/

Install a package with only the CDROM repo

# yum --disablerepo=\* --enablerepo=c6-media install pacakge-name

Thursday, August 18, 2011

How to Restore Default Error Pages in IIS7

Well it happend to me today, I accidently deleted the Error page 403!


It says inherited, so I tried to find how I can inherite from the top site, no luck. I even removed HTTP Errors and re-added...no luck
I manually created 403, its "Entry Type" was set "local" and I got 500 error when I try to open the site.


Finally I looked at the web.config


howa,,,there it is


I removed it, and refreshed the iis...yahoo
I got my 403 back!


That was dumb, but I am glad it is fixed!

Monday, December 13, 2010

Disk Partition Alignment Best Practices for Exchange 2010 server

Disk Partition Alignment Best Practices for Exchange 2010 server

1. For Exchange 2010 Database, it is recommended that the size of elements within a RAID stripe be set 512K for best performance.

2. Windows NTFS allocation unit size for Exchange 2010 database partitions should be set to 64K for best performance. For log partitions, if separated from database, the default allocation unit size should be used.

3. To see current settings run the following command, check bytes per cluster

fsutil fsinfo ntfsinfo <drive letter>


4. How to format a new disk:
 
Make sure your RAID stripe is 512K
 
and run this command on command prompt
 
Diskpart
list disk
select disk
create partition primary align=1024
assign letter=
format fs=ntfs unit=64K label="
 
Example:
 
C:\>diskpart
Microsoft DiskPart version 6.0.6001
Copyright (C) 1999-2007 Microsoft Corporation.
On computer: ASPIRINGGEEK
DISKPART> list disk
Disk ### Status Size Free Dyn GPT
-------- ---------- ------- ------- --- ---
Disk 0 Online 186 GB 0 B
Disk 1 Online 100 GB 0 B
Disk 2 Online 120 GB 0 B
Disk 3 Online 150 GB 150 GB
DISKPART> select disk 3
Disk 3 is now the selected disk.
DISKPART> create partition primary align=1024
DiskPart succeeded in creating the specified partition.
DISKPART> assign letter=F
DiskPart successfully assigned the drive letter or mount point.
DISKPART> format fs=ntfs unit=64K label="MyFastDisk" nowait
 
References:
http://technet.microsoft.com/en-us/library/dd758814(SQL.100).aspx
http://www.dell.com/downloads/global/solutions/security/Dell_PV_MD1200_7200_Mailbox_Resiliency_Exchange_2010_Storage_Solution.pdf
http://technet.microsoft.com/en-us/library/ee832792.aspx

Thursday, July 01, 2010

Blackberry Server 5 and Exchange MAPI CDO, and Windows 2008 Domain controller

It has beed nothing but fun after I upgraded BES 4 to 5.
Most painful problems are :
besadmin keeps loosing connections to exchange server.
After BES 5.0 SP1 gets installed, I could not login to BES admin web site.

I opened a ticket with RIM and spent almost a month with them hoping they could figure them out and finally I figured out and fix them by myself.
I like to share how I fixed it so you don't have to spend a month with useless RIM support.

First check your MAPI CDO's version if it is either 6.5.8147 or 6.5.8153, you need the newest MAPI CDO. Those MAPI CDO has unexpected crash problems. Check this website for more information: http://blogs.msdn.com/b/stephen_griffin/archive/2010/04/29/updated-mapi-download-fixed-crashes.aspx

and if you upgraded domain controllers to Windows 2008 servers, GC will refust many connections from the BES and resutling slow email delivery and many pending messages on BES.

This is part of the error on BES :  {0x4EC} CDO initializing failure in CDO helper
The information store could not be opened. [MAPI 1.0 - [MAPI_E_LOGON_FAILED(80040111)]]


To fix this issue, take a look at this M$ KB2019948

http://support.microsoft.com/kb/2019948

Windows Server 2008 GC’s have a limitation of 50 concurrent NSPI connections per user.
Applications such as Outlook 2007, Blackberry Enterprise Server, or any application that will create multiple NSPI connections to a DC/GC can experience these symptoms.
 


-To fix login failure issue after BES 5 SP1 gets installed


See RIM KB20406

Here is the SQL script to fix the particular issue, run it against BES 5 BESMGMT database

update dbo.BASTraits
set value = null
where traitid=0 and pluginid=111

How to get copy of NDR sent to your email address

On EMS run this command

Set-OrganizationConfig -MicrosoftExchangeRecipientReplyRecipient


Set-TransportConfig -GenerateCopyOfDsnFor

For example


Set-OrganizationConfig -MicrosoftExchangeRecipientReplyRecipient xyz@abc.om
Set-TransportConfig -GenerateCopyOfDsnFor 5.1.1,5.7.1,5.7.2,5.7.3

Tuesday, December 29, 2009

Installing Exchange 2010 - Part 6

Activating the Mailbox database copy.

From the Database Management, select Add Mailbox Database copy.



Select a target mailbox server




Adding..






Added



Verify the completion



On EXB2, mailbox copy has started.


Do the same for the EXB2/DB2


Isn't this easy?

Installing Exchange 2010 - Part 5

Let's setup a DAG


I will name the DAG as "DAG1" and its IP will be 192.168.1.10, and use EXF1 for the FSW.


Creating DAG with EMC is a bit problomatic, use powershell instead.

If you use EMC, DAG will grab a DHCP IP.


New-DatabaseAvailabilityGroup -name DAG1 -WitnessServer EXF1 -WitnessDirectory c:\dag1fsw -DatabaseAvailabilityGroupIpAddresses 192.168.1.10


Now DAG1 is created but there are no members




Let's add members




I will add EXB1 and EXb2.





They are added, from the database management tab, you can see the owner of the DB. currently EXB1 is the owner of the DB1 and EXB2 is the owner of DB2.


Next time we will activate Mailbox Databse Copy.

Installing Exchange 2010 - Part 4

Eventhough Microsoft does not recommand using WLB on Exchange 2010 servers, I will show you how to do it. Microsoft actually recommand using H/W load balancer such as F5.

I will assume you already have experiences on creating NLB on exchange 2003/2007 servers.

Installing WLB on CAS&HT servers.

1. Install "Network Load Balancing" feature on each CAS+HT servers.

2. Setup the NLB (in my case my nlb name is "webmail.demo.local"), exf1 and exf2 are the members, also add it to DNS.

3. set a new client access array using new-ClientAccessArray command, it will be used among outlook clients (MAPI) to connect to the exchagne 2010 servers.





4. Now associate the array with a database using set-mailboxdatabase command



Now when db1 user try to connect to exchange database using mapi protocol, they will be directed to use webmail.demo.local to connect.

Some admins may perfer using a different name for this, for example "outlook-connect" or etc.

To do that,

Add A record for the "outlook-connect", but use the same nlb cluster IP (webmail's IP in my case)

Create a new ClientAccessArray, and associate a DB with it.

Let's verify the setting.





Monday, December 28, 2009

Installing Exchange 2010 - Part 3

The two servers I will use to install CAS & HT servers are called EXF1 and EXF2.

I will skip the prereq processes (eg: .net framework and etc)

1. For CAS and HT servers run following commands from the scripts folder/directory.
sc config NetTcpPortSharing start= auto
ServerManagerCmd -ip Exchange-Typical.xml -Restart
Click this link for more details on the command














2. Install exchange server, choose custom install and select CAS and HT roles.
3. Populate the internet facing server name (if your CAS&HT server will face the internet)


















4. Install



















5. Installed, internal URL will be changed once the load balance feature gets installed.



6. I will skip the installation process for the EXF2 (my second CAS&HT server)

Installing Exchange 2010 - Part 2

Name of the server I will install the first mailbox server is exb1

1. Start the setup, and choose language option


















2. And install exchange server
































\
Select mailbox role





































3. First look of the EMC

Installing Exchange 2010 - Part 1

I am going to install exchange server 2010 on a server 2008 SP2, for more information on Exchange 2010 Prerequisites, see http://technet.microsoft.com/en-us/library/bb691354.aspx

1. Install .net Framwork 3.5 SP1, you can download the full package version from here

2. Install Windows Remote Management (WinRM) 2.0 and Windows PowerShell V2, download it from here

3. On servers that will host the Hub Transport or Mailbox server role, install the Microsoft Filter Pack. Download it from here

4. Run "ServerManagerCmd -ip Exchange-MBX.xml -Restart" from the scripts folder on a exch 2010 installation CD.












5. Prepare schema by running "setup /PrepareSchema"










6. Prepare AD by running "setup /preparead" (setup /PrepareAD will automatically perform the PrepareLegacyExchangePermissions )

7. Prepare domain
Run setup /PrepareDomain or setup /pd to prepare the local domain
Run setup /PrepareAllDomains or setup /pad to prepare all domains in your organization.