Exchange 2010 Cmdlets- Import-Mailbox

Exchange 2010 Cmdlets- Import-Mailbox

To import data from a .pst file, you must run the Import-Mailbox cmdlet against a computer running Microsoft Exchange Server 2010 that has the 64-bit version of Microsoft Outlook 2010 installed. We recommend that you run the command on a dedicated Exchange server that doesn't have any mailboxes.

You can import data from a .pst file only to a mailbox that's on an Exchange 2010 server that has the Mailbox server role installed by using the Import-Mailbox cmdlet. To import data from a .pst file to a mailbox on an Exchange Server 2007 server, use the Exchange 2007 version of the Import-Mailbox cmdlet. To import data from a .pst file to a mailbox that's on an Exchange Server 2003 server, you must use the Microsoft Exchange Server Mailbox Merge wizard (ExMerge.exe).

You can't import data by using the Import-Mailbox cmdlet from a .pst file to a mailbox that's in a recovery database.

You can't import data by using the Import-Mailbox cmdlet into a public folder database.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Import\Export mailbox" entry in the Mailbox Permissions topic.

Syntax :

import-Mailbox [-Identity ] -PSTFolderPath [-AllContentKeywords ] [-AllowDuplicates ] [-AttachmentFilenames ] [-BadItemLimit ] [-Confirm []] [-ContentKeywords ] [-EndDate ] [-ExcludeFolders ] [-GlobalCatalog ] [-IncludeAssociatedMessages ] [-IncludeFolders ] [-Locale ] [-MaxThreads ] [-RecipientKeywords ] [-SenderKeywords ] [-StartDate ] [-SubjectKeywords ] [-ValidateOnly ] [-WhatIf []]

Other readings
Cmdlet Overview

Cmdlets: Exchange 2010 Help

Exchange 2010 Management Architecture – Using a single machine to manage multiple Exchange 2010 Organizations

Good-to-know Powershell CMDLETS & Procedures

Migrate MDaemon email to Exchange 2007/2010

How to migrate from third-party mail servers to Exchange Server 2003 and 2007.
For example, a migration from MDaemon Mail Server to Exchange Server.
Basically the options are: Single Step (also called Big Bang Migration) or using Coexistence
The Big Bang Migration:
All users are moved at the same time, usually during the weekend, and on the first day of the new Exchange Server the Help Desk team is swamped by incidents from the new users.
The coexistence scenario:
Both systems are kept up and running, sharing information and a group of users is migrated at a time. In this scenario, the process is more complex and requires some efforts to make sure that both users (migrated and non-migrated) are able to exchange messages and use both mail systems during the transition. In a coexistence scenario, all steps should be done seamlessly from the user point of view.

Detailed step by step guide for two different scenarios:
Moving from a Linux Mail Server and peer-to-peer network to Exchange Server 2007 (Part 1)
Totally 4 parts following below link:
Moving from MDaemon to Exchange Server 2003/2007 (Part 1)
Totally 7 parts following below link:


some VBscript resources

Duane Hennessy - EzineArticles.com Expert Author
This guy is doing some good jobs of scripting.
Below are some handy tips.

VBScript - Printing Results to the Commandline for Flexibility

Use Flowcharts to Design Your Code


Javascript regular expressions

Regular expressions

Regular Expressions - User guide

JavaScript RegExp Example: Regular Expression Tester

How To: Use Regular Expressions to Constrain Input in ASP.NET


Form Validation with JavaScript Regular Expressions (Part 2)




asp 实现检测字符串是否为纯字母和数字组合的函数

正则表达式regular expression详述(一)



some salesforce web to lead development resources

How to obtain a field ID
You can find a list of all SFDC standard Fields and also some information about custom fields.
Very handy and helpful

Validation Rule formulas: Part 1

Validation Rule formulas: Part 2

Play with Custom Links: Part 1

Play with Custom Links: Part 2


Introducing an open source object "sfdc-web2anything "


Install ESXi on desktop issues

Install ESXi 3.5 /4.0 on a desktop machine.
The key part of this is to check VMware whitebox list to see if your hardware is on the supported liet or not.
Google "ESXi on a whitebox".

How to copy (upload) file to ESXi server?
You can now copy files to and from the datastores with the Browse Datastore function in the VI client. On the Sumary or Configuration \ Storage page for the host, right click on the datastore and select Browse Datastore. On the Browse Datastore window you'll see icons to upload / download and move files.

How to enable SSH?
ESXi shipped with SSH but by default is disabled. You can enable it manually but please note this is not supported.
1.Logon to ESXi console unsupported mode
At the console of the ESXi host, press ALT-F1 to access the console window.
Enter unsupported in the console and then press Enter. You will not see the text you type in.
If you typed in unsupported correctly, you will see the Tech Support Mode warning and a password prompt. Enter the password for the root login.
2.Modify /etc/inetd.conf to clear the "#" that begin with #ssh and save.
3.Restart management service
command: /sbin/services.sh restart

Find more details from this link: 

And this one: How to access the VMware ESXi hidden console

How to import existing virtual machine created by VMware server v1.02 to ESXi?
Use the free VMware vCenter Converter (4.0):

locate source virtual machine file
setup destination: IP of ESXi 4.0


Where to clean temporary Internet files on Windows 7/Vista

Temporary Internet Files


Location of temp internet files

On Windows 7 or Windows Vista
C:\Users\\AppData\Local\Microsoft\Windows\Temporary Internet Files\
C:\Users\\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\

On Windows XP or Windows 2000
C:\Documents and Settings\\Local Settings\Temporary Internet Files\

On Windows Me, Windows 98, Windows NT or Windows 95
C:\Windows\Temporary Internet Files\
C:\Windows\Profiles\\Temporary Internet Files\

Delete index.dat files

What are the Index.dat files?

The Index.dat files are used by Internet Explorer and Windows to store history, Internet cache, cookies, UserData records and other information about your PC activities. If the information is too big to fit in the index.dat files themselves, it is placed in external files and the index.dat file serves as index or table of contents, which helps the Internet Explorer to find the full information.

Although some of their functions are useful, they are dangerous privacy threat - any person with even little knowledge about index.dat files locations and structure can see history of almost all of your computer activities. Index.dat files are not the only privacy threat but they are the most obscure and dangerous one because they are hard to find and even harder to delete. In fact, in most cases it is impossible to delete Index.dat files manually because Windows keeps them open all the time.

Where are Index.dat files located?

On Windows XP or Windows 2000
C:\Documents and Settings\\Cookies\index.dat
C:\Documents and Settings\\Local Settings\History\History.IE5\index.dat
C:\Documents and Settings\\Local Settings\History\History.IE5\MSHistXXXXXXXXXXX\index.dat
C:\Documents and Settings\\Local Settings\Temporary Internet Files\Content.IE5\index.dat
C:\Documents and Settings\\UserData\index.dat

On Windows 7 or Windows Vista
C:\Users\\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\index.dat
C:\Users\\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5index.dat
C:\Users\\Roaming\Microsoft\Internet Explorer\UserData\index.dat
C:\Users\\Roaming\Microsoft\Internet Explorer\UserData\Low\index.dat

Visual studio 2005 compatibility error on Windows 7/Vista

After installed VS 2005, you got warning on windows 7 /Vista:
"This problem has known compatibility issues......"

Here is the solution from Microsoft:

Visual Studio on Windows Vista and Windows 7

Visual Studio 2005 is supported on Windows 7 with the same limitations described in this article and the related pages. To use Visual Studio 2005 on Windows 7 you will need to install both Visual Studio 2005 Service Pack 1 and the Visual Studio 2005 Service Pack 1 Update for Windows Vista.

The release of the Windows Vista operating system represents a significant opportunity for developers to build the next generation of applications that deliver compelling user experiences. We want to help you take advantage of this opportunity and assist you in developing and delivering Windows Vista based software faster, more cost effectively, and with greater impact than ever before.

During the development of Windows Vista, several key investments were made to vastly improve overall quality, security, and reliability from previous versions of Windows. We’re also testing to ensure that your .NET Framework 1.1 and 2.0 applications will work on Windows Vista so that your existing applications will continue to run as expected.

While we have made tremendous investments in Windows Vista to ensure backwards compatibility, some of the system enhancements, such as User Account Control, changes to the networking stack, and the new graphics model, make Windows Vista behave differently from previous versions of Windows.

The changes impact Visual Studio and thus we're unable to support Visual Studio .NET 2002 or Visual Studio .NET 2003 on Windows Vista.

However, your existing .NET Framework 1.1 and 2.0 based applications will continue to work on Windows Vista, and will be able to take advantage of many of the new features available to Windows Vista applications.

Visual Studio 2005 Service Pack 1:

Visual Studio 2005 Service Pack 1 Update for Windows Vista :

Visual Studio 2005 Issues with Vista (Admin)

Visual Studio .NET 2003 on Vista Issue List


shadow protect blue screen issues

Problem 1:

Why I got a blue screen (BSOD) with errir "0x0000007B"



After performing an HIR restore, user receives a BSOD with the error code 0x0000007B while trying to boot for the first time.


This error is caused by a mismatched Storage/RAID Controller Driver. In order to resolve this issue, the proper driver will need to be downloaded from the Hardware/Computer Manufacturer.

Often times these drivers are downloaded as an EXE file and must be extracted before they can be used.

Once the drivers have been obtained, you will then need to boot into the Recovery Environment again and run the HIR Configuration from the Tools Menu.

Select the Drive you are performing the HIR on (This only needs to be done to system volumes)

Select Advanced, then locate your device drivers.

Select Start, then Choose Yes for Troubleshooting Purposes.

Another blue screen issue after restore with different reason:


Problem 2:


I got "An error(0x00000001) occurred Incorrect function when using HIR confirguation.Also after you clear that error message the status bar displays "target is not a support windows volume"

Migrating from one virtual pc to a newer Dell dimension 5100 desktop


Target is not a supported windows volume means that you do not have ShadowProtect installed on the OS you are trying to migrate.

You must have the product installed if you plan to use HIR.

So to do a proper HIR, install SP Server Ed on the source server, then reboot into the SP CD environment and do a cold backup, then restore via the SP CD environment on the destination server choosing the HIR checkbox.

SBS & ShadowProtect - Some Hardware Independent Restore considerations


ShadowProtect IT Edition 3.1 - Press F6 to load storage drivers?


StorageCraft ShadowProtect User Guides


Shadow protect recovery options

I have Vista Ultimate 32-bit and am running SP 3.0 Desktop.

I want to know which restore options I should use among restore MBR, restore disk signature and restore disk hidden track.

Answer from Official ShadowProtect Help file

" Restore MBR - Restore the master boot record. The master boot record is contained in the first sector of the first physical hard drive. The MBR consists of a master boot program and a partition table that describes the disk partitions. The master boot program looks at the partition table to see which primary partition is active. It then starts the boot program from the boot sector of the active partition. You can restore the MBR from the image file that was saved with the backup image or you can restore an original Windows MBR.

§ Restore disk signature - Restores the original physical disk signature of the hard drive. Disk signatures are included in Windows Server 2003, Windows 2000 Advanced Server, and Windows NT Server 4.0 Enterprise Edition (SP3 and later) and are necessary before the hard drive can be used.

§ Restore Disk Hidden Track - this will restore the first 63 sectors of a drive. Some boot loader applications require this for the system to boot."

Answerer from Nate at SP forum:


If you're restoring the image back to the same disk and partition from which it came, you generally don't need to restore any of those things (you don't need to restore the MBR, or the hidden track sectors, or the disk signature). If you're restoring to a different disk on the same machine, then definitely do NOT restore the disk signature. The decision on restoring the MBR (which restores the MBR code section only) and hidden track sectors is whether or not you have custom MBR code, such as a fully pre-boot disk encryption product, etc. If you just have the standard MBR, then you generally won't need to restore the MBR or hidden track sectors. If you're restoring to a different machine then I generally recommend that you do check all three (restore disk signature, hidden track sectors, and disk signature) as well as check the HIR option during restore.

If you ever boot your restored OS and it comes up to a blank screen (not a blue screen, but a black screen), or gives you any ntldr errors, then just boot your windows install CD and specify that you want to use the Recovery Console and then within the recovery console execute "mbrfix /drive 0 fixmbr" and "fixboot C:"

software for a new installation


Automatic configuration of Outlook profile when user logins in.

Part 1  for Outlook 2000/ 2003
Create a *.prf file and apply it using a Logon Script.

Type in %username% for the username.

This way when a user logs into a session it creates their Outllook Profile for them.

Create a custom installation using the resource kit. The custom installation would contain the information from the PRF file mentioned above. The user wouldn't have to type in anything - Outlook would configure automatically based on their domain login information.

You may have to reinstall Outlook/Office to get the custom installation to take correctly, but it will be worth the hassle.

Part 2, for Outlook 2007
About Office Customization Tool (OCT)
You use the Office Customization Tool (OCT) to customize an installation of the 2007 Microsoft Office system. The OCT is part of the Setup program and is the recommended tool for most customizations. You run the OCT by typing setup.exe /admin at the command line. The OCT is available only with volume licensed versions of the 2007 Office system. Office Standard 2007, Office Small Business 2007, Office Professional Plus 2007, and Office Enterprise 2007 are available for purchase through volume licensing.

Creating PRF files by using the Office Customization Tool

A straightforward way to create a PRF file with Office Outlook 2007 profile settings is to customize the settings by using the Office Customization Tool, and then export the settings to a PRF file.

To create a PRF file by using the Office Customization Tool
1.In the Office Customization Tool, on the Outlook: Customize Default User Profile page, select how you want to customize profiles for your users. To specify settings to be included in a PRF file, choose Modify Profile or New Profile, and click Next.
2.On the next three pages, customize profile information such as configuring Microsoft Exchange server connections and adding accounts.
3.On the Outlook: Remove Accounts and Export Settings page, click Export Profile Settings, and when prompted, enter (or browse to) a file name and location.

Applying Outlook user profiles by using a PRF file

You can apply a PRF file in several ways to update Outlook profiles:
Method 1:
Import the PRF file in the Office Customization Tool to specify profile settings in a transform, and then include the transform when you deploy or update Outlook.
Method 2:
Specify the PRF file as a command-line option for Outlook.exe to import a PRF file without prompting the user. Example: outlook.exe /importprf file://server1/share/outlook.prf.
Method 3:
Specify the PRF file as a command-line option for Outlook.exe, but prompt the user before importing the PRF file. Example: outlook.exe /promptimportprf \\localfolder\outlook.prf. If you put the specified PRF file in a shared folder on a network, the settings might not be applied if the file is not found or is not available when Outlook runs.
Method 4:
Configure the registry to trigger Outlook to import the PRF file when Outlook starts up. You can use the Add/Modify Registry Entry page in OCT to deploy these registry key options to your users. You can also use the OCT to distribute the PRF file to users by using the Add/Remove Files page.

1.Delete the following registry key values:

2.In the HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Setup subkey, set the value of ImportPRF to a string value that specifies the name and path of the PRF file. For example, set ImportPRF to \\server1\share\outlook.prf

Further reading:
Tech net article: Customize Outlook profiles by using an Outlook Profile (PRF) file