Outlook 2011 For Mac Keeps Changing the Exchange Server Address

To update your Exchange 2007 or 2010 server you will need to run the following commands from the Exchange Management Shell and replace the Server running the Client Access Role with your external domain name. These commands update the URL for the Autodiscover service, Exchange Web Services (EWS) and the OWA Web-based Offline Address book respectively.

Before running these commands you will need to check make sure a DNS record exists mapping the IP Address to the Exchange Client Access (CAS) server.

Note: Each of these commands below should be run on a single line in the Exchange Management Shell (EMS):

Set-ClientAccessServer -Identity HostName -AutodiscoverServiceInternalUri https://mail.yourdomain.com/autodiscover/autodiscover.xmlSet-WebServicesVirtualDirectory -Identity "HostName\EWS (Default Web Site)" -InternalUrl https://mail.yourdomain.com/ews/exchange.asmxSet-OABVirtualDirectory -Identity "HostName\oab (Default Web Site)" -InternalUrl https://mail.yourdomain.com/oab

Recycle the IIS Application Pools

Next to make these commands take effect you have to tell IIS to push these changes by recycling the application pools.

  1. Open IIS Manager by clicking Start, then enter inetmgr.
  2. Expand the server and expand Application Pools, then right-click on MSExchangeAutodiscoverAppPool, and select Recycle.

Force Active Directory Sync/Replication With All Partners

From time to time I need to force sync all of my GCs aka DCs. This is a quick way to force everyone to replicate. If you have a lot of GCs this could take a while.

 repadmin /replicate destination_dsa Naming Context /allsources
 repadmin /replicate server1.test.com dc=test,dc=com /allsources

Destination server Name: server2.test.com
Naming Context: dc=test,dc=com (Domain partition)

How To Force SharePoint to Sync with Active Directory

Occasionally I have a user that changes their last name (or we got it spelled wrong) and I need the change to reflect across SharePoint (why SP doesn’t do this by itself I have no idea). In order to aid this process I found this script to force a resynchronize of each instance of the user profile in the user information lists. The script accepts one argument, which is the username to resync in the format DOMAN\User. Create a new powershell file with a ps1 extension and paste the code below into it.

$webapps = Get-SPWebApplication
 foreach ($webapp in $webapps) {
 [string] $login = $args[0]
 $sites = get-spsite -Limit All -WebApplication $webapp
 foreach ($s in $sites) {
 write-host $s.url
 $w = $s.RootWeb;
 $u = get-SPUser -Web $w -limit all | Where-Object {$_.userlogin -eq $login}
 if ($u -ne $null) {
 write-host "`t$($w.url)"
 Set-SPUser $u -SyncFromAD
 write-host "`tUpdated"

After running it, you may get a few errors but you’ll notice their display name and other info is updated.

How To Export Scheduled Tasks from Windows Task Scheduler Into Excel

I am a consummate network documenter. As such I get all the details. Here’s how I grab all the task scheduler items from remote servers into my master Excel sheet.

This can be run from your workstation and exports the data in CSV format which Excel just loves.

schtasks /query /S SERVERNAME /FO CSV /V >taskscheduler-export.csv

This dumps the CSV into the current directory. Just open in Excel and massage as needed.

Sending Syslog logs from Ubuntu to a remote syslog server

I don’t know why I didn’t have notes on this already. I’ve done it dozens of times. So here’s the write up.

I use Ubuntu and it uses the syslog facility/daemon called rsyslogd. Its configuration file is located here:


This file tells the deamon where to log each type of message. For example the follow entry means that all cron message are sent to /var/log/cron.log:

cron.* /var/log/cron.log
Continue reading “Sending Syslog logs from Ubuntu to a remote syslog server”

List SharePoint Folder Hierarchical Structure

I’m in the middle of auditing our massive SharePoint setup and I needed a way to list out in a hierarchical way the sites, sub-sites, libraries etc in an easy manor.

Remember this KISS principal? Keep It Simple Stupid.

I had a duh moment.

Remember the DOS days? Remember the tree command?


Graphically displays the folder structure of a drive or path.

TREE [drive:][path] [/F] [/A]

/F Display the names of the files in each folder.
/A Use ASCII instead of extended characters.


Continue reading “List SharePoint Folder Hierarchical Structure”

Getting Windows Process Command Line

Windows Server 2008 and Windows 7 introduced a neat feature in the Task Manager that allows you to see the command line that instantiated the process. This is great for telling processes apart. Especially when svchost and others can have dozens of instances.

Just click View -> Select Columns and pick Command Line at the bottom.

But what if you have Windows Server 2003 or Server 2000? I found a few tricks. They’re not as clean but they work just as well.

This one just lists the processes, their PID and the “services” that are associated with them

tasklist /svc

This one makes a nice text file with much more info

wmic process get Name,ProcessId,CommandLine /format:table > wmic_task_list.txt

The text file lists the name, process id, command line and puts it in a table in a text file. Genius!

If you want to get really geeky you can see all the wmic options using this command. It can do some really nice output.

wmic process list /format /?

Hope this helps someone! I use it on a regular basis to find out why svchost is going bat shit crazy on my servers. We all know it likes to hit full cpu usage from time to time and these commands will help you find out which process is causing it.

Most often I’ve found that it has to do with Windows Updates but you never know.



Exchange Build Numbers

This is mostly for my own reference. Just a list of MS Exchange versions/build numbers.

Exchange Server  4.0                                4.0.837
		  April 1996
Microsoft Exchange Server  4.0 (a)                  4.0.993
		  August 1996
Microsoft Exchange Server  4.0 SP1                  4.0.838
		  May 1996
Microsoft Exchange Server  4.0 SP2                  4.0.993
		  August 1996
Microsoft Exchange Server  4.0 SP3                  4.0.994
		  November 1996
Microsoft Exchange Server  4.0 SP4                  4.0.995
		  April 1997
Microsoft Exchange Server  4.0 SP5                  4.0.996
		  May 1998
Microsoft Exchange Server  5.0                      5.0.1457
		  March 1997
Microsoft Exchange Server  5.0 SP1                  5.0.1458
		  June 1997
Microsoft Exchange Server  5.0 SP2                  5.0.1460
		  February 1998
Microsoft Exchange Server  5.5                      5.5.1960
		  November 1997
Microsoft Exchange Server  5.5 SP1                  5.5.2232
		  July 1998
Microsoft Exchange Server  5.5 SP2                  5.5.2448
		  December 1998
Microsoft Exchange Server  5.5 SP3                  5.5.2650
		  September 1999
Microsoft Exchange Server  5.5 SP4                  5.5.2653
		  November 2000
Microsoft Exchange 2000 Server                      6.0.4417
		  October 2000
Microsoft Exchange 2000 Server (a)                  6.0.4417
		  January 2001
Microsoft Exchange 2000 Server SP1                  6.0.4712
		  July 2001
Microsoft Exchange 2000 Server SP2                  6.0.5762
		  December 2001
Microsoft Exchange 2000 Server SP3                  6.0.6249
		  August 2002
Microsoft Exchange 2000 Server post-SP3             6.0.6487
		  September 2003
Microsoft Exchange 2000 Server post-SP3             6.0.6556
		  April 2004
Microsoft Exchange 2000 Server post-SP3             6.0.6603
		  August 2004
Microsoft Exchange 2000 Server post-SP3             6.0.6620.5
		  March 2008
Microsoft Exchange 2000 Server post-SP3             6.0.6620.7
		  August 2008
Microsoft Exchange Server  2003                     6.5.6944
		  October 2003
Microsoft Exchange Server  2003 SP1                 6.5.7226
		  May 2004
Microsoft Exchange Server  2003 SP2                 6.5.7638
		  October 2005
Microsoft Exchange Server  2003 post-SP2            6.5.7653.33
		  March 2008
Microsoft Exchange Server  2003 post-SP2            6.5.7654.4
		  August 2008
Microsoft Exchange Server  2007                     8.0.685.24 or 8.0.685.25
		  December 2006
Microsoft Exchange Server  2007 SP1                 8.1.0240.006
		  November 2007
Microsoft Exchange Server  2007 SP2                 8.2.0176.002
		  August 2009
Microsoft Exchange Server  2007 SP3                 8.3.0083.006
                  June  2010
Microsoft Exchange Server  2010                     14.00.0639.021
                  October 2009
Microsoft Exchange Server  2010 SP1                 14.01.0218.015
                  August 2010