SBS 2003 CD’s

If anyone needs access to the SBS 2003 CD’s, I have them available on my NAS but credentials are required to download them.

Experts Exchange used to have a link in a thread advising people that I have them available, but someone (an Admin) has decided to delete the link / offer because they didn’t like it, so if you need them to repair an SBS 2003 server or to decommission one (you will need CD 2 to remove Exchange 2003 gracefully), then please get in touch with me and I’ll send you the details.

I seem to be about the only person in the world who has them available (clean, zipped .ISO images) and they are proving (still) to be very popular downloads.

Thought I would post about it here so that anyone needing them might be able to find me so they can get hold of them 🙂

Alan

Apple release iOS 6.1.1 to fix one bug but it doesn’t fix the bug with Exchange

After Apple released iOS 6.1 on the 28th January 2013, numerous people have complained of various issues with 3G connectivity, others have complained about battery life being reduced dramatically and more recently, Exchange servers around the world have been slowing down due to what appears to be a problem with the devices looping when Calendar Appointments are accepted on the iPhone / iPad.

Today Apple has released iOS 6.1.1 (only for the iPhone 4S) which seems to address the 3G issues, but it doesn’t fix the Exchange issues and Microsoft / Apple are working together on the problem to see if it is an Exchange issue or an Apple issue.

So whilst some can upgrade, not everyone can and even those that can upgrade, may well have to upgrade yet again when a new update is released that fixes the Exchange issue.

Exchange Admins all over the world are probably restricting access to their Exchange Servers for those who have upgraded to iOS 6.1 until they delete and re-create their Exchange Accounts and promise not to do anything with Exchange Calendar Appointments (in terms of Accepting / Declining etc). Once they have deleted and added their account back, the Admins may allow them back on the server as this is rumoured to ease the performance issues that the Exchange servers are suffering.

The iOS 6.1.1 release is 968Mb in size, so it isn’t a small download. If you are not suffering from battery / 3G issues, you may as well wait to see if there is a newer release and download that instead.

I for one (with my iPhone 4S), have only just upgraded to iOS 6.1 but won’t be updating to iOS 6.1.1 because I can’t face the hassle of Jailbreaking it all over again and re-install/configuring my Jailbroken apps so recently after Jailbreaking iOS 6.1, only having to do it again when 6.1.2 or 6.2 (or whatever comes next) is released to fix the problem, assuming it lies with Apple and not Microsoft.

Watch this space for more news as and when it becomes available.

Alan

Exchange 2003 Activesync HTTP 500 Error

Further to my Exchange 2003 / Activesync Troubleshooting Guide which can be found here, I was working remotely on a Windows 2003 Server with Exchange 2003 SP2 installed over the weekend having been asked to try and make Activesync work as they had read through my guide and not managed to get everything working properly.

Initially the server needed to have it’s DNS configuration fixed so that the server could talk to the Internet and allow me access, so once their IT department had resolved that issue I was given credentials and started to look at the problems on the server.

Checking the settings against my article, everything appeared to be set properly, but the test on the test site was throwing HTTP 500 errors (my least favourite!), so I followed Method 2 of KB883380 (remove and re-create the Exchange IIS Virtual Directories) and once they had been recreated and the IIS settings re-checked, I re-ran the test on the test site and still received the HTTP 500 error.  At that point I was debating a call to Microsoft, but started to check the Event logs on the server and saw various DNS related errors which were of some concern.

Outlook 2007 was also installed on the Exchange 2003 server, so I wasn’t convinced that I had a simple fix on my hands.

I ran the Exchange 2003 Best Practises Analyzer tool and that reported that Exchange could not be contacted, which suggested a DNS issue.  In the DNS logs there was an Event ID 800 error:

The zone <zone> is configured to accept updates but the A record for the primary server in the zone’s SOA record is not available on this DNS server. This may indicate a configuration problem. If the address of the primary server for the zone cannot be resolved DNS clients will be unable to locate a server to accept updates for this zone. This will cause DNS clients to be unable to perform DNS updates.

The suggested fix for this was to run dcdiag /fix followed by netdiag /fix and then to restart the Netlogon Service.  I did this but nothing changed.

Running the netdiag /fix threw up the following error:

DNS Error code: DNS_ERROR_RCODE_SERVER_FAILURE [FATAL] Failed to fix: DC DNS entry xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx._msdcs.internaldomainname.local. re-registeration on DNS server ‘Server IP Address’ failed.

I checked the DNS zones and saw that both the _msdcs.internaldomain.local zone and internaldomain.local zones were not showing all that they should have been so I deleted both zones and recreated them manually (referring to another Windows 2003 server for the relevant entries.  Once all that could be manually created was created, I re-ran dcdiag /fix and netdiag /fix and still received the error above.

I then tried searching for a way to fix this problem but drew a blank.  Looking through the other event logs, I came across the following error in the System Log:

Event ID: 5788
Source: Netlogon
Description: Attempt to update Service Principal Name (SPN) of the computer object in Active Directory failed. The following error occurred: The attribute syntax specified to the directory service is invalid.

Searching for this error landed me here and upon checking the Computer Name / Domain Name,  I saw that the computer name was simply computername. not computername.internaldomain.local.  Never seen that one before.

Following the resolution in the MS article, I created a VB Script file and ran it on the server and rebooted.

Following the reboot, I re-ran the dcdiag /fix and netdiag /fix and the errors had gone.  In addition, some of the DNS records that I wasn’t able to create manually were magically back, so that seemed to have resolved the DNS issues – hurrah!

I then decided to re-test Activesync and happily received a complete pass on all tests – so now that Exchange could talk to itself, Activesync could actually work!

Running the Exchange Best Practices Analyzer again I was happy to see that Exchange could now talk to itself and the results showed a much happier server with only a few minor issues.

So – if you are seeing the dreaded HTTP 500 error and have gone through my Guide, followed KB883380 method 2 and still get the same error – it just might be a good idea to run the Exchange BPA and check your DNS settings are 100% happy.

Alan

Yet more Bad IT Support Companies!

Following on from my earlier Blog Post about bad IT Support Companies (here) I visited a potential new customer today to look over their IT.  The background information I got from the company was that they had used their existing IT Support Company (a one-man band) for the past 5 years or so and whilst mostly happy with their service, there were some outstanding issues that were being neglected and this was causing some concern to the company.

They had recently installed a ‘server’ and their IT wasn’t running as smoothly as they had anticipated, so wanted to get a 2nd opinion about their setup and my company (IT Eye Ltd) was recommended by a mutual company.

Once I arrived, I had a quick look over their IT and came across 4 PCs and a Netbook.  Asking where the server was, I was directed towards an HP xw6600 Workstation with a label on it suggesting it had come out of a company in New York City (NYC-XXXXXXXXX)!  I then used Remote Desktop to connect to the server and discovered that it was running SBS 2008.  This prompted the question about when the server was purchased and I was told May of 2012.  I then asked how much they had paid for the server and they advised me £2,500.

Okay – so they had a recently installed SBS 2008 server of which Exchange 2007 was now no longer supported by Microsoft because the Mainstream Support had now expired!  That begged the question why SBS 2011 wasn’t installed and to that there wasn’t an answer.  I then looked for a license sticker and couldn’t find one, so that also begged the question if they were actually legal.  This conversation continued to the other workstations and no conclusive evidence was available to suggest that they were even remotely compliant.

Looking at one of the XP workstations I saw that it was running XP pro, so checked to see if it was part of the Domain and saw that it was still configured as a Workgroup.

Data was being shared from the server, so at least the server was being used for something other than a drain on their electricity bill, but data was still being held on the Netbook and the data wasn’t being copied to the server or backed up, so was at risk of being lost.  No evidence of server backup was visible either.

I then asked about emails and found out that they were being hosted externally (1and1) and were being collected via Outlook configured as an SMTP/POP3 account and to allow for shared calendars to be accessed, they had turned to Google Mail.

I then pointed out that their server had Exchange built-in and that they need not pay for mail to be hosted externally or use Google Mail for shared Calendars as they could do everything on their own server.

At this point – I think they had decided that they were not being well looked after by their existing IT Support Company and I left them pondering my findings.  We will wait to hear from them and see how they want to proceed.

Alan

SBS 2003 to SBS 2011 Migration Performed Remotely in Toronto Canada (from the UK)

Last night I started to perform a migration from SBS 2003 to SBS 2011 for a company in Toronto where Peter was going to be onsite to manage the migration from the local end.

The start time for me was 9:00pm (UK time) and prior to starting, I had asked Peter to make sure the SBS 2003 server was fully patched, had the Microsoft Baseline Configuration Analzyer tool installed (and to reboot the server afterwards), check that Exchange 2003 Service Pack 2 was installed and also that Small Business Server 2003 SP1 had been installed properly, something that quite often doesn’t get installed properly as it isn’t a simple download from Microsoft via Windows Update.

I also asked Peter to run a DCDIAG report (after installing the Windows Server 2003 Service Pack 2 32-bit Support Tools) to make sure that all was well and email me the results

The only item that needed fixing from the DCDIAG report was to set the Intersite Messaging Service to Automatic and Start the service, something that is quite often not set to Automatic on SBS 2003 from my experiecnce.

All being well, it was time to start the migration.  I asked Peter to insert the SBS 2011 DVD into the SBS 2003 server and then once fired up, we installed the Migration Preparation Tool (without installing any updates).

The SBS 2003 server was prepared happily, the Migration Answer File created and saved to a Memory Stick (USB Key) and then the server was rebooted.

It was then time to build the new server, and Peter had chosen an HP ProLiant DL360 G7 server (nice!).  To cut a long story short, there were a few problems with the build and after referring him to my other blog article here he happily created a bootable USB key with SBS 2011 on it and then rebuilt the server for a second time, this time more successfully.  Also on the USB Key with SBS 2011 as an .ISO image were the drivers for the RAID Controller and the SBS Answerfile.

After a few reboots and having changed the boot order so that the server would no longer boot from the USB Key after the initial Windows build, the server fired up into Migration mode and the Migration could start.

The settings chosen in the SBS Answer file were checked and verified, the Time Zone checked and verified (important to do this manually as the BIOS clock can be way off) and updates were not downloaded for the installation.

After a while, the server rebooted and we were logged in to the SBS 2011 server.  Time to create a new User as the Migration won’t work if you use the default Administrator account.

After the new Admin Account was created we logged off, then on again as the new user and fired up the SBS Console and clicked on the Migrate to Windows SBS link on the Home page.

Having created just a single partition, the first step of relocating the various components of SBS to another drive was skipped and we moved on to the Configure the Network Wizard.  With nothing much to do there apart from click a few buttons (DHCP was not on a router), the wizard completed and we moved onto the next step.

Configuring the Internet Address we selected the relevant domain name and changed the default prefix of ‘Remote’ to a preferred name and completed the wizard.  This failed initially and threw a few errors.  After a few minutes of head scratching and wondering why, I checked the Services and found a handful of Exchange ones not started!  After a bit of encouragement with my mouse, the services were started and the Wizard re-run, this time 100% happily.

At this point, it was time to pause the installation and visit Windows Update.  It was now about 5:40am (UK time) and caffeine had been working happily, but you need to draw the line somewhere and get some sleep, so having selected about 133 Windows Updates and kicked the updates off, I retired to bed as the world was waking up and the light outside was getting lighter 😦

We are planning to pick up the Migration again at 3:00pm UK time today and at the time of writing I am remotely connected to the server and busy installing a raft of other updates that are available and rebooting as and when required.  I have now done this about 3 times and the cupboard is now well and truly bare, so time for more caffeine and to wait for Peter to arrive on-site and then order the SSL certificate from www.exchange-certificates.com and get it approved before moving the mailboxes from the SBS 2003 server to the SBS 2011 server.

So, Peter arrived on site and we order a new SSL certificate from the site above, ran the New Certificate Wizard in the Exchange Management Console to generate a Certificate Signing Request (CSR), took the CSR to the certificate site and copied / pasted the contents into the relevant box and completed the certificate request process.  Now we just had to wait for the approval emails to arrive.  Prior to starting the migration, I had asked Peter to make sure that the Admin contact for the domain was still valid and that he had access to the email account that the Certificate Approval emails would be sent to – he was the Admin contact and thus we wouldn’t have any problems receiving and processing the Certificate Approval emails.

The next step in the migration was to move the mailboxes over from the old server to the new server and that is done via the new server using a “Local Move Request”.  We essentially highlighted all the User mailboxes and then clicked on the New Local Move Request.  We actually selected a few large mailboxes first and then the remainder which were smaller so that the larger ones started to be moved first.

Next was to move the Public Folders and that was simply a case of right-clicking the Public Folder Store and choosing “Move All Replicas”.  There weren’t many Public Folders so I expected this to be a quick process, but after an hour or so of watching the mailboxes move, the Public Folders hadn’t even started to move, so I checked the the SMTP Virtual Server settings and lo and behold, there was some Outbound Authentication that was set because they had previously setup a Smarthost on the SMTP Virtual Server (which I had already removed).  As soon as I removed the outbound authentication and restarted the SMTP Virtual Server, the Public Folders started to move over to the new server and after about 5 minutes, the Public Folder Instances were all empty 🙂

Next was to remove Legacy Group Policies and Logon Settings which essentially is the deletion of old SBS 2003 Group Policies and renaming the SBS_LOGON_SCRIPT.BAT file and removing references to it from ALL user profiles.

The next step in the migration was to setup a batch file to use Robocopy to copy all the User / Company data from the old server to the new server.  I looked at the shares on the old server and didn’t see anything that stood out as a Company Data folder, so asked Peter to identify the relevant data, which he did and I setup the batch file to copy the data he had identified as well as the User Data, which was obvious.

I decided to kick off the data copy batch file (run as Administrator) and then all we could do was sit and wait, so I suggested to Peter that he might like to go and have an extended lunch break and that I would monitor the Mailbox Moves and data copying remotely, then let him know when it was likely to have completed, so he could return to help with the final steps in the migration.

I emailed Peter and arranged for him to return to the office at 8:00pm Toronto time (1:00am UK time).  All the data and mailboxes had moved across by about 1:40am UK time so the next step was to Migrate Fax Data of which there wasn’t any, so we moved on to the next step which was to convert Users and Groups.  All users were assigned the new Standard User role and all Groups were selected and converted – all very simple stuff and quick to perform and by now, the finishing line was in sight.

Before removing Exchange 2003 from the SBS 2003 Server it was time to redirect port 25, 443, 987, 4125 and any other ports being used on the firewall to the new server.  Once completed, I could then remove the Routing Group Connectors that are installed to allow mail to flow between the Exchange 2003 and Exchange 2010 servers during the migration.

It was now time to remove Exchange from the old server by using the Add/Remove Programs, selecting the Small Business Server 2003 application and then running through the various screens until the installed options were visible, then setting Exchange to ‘Remove’ and finishing the wizard.  This process never normally removes exchange fully (in my experience), so I had to refer to an MS KB Article to manually remove the remaining components of Exchange (KB833396).

The final step is to run DCPROMO, but before we do, it is a good idea to check that the SBS 2011 Server is the holder of all FSMO roles.  I found a little file that allows me to do this without having to break sweat – don’t recall where it came from, but I am grateful to the creator.  You can download it from here dumpfsmos.zip.  Having run and verified that my FSMO roles were all held by the SBS 2003 server, I fired up DCPROMO and let it run, making sure I didn’t tick the box that says “This server is the last controller in the domain” as that would cause all kinds of havoc.

For some odd reason – every time I run this the first time, it always fails because the NETLOGON service has been stopped and it complains about it being stopped.  Well the DCPROMO process stops the NETLOGON service, so I am not sure why it gets confused, but it always does, so prepare for it to fail, then start the NETLOGON service up again and re-run DCPROMO again which on the 2nd time of running, will happily complete.

Once done, reboot the server, then login to the local server as the Administrator, using the password you specified during the DCPROMO process and once it is alive, shut it down and keep it handy in case you forgot to get some data from it.  MIGRATION COMPLETED!

The time that the migration was finished was about 3:30am UK time, so from start to finish, the entire process took about 30½ hours, but it has to be said that there was little data to be copied and the mailboxes were small.

The article that I used to guide me through the entire migration, which I will be asking Glen to tweak slightly with some items to make it even better than it is already can be found here.

If after reading it you don’t feel confident enough to tackle the migration yourself, I would be only too happy to assist you.  If you do feel confident enough then I hope your migration goes smoothly and completes quickly.

Alan

SBS 2003 to SBS 2011 Migration – 50Gb of Public Folders to Migrate took a week to migrate!

Having nearly completed yet another SBS 2003 to SBS 2011 Migration after the longest week of my life so far, I was amazed at how slowly the Public Folder Replica Move actually took to push 50Gb of data between the two servers.

Starting the project on a Monday and having the SBS 2011 server built by Monday afternoon (built virtually using Microsoft’s Hyper-V Server on a new HP ProLiant ML350 G6), I started to move the Exchange Mailboxes and then the Public Folder Replicas to the SBS 2011 server.  The network was originally running on a 10/100 Switch but I upgraded it to a Gigabit Switch on the Tuesday morning so that I had the maximum speed available and both servers had Gigabit cards in them.

At the end of the Tuesday, there were still dozens of Public Folders listed in the Public Folder Instances list in the Exchange System Manager, so I checked the SMTP Virtual Server Settings to see if there were any settings configured that might slow the process down and discovered several settings that would restrict the flow of emails.  The initial setting that I noticed was the “Limit session size to (KB):” setting.  This was limited to 40Mb and as some of the emails in the Public Folders were in the region of 30-40Mb in size, the session size was going to severely impact the flow of mail so I changed it to 1024000 (about 1Gb).

The other setting that I changed was the “Connection Timeout” value on the General Tab.  This was set to timeout after 10 minutes, so I increased the timeout to 2 hours, so that this wouldn’t cause any delays either.

I wasn’t unduly concerned at this point about problems with inbound mail and spammers clogging up the system as I had already installed a SAN/UCC SSL certificate (minimum 5 Domain Names) bought from www.exchange-certificates.com and had re-pointed port 25 to the SBS 2011 server.

So having made as many changes to the network and SMTP Virtual Server Settings (also restarting the Simple Mail Transport Service) I created a new Receive Connector on the SBS 2011 server to only receive mail from the IP Address of the SBS 2003 server and set the Maximum Message Size Limit to 50Mb and let the two servers talk to each other.

Sometime overnight on the Saturday after starting the migration, the whole 50Gb of Public Folders had migrated across to the SBS 2011 server and all the Public Folder Instances had disappeared!  A whole 5½ days later.

At one point during the PF Replication, I calculated that it was moving at about 500Mb per hour, so all in all, it was going to take in the region of 100 hours to move the entire database.

So – if you are planning a migration from SBS 2003 to SBS 2011 and you have a large Public Folder Database, don’t expect the migration to complete quickly.  Assuming the worst – a Public Folder Database with 75Gb of data in it, I would expect it to take about a week and a half just to push the data to the new server.

Happy migrating!

Users Connecting To Exchange 2010 (SBS 2011) Using Outlook 2010 Getting Password Prompts Randomly

I had an email from a customer recently who has an SBS 2011 server (with Exchange 2010) running virtually on an HP Proliant ML350 G6 server (which I had installed for them) and they were reporting that a couple of users were getting password prompts at random times.  This wasn’t affecting all users, so I knew it wasn’t a server-side issue, especially because I installed a trusted 3rd party SSL certificate from www.exchange-certificates.com so asked a few questions and it seemed that this only happened after the machines had been left idle for a while.

My initial thoughts were that there might be some issues with the Network Card having Power Management enabled on it which allowed the PC to turn off power to the NIC to save energy, so I asked my customer to check the NIC settings and sure enough, the Power Management setting to “Allow the computer to turn off this device to save power” was enabled.  After disabling this option, the problem went away and has not returned.

Having had someone ask a similar question on http://www.experts-exchange.com and the solution being the same, I felt it rude not to share this discovery so that others might benefit from this discovery.

To disable this option, click on Start> Run> {type} ncpa.cpl {and press enter}, then right-click on your Wired / Wireless Network Card and choose properties.

On the Network Card Properties, click on the Configure Button (see image below)

then click on the Power Management Tab (see image below)

and make sure that the “Allow the computer to turn off this device to save power” check box is not ticked.

Once you no longer have the computer turning off the power to the network card, it shouldn’t lose connectivity to the server and thus won’t be prompting you for your credentials when you go to use Outlook again.

 

SBS 2003 Connect To The Internet Wizard Fails At Firewall Configuration

Today I was working on a problem where an SBS 2003 server was having issues re-running the Connect To The Internet Wizard whereby the Wizard started happily to re-configure the server but then failed at the Firewall configuration.  The server also had ISA Server 2004 installed.

The reason for re-running the wizard was because emails were not flowing properly out of the server and re-running the Internet Connection Wizard was a good place to start troubleshooting.  Because the Wizard was failing, it was a strong possibility that the Firewall / ISA server was causing the issue.

Having examined the ICWLOG.TXT file to see what might be causing the issue (from C:\Program Files\Microsoft Windows Small Business Server\Support) it showed the following errors:

Error 0x80070003 returned from call to Configuring IIS to listen only on the LAN().
Error 0x80070003 returned from call to CStingrayCommit::DoGeneralConfiguration().
Error 0x80070003 returned from call to Doing general configuration().
Error 0x80070003 returned from call to CStingrayCommit::CommitEx().

Doing some digging on the webs for an answer, I checked a few sites but drew a blank, then I found the following site (http://www.windows-server-answers.com/microsoft/Windows-Server-SBS/32257468/icw-fail-on-firewall-step.aspx) and it pointed me to check the registry for the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SmallBusinessServer\Intranet
the ‘companywebpath’ key showed this value:

IIS://LOCALHOST/W3SVC/4

Opening up IIS Manager, I then checked the IIS Website Identifier Value for the CompanyWeb site (see example image below) :
and saw that it was showing a different value, in this case it was showing ‘448260875’.

Going back to the Registry key, I then changed the ‘companywebpath’ value to 448260875 to mirror the IIS Website Identifier and then closed Regedit.

Upon re-running the Connect To The Internet Wizard again, it completed happily and normal outbound mail-flow resumed.

I am sure that this isn’t the only reason for the wizard failing at the firewall stage, but it is one thing to rule out that isn’t exactly obvious.

Schedule a Transport Rule to be Enabled or Disabled at a Specific Time of Day / Day of the Week

The Problem:

In Exchange 2003, you could configure Exchange to delay the sending of large attachments until after hours, which was very useful if you have users that don’t think twice before creating an email and attaching dozens of their most recent photographs in the email, then adding 20 or 30+ recipients to the email and hitting send – causing your Exchange server to go into melt-down as it tries its best to push all the emails out as quickly as possible.

So – having upgraded to Exchange 2007 or Exchange 2010 you may have discovered that this options doesn’t exist any more, so you may find from time-to-time that your Internet connection suddenly grinds to a halt and if you dig hard enough, you may find the problem is sitting in your outbound Queues on your Exchange Server.

So – what to do about this?

Half a Solution:

You can create an Exchange Transport Rule to force large emails to be approved (before they are sent out), by a Manager or a Moderator which at least enables the Manager / Moderator to have to Approve the email before they clog up the Exchange Queues but as we are now living in a 24×7 age, if you don’t want to have to approve / reject the emails in the evenings or over the weekend, there is no option in the Transport Rule to schedule the times that the Rule applies!  Quite frustrating, especially over a long weekend.

The Whole Solution:

The answer (well, my answer) to this is to create two Powershell Scripts, two batch files and a two Scheduled Tasks to Enable / Disable the Transport Rule at specific times (Disable after hours on Weekdays / Enable before work starts on Weekdays).

Start by creating a new folder on your Exchange server called Scripts on any drive you like (I will be using E:\scripts in my example).

Then open up Notepad and copy / paste the scripts below (one script per file) and then save the files as DisableTransportRule.ps1 and EnableTransportRule.ps1 in the E:\Scripts folder.

The PowerShell Scripts:

Disable Transport Rule:

# Script to Disable a Transport Rule
Disable-TransportRule “Rule_Name” -confirm:$false

Enable Transport Rule:

# Script to Enable a Transport Rule
Enable-TransportRule “Rule_Name” -confirm:$false

The Batch Files:

Open up Notepad and copy / paste the single line commands below (one command per file) and then save the files as DisableRule.bat and EnableRule.bat in the E:\Scripts folder.

Disable Transport Rule Batch File:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command “. ‘C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1’; Connect-ExchangeServer -auto; e:\Scripts\DisableTransportRule.ps1”

Enable Transport Rule Batch File:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command “. ‘C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1’; Connect-ExchangeServer -auto; e:\Scripts\EnableTransportRule.ps1”

Scheduled Tasks:

Open up Server Manager and Expand Configuration> Task Scheduler.  In the Actions Pane, click on Create Task…..

 

On the General Tab, Name the Task according to the rule you want to run e.g., Disable Transport Rule, then Select ‘Run whether user is logged on or not” and “Run with highest privileges”.

On the Triggers Tab, Click on New and Select “Weekly” and enable the days of the week you want the rule to run e.g., Mon to Fri.  Set the time you want the rule to run e.g., 18:00:00 hours and tick the “Enabled” box and click OK.

On the Actions Tab, Click on New and the default option is to Start a Program.  Leave this selected and in the Program/script: window, click on Browse and select ‘e:\scripts\disable.bat’, then in the Start in (optional): box, enter ‘e:\scripts’ and click on OK.

We don’t need to add anything to the Conditions Tab or the Settings Tab, so click OK and then enter the relevant username / password for the account you want to use to run the Scheduled Task as (usually an Administrator account).

Repeat the above for the Enable.bat file.

One last step:

Before these commands will run properly, you need to run the following command in the Exchange Management Shell:

Set-ExecutionPolicy RemoteSigned

This command allows Powershell to interact with the Exchange Management Shell.

Summary:

So – you should now have two Scheduled Tasks that Disable your Transport Rule at a specified time on specific days (mine are Disabled at 18:00:00 hrs Mon – Fri) and another Scheduled Task to Enable the Transport Rule at a specific time one specific days (mine are enabled at 07:30:00 hrs Mon-Fri), so now, after hours and at weekends, you won’t have to approve emails for your Exchange organisation and if someone sends out an email with large attachments to multiple users, there is less impact on the rest of the workforce.

Alan