Quick Tip: Removing the Client Access Server Role from a Mixed Role Server…

by Andy Grogan on April 3, 2009 · 2 comments

in Exchange 2007 (CAS), Quick Tips

Just a quick post to take you through what I thought would be a simple task, but turned out to be a little more tricky than I expected.

As a quick scene setting – I have been messing around with various Client Access Server configurations within my test lab in preparation for a larger article which I am writing. The environment that I am working within contains a single Forest, with a single domain. Exchange 2003 is installed as well as Exchange 2007 all servers are based on Windows 2003 – therefore we have an Interop scenario.

The first Exchange 2007 server that installed into my environment comprised of the following roles:

  • Hub Transport
  • Client Access Server
  • Mailbox Server

During the course of my experimentation I decided that I not longer needed the Client Access Server Role installed on my first Exchange 2007 Server – as I had installed a new and dedicated Client Access Server in the the LAB.

I went to remove the Client Access Role from the shared server by starting Exchange 2007’s setup process from “Add Remove Programs” – expecting to be able to remove it by un-ticking the entry from within the installed components section – but when setup had fired up I could not as the entry had been greyed out – see below (example has been slightly modified to reflect what I saw – as I had fixed it by the time that I came to write the article):

AddRemove

I decided that the reason for the above might be down to the fact that perhaps something within the environment might still depend on the Client Access Role on this server – however, after some investigation I quickly dismissed this fact.

I then decided that the reason might be because there were still OWA related Directories on this server – so I executed the following Exchange Management Shell CMDLETs on my Client Access Server to delete the Virtual Directories (if you use this command be careful – it will remove all OWA directories on the server that has been stipulated using the -Server switch) :

[PS] C:\>$vd = Get-OwaVirtualDirectory -Server lab-casex27-01
[PS] C:\>foreach ($objitem in $vd){ Remove-OwaVirtualDirectory $objitem} 

Confirm
Are you sure you want to perform this action?
The Remove-OwaVirtualDirectory cmdlet is removing Outlook Web Access virtual
directory "LAB-CASEX27-01\owa (Default Web Site)".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "Y"):

After confirming that I wanted to remove all the Virtual Directories I returned to Add Remove programs and tried again to remove the Client Access Server role – again the option was greyed out.

I had a ponder and thought – bugger it I will try the command line setup – the worst it could do is give me and error message where I could research further – the situation I was currently in meant that I didn’t even have that so I executed the following commands:

X:\EX2732SP1>setup /mode:uninstall /role:ca 

Welcome to Microsoft Exchange Server 2007 Unattended Setup 

Preparing Exchange Setup 

The following server roles will be removed
Client Access Role 

Performing Microsoft Exchange Server Prerequisite Check 

 Client Access Role Checks ......................... COMPLETED 

Configuring Microsoft Exchange Server 

 Client Access server role ......................... COMPLETED
Removing Exchange Files ......................... COMPLETED 

The Microsoft Exchange Server setup operation completed successfully. 

X:\EX2732SP1>

Odd – but good, by removing the Client Access Server role from the server by using Setup.com it seemed to work fine. Further research indicates that by removing the OWA virtual directories also helped – however I have not found out why the GUI setup would not let me remove the role but I will keep looking for an answer (could not find one on Google) – no doubt it is something either odd to me or so obvious I am going the get laughed at (I am used to it) – but if you are stuck on this little issue I hope that this helps you out.

{ 2 comments… read them below or add one }

NigeH December 16, 2013 at 1:38 pm

Nice solution :-) Had this issue on a E2k7 CAS server that had restricted access. Using the GUI, I couldn’t uninstall, tried manual remove of the WebSite components and then ‘new’ but that errored as well.

Manual uninstall as above successful – and legal !! :-D Very Happy Bunny to find this.

=============================
[PS] E:\e2k7sp3>setup /mode:uninstall /role:ca
[PS] E:\e2k7sp3>setup.com /mode:uninstall /role:ca

Welcome to Microsoft Exchange Server 2007 Unattended Setup

Preparing Exchange Setup

The following server roles will be removed
Client Access Role

Performing Microsoft Exchange Server Prerequisite Check

Configuring Microsoft Exchange Server

Client Access server role ……………………. COMPLETED
Removing Exchange Files ……………………. COMPLETED

The Microsoft Exchange Server setup operation completed successfully.
[PS] E:\e2k7sp3>
===================================

Reply

NigeH December 16, 2013 at 1:41 pm

Oops – don’t forget to specify Setup.com !!!

Thanks again :-D

Reply

Leave a Comment

*

Previous post:

Next post: