Thursday, March 27, 2008

Importing Mail Contacts to exchange 2007 in bulk!


 

Scenario:
Your company needs to have an address list that contains contacts from multiple companies. I was talking with Alaa in this regards, he suggest implementing MIIS, but unfortunately it needs some requirements that is not available yet in our servers room :). So we need something fast to import those contacts to our exchange 2007 server.



 


 

  • Solution:
    First, we need a CSV file that contains some columns to be exported from those companies (exported from the Domain Controllers), this file will have some attributes of the users like display name and e-mail address.
    Login to the domain controller in each company (or ask the in charge person) and do the following:
    - Open AD Users & Computers, go to View->add/remove columns, then add the following columns, in the same order:
    Name
    Display Name
    E-mail address
    Exchange Alias







 

  • Browse to the OU that contain the users accounts that need to be imported, make sure that the view is showing the columns that you had select in the previous step, if not, choose them again, go to Action->Export List, and save the file as (comma delimited) ( *.csv). You need now to work on this file using MS excel.


 


 


 

  • Open this file with excel, now we have to rename the columns as the following:
    Name DisplayName MailAddress Alias
    It should looks like this:



 

  • Save the file, then copy it to C:\ on the Exchange server (where you want to import the contacts)


     

  • Start Exchange Management Shell, copy and paste the following command:



    import-csv c:\contacts.csv | foreach { new-mailcontact -alias $_.Alias -name $_.displayName -ExternalEmailAddress $_.MailAddress -org contacts }

Note: before running this command you must have an OU on the AD called contacts otherwise the command will return an error. You can also create your own OU, but change the OU name after –org switch in the previous command.


The contacts is created now, in the next article am gonna show how to create a custom address list for each company based on the imported contacts.

Wednesday, March 5, 2008

How to enable Remote desktop remotely.



Most administrators prefer to administer their servers remotely through remote desktop (formerly known as terminal services). But what if you forget to enable remote desktop before shipping the server to a remote site, well, you still have the chance to do it remotely through remote registry.



First of all you should have access to the server with administrative privilege.



  • -On your xp machine, start->Run->regedit
  • - On the File menu, click Connect Network Registry.
  • - type the computer name and then click Check Names
  • -provide your administrative credential in the next dialog and click ok
  • -now in the computer node that appear in the registry editor, drill down to the following key:


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server



  • -click Terminal Server, then in the detail pane double-click fDenyTSConnections
  • - in Value data, type 0, and then click OK


Now you need to restart the server remotely in order to implement the change, this can be done through command prompt, run the following command:



shutdown -m \\ComputerName –r

You can now start your RDP sessions.







Tuesday, March 4, 2008

Server name, #5.0.0 SMTP; 550 failed to meet SPF requirements

One of our clients report that he can’t send e-mail to certain domain, the bounce back message state the following:
The following recipient(s) cannot be reached:

xx@zz.com on 3/4/2008 10:01 AM
The e-mail system was unable to deliver the message, but did not report a specific reason. Check the address and try again. If it still fails, contact your system administrator.
xx@zz.com #5.0.0 SMTP; 550 failed to meet SPF requirements



What I understand from this message is that our server doesn’t have SPF record.
SPF record is a single TXT entry in the DNS database for each domain, the main purpose of inventing this record is to fight spammers and ensure the identity of the senders.

So, how to create and test it?

By googling SPF, I found useful information; here is how to create your SPF record.
If you are hosting your own DNS server (external DNS), you can follow up in this article, otherwise, follow only step one and contact your ISP to create the record (that is if your ISP hosting your MX record).

Marc Grote wrote a good article regarding this topic, any way, here is what you have to do:

Step one: follow this wizard that will give you your SPF record, copy this string.
Step Two: go to your DNS server, under forward lookup zone, right click your (domain name) zone, and choose other new record, then select TXT record, paste your SPF record in the Text textbox. You should have something similar to this.



























Now how to ensure that you create the record successfully, in other word how to query it?
This web site provide this facility, moreover you can test your SPF string before implement it.

That is it, my client start sending e-mail again and no bounce back messages.

Monday, March 3, 2008

WSUS 3.0 Error: The server is failing to download some updates.

The following errors start appearing in my WSUS 3.0 server application log:

Event Source: Windows Server Update Services
Event ID: 10032
Description:
The server is failing to download some updates.


Event Source: Windows Server Update Services
Event Category: Synchronization
Event ID: 364
Description:
Content file download failed. Reason: The server does not support the necessary HTTP protocol. Background Intelligent Transfer Service (BITS) requires that the server support the Range protocol header.
Source File: /msdownload/update/software/crup/2008/02/bcm2007qfe-kb946140-fullfile-enu_9c8d60aef0faf5ba4a7b71ba3647241b89c19dda.cab Destination File: c:\WSUS\WsusContent\DA\9C8D60AEF0FAF5BA4A7B71BA3647241B89C19DDA.CAB.

To solve the problem I did the following:
-Stop the Background Intelligent Transfer Service.
-Run the following command:

%programfiles%\Update Services\Setup\ExecuteSQL.exe -S %Computername%\MICROSOFT##SSEE -d "SUSDB" -Q "update tbConfigurationC set BitsDownloadPriorityForeground=1"

-Start the Background Intelligent Transfer Service.
-Restart the Update service.
And that’s it, the service start downloading the updates successfully, and you will get the following information event in your app log.


























Ref: http://support.microsoft.com/kb/922330