Memorise

NETSH Command to Change from Static IP Address to DHCP

SOURCE: http://technet.microsoft.com/en-us/library/bb490943.aspx

To switch the specified adapter from a static address to DHCP, type the following command:
netsh interface ip set address “Local Area Connection” dhcp

NOTE: Typing this command changes the interface named “Local Area Connection” to DHCP.

To display all of the adapters in the computer with their current IP addresses to determine the correct adapter name, type the following command:
Netsh interface ip show config

To change to a static address, type the following command:
netsh interface ip set address “Local Area Connection” static ipaddr subnetmask gateway metric

NOTE: Replace ipaddr with the static IP address, subnetmask with the subnet mask, gateway with the default gateway and, if necessary, metric with the appropriate metric. The following example changes the interface “Local Area Connection” to a static address of 192.168.0.10 with a subnet mask of 255.255.255.0, and the interface has a default gateway of 192.168.0.1 with a metric of 1:

netsh interface ip set address “Local Area Connection” static 192.168.0.10 255.255.255.0 192.168.0.1 1

Configure TCP/IP from the Command Prompt

 

With Netsh.exe you can easily view your TCP/IP settings. Type the following command in a Command Prompt window (CMD.EXE):

netsh interface ip show config

With Netsh.exe, you can easily configure your computer’s IP address and other TCP/IP related settings. For example:

The following command configures the interface named Local Area Connection with the static IP address 192.168.0.100, the subnet mask of 255.255.255.0, and a default gateway of 192.168.0.1:

netsh interface ip set address name="Local Area Connection" static 192.168.0.100 255.255.255.0 192.168.0.1 1

(The above line is one long line, copy paste it as one line)

Netsh.exe can be also useful in certain scenarios such as when you have a portable computer that needs to be relocated between 2 or more office locations, while still maintaining a specific and static IP address configuration. With Netsh.exe, you can easily save and restore the appropriate network configuration.

Automating Service Template Deployments in SCVMM 2012

First, connect your portable computer to location #1, and then manually configure the required settings (such as the IP address, Subnet Mask, Default Gateway, DNS and WINS addresses).

Now, you need to export your current IP settings to a text file. Use the following command:

netsh -c interface dump > c:\location1.txt

When you reach location #2, do the same thing, only keep the new settings to a different file:

netsh -c interface dump > c:\location2.txt

You can go on with any other location you may need, but we’ll keep it simple and only use 2 examples.

Now, whenever you need to quickly import your IP settings and change them between location #1 and location #2, just enter the following command in a Command Prompt window (CMD.EXE):

netsh -f c:\location1.txt

or

netsh -f c:\location2.txt

and so on.

You can also use the global EXEC switch instead of -F:

netsh exec c:\location2.txt

Netsh.exe can also be used to configure your NIC to automatically obtain an IP address from a DHCP server:

netsh interface ip set address "Local Area Connection" dhcp

Would you like to configure DNS and WINS addresses from the Command Prompt? You can. See this example for DNS:

netsh interface ip set dns "Local Area Connection" static 192.168.0.200

and this one for WINS:

netsh interface ip set wins "Local Area Connection" static 192.168.0.200

Or, if you want, you can configure your NIC to dynamically obtain it’s DNS settings:

netsh interface ip set dns "Local Area Connection" dhcp

BTW, if you want to set a primary and secondary DNS address, add index=1 and index=2 respectively to the lines of Netsh command.

As you now see, Netsh.exe has many features you might find useful, and that goes beyond saying even without looking into the other valuable options that exist in the command.


Network and Sharing Center Freeze Issue

PROBLEM:
If i right click computer and select “Manage” it hangs
If i right click network connection and select “Network and Sharing center” it hangs
If i go to device manager, it hangs

SOLUTION:
Exchange services were failing to start and kept holding the services on starting that hold up the server. Found that after enabling IPv6 and rebooting the services ran 100% and the server did not freeze anymore.
Also, if you are working on member server or workstation you can try this
Run the following command and reboot the machine.
net localgroup “Administrators” “NT Authority\Local Service” /add

 

Exchange Server services don’t start automatically on a global catalog server

You can fix the exchange dependency by http://support.microsoft.com/kb/940845

To change the dependencies yourself on a Windows Server 2008-based server, use the values in the following table to determine the appropriate values for the dependencies.

Registry path Registry subkey (Multi_SZ) Registry value
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSExchangeSA
DependOnService EventLog, RPCSS, LanmanWorkstation, LanmanServer, Netlogon
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSExchangeADTopology
DependOnService Netlogon
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSExchangeIS
DependOnService Netlogon

 

To change the dependencies yourself on a Windows Server 2003-based server, use the values in the following table to determine the appropriate values for the dependencies.

Registry path Registry subkey (Multi_SZ) Registry value
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSExchangeSA
DependOnService EventLog, NtLmSsp, RPCSS, LanmanWorkstation, LanmanServer, Netlogon
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSExchangeADTopology
DependOnService Netlogon
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSExchangeIS
DependOnService Netlogon

Note If any Windows service cannot start, Exchange Server does not start. This method will not resolve the problem if any Windows service cannot start. However, this method should reduce the time that is required to shut down the server.


Extract data from MySQL ibdata1 data file

I recently had my server out of order and I could only access to files. I manage to backup my MySQL files (ibdata, ib_logfile1, ib_logfile2, and the tables *.frm files). No sql dump to be imported into a new MySQL installation.

I setup new Server with same version of MySql installed simply replacing the “data” directory inside the new installation setup gave me errors and MySql service won’t start, I think its complaining about InnoDB “sequence numbers”.

My new recovery Server setup
Windows 2003 SP1 and install SQLYog then I installed Xampp in C:\xampp, with server MySql 5.1. My ‘data’ directory was in C:\xampp\mysql\data.

my.ini file location was in C:\Program Files\MySQL\MySQL Server 5.1

Going further these are the steps that I followed to get my data back, I have taken the instruction from various sites mixed of linux setup, hence kept the linux instructions but I done this on Windows server commands are the same:

  1. Stop your mysql daemon/service (# services stop mysql) on mine services.msc and made sure MySql service is not running.
  2. Replace the new “data” directory with the backed-up one (don’t forget to work on a copy of your backup, and not with your one and only backup!!)
  3. Start your mysqld with the innodb revocery parameters, and keep that windows open:
    # mysqld --standalone --console --innodb-force-recovery=4
    the console will stay open and you’ll see the log messages directly on your screen (CTRL-C will close the server), I came across number of problem please see after step 7 I have copied & pasted my output from my recovery.
  4. Use your favorite db backup tool (in my case SQLYog) to create a new SQL dump of your database (myPhpAdmin, …) remember that starting your MySQL server with –innodb-force-revovery param you cann’t run any INSERT, DELETE or UPDATE sql command.
    You’ll wont backup the “mysql” and “performance_schema” tables..
  5. Shut down your “temporary” MySQL server hitting CTRL-C on the shell opened at (3)
  6. Restart MySQL with the defaults settings (or, if you like the shell output run: mysqld --standalone --console)
  7. Remove all the databases and re-create them using your newly created SQL Dump

C:\Program Files\MySQL\MySQL Server 5.1
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Program Files\MySQL\MySQL Server 5.1>cd bin

First try
C:\Program Files\MySQL\MySQL Server 5.1\bin>mysqld –standalone –console –innodb-force-recover=4

Error Came up as below
121013 19:43:47 [Note] Plugin ‘FEDERATED’ is disabled.
121013 19:43:47  InnoDB: Initializing buffer pool, size = 47.0M
121013 19:43:47  InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 10485760 bytes
InnoDB: than specified in the .cnf file 0 25165824 bytes!
121013 19:43:47 [ERROR] Plugin ‘InnoDB’ init function returned error.
121013 19:43:47 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
121013 19:43:47 [ERROR] Unknown/unsupported table type: INNODB
121013 19:43:47 [ERROR] Aborting
121013 19:43:47 [Note] mysqld: Shutdown complete

Tried to fix it with recovery option 6

C:\Program Files\MySQL\MySQL Server 5.1\bin>mysqld –standalone –console –innodb-force-recover=6

121013 19:44:29 [Note] Plugin ‘FEDERATED’ is disabled.
121013 19:44:29  InnoDB: Initializing buffer pool, size = 47.0M
121013 19:44:30  InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 10485760 bytes
InnoDB: than specified in the .cnf file 0 25165824 bytes!
121013 19:44:30 [ERROR] Plugin ‘InnoDB’ init function returned error.
121013 19:44:30 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
121013 19:44:30 [ERROR] Unknown/unsupported table type: INNODB
121013 19:44:30 [ERROR] Aborting
121013 19:44:30 [Note] mysqld: Shutdown complete

Still received error ‘FEDERATED is disabled’ when tried to use -u to authenticate

C:\Program Files\MySQL\MySQL Server 5.1\bin>mysqld –standalone –console –innodb-force-recover=6 -u root
121013 19:53:17 [Note] Plugin ‘FEDERATED’ is disabled.
121013 19:53:17  InnoDB: Initializing buffer pool, size = 47.0M
121013 19:53:17  InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 10485760 bytes
InnoDB: than specified in the .cnf file 0 25165824 bytes!
121013 19:53:17 [ERROR] Plugin ‘InnoDB’ init function returned error.
121013 19:53:17 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
121013 19:53:17 [ERROR] Unknown/unsupported table type: INNODB
121013 19:53:17 [ERROR] Aborting
121013 19:53:17 [Note] mysqld: Shutdown complete


Fix the error ‘FEDERATED is disabled’ when I used –federated but still getting error about the log file size

C:\Program Files\MySQL\MySQL Server 5.1\bin>mysqld –standalone –console –innodb-force-recover=6 -u root –federated

121013 20:00:38  InnoDB: Initializing buffer pool, size = 47.0M
121013 20:00:39  InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 10485760 bytes
InnoDB: than specified in the .cnf file 0 25165824 bytes!
121013 20:00:39 [ERROR] Plugin ‘InnoDB’ init function returned error.
121013 20:00:39 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
121013 20:00:39 [ERROR] Unknown/unsupported table type: INNODB
121013 20:00:39 [ERROR] Aborting
121013 20:00:39 [Note] mysqld: Shutdown complete

Fix the logfile error by editing the my.ini file  innodb_log_file_size=10M and changing the value same as my log file in ‘data’ directory. while keeping the command prompt open I launched SQLyog and saved all database one by one to .sql dump, see attached image.

C:\Program Files\MySQL\MySQL Server 5.1\bin>mysqld –standalone –console –innodb-force-recover=6 -u root –federated

121013 20:05:20  InnoDB: Initializing buffer pool, size = 47.0M
121013 20:05:20  InnoDB: Completed initialization of buffer pool
InnoDB: The user has set SRV_FORCE_NO_LOG_REDO on
InnoDB: Skipping log redo
121013 20:05:22  InnoDB: Started; log sequence number 0 0
InnoDB: !!! innodb_force_recovery is set to 6 !!!
121013 20:05:22 [Note] Event Scheduler: Loaded 0 events
121013 20:05:22 [Note] mysqld: ready for connections.
Version: ‘5.1.66-community’  socket: ”  port: 3306  MySQL Community Server (GPL)
121013 20:12:34 [ERROR] Invalid (old?) table or database name ‘data ibdata file backup’
121013 20:12:34 [ERROR] Invalid (old?) table or database name ‘data ibdata filebackup’
121013 20:12:34 [ERROR] Invalid (old?) table or database name ‘data working’
121013 20:12:34 [ERROR] Invalid (old?) table or database name ‘data working’
121013 22:23:28 [ERROR] Invalid (old?) table or database name ‘data ibdata filebackup’
121013 22:23:28 [ERROR] Invalid (old?) table or database name ‘data working’
121013 22:23:28 [ERROR] Invalid (old?) table or database name ‘data ibdata filebackup’
121013 22:23:28 [ERROR] Invalid (old?) table or database name ‘data working’

 


Unable to open Exchange Server 2010’s Exchange Management Console…”Kerberos” authentication failed

Unable to open Exchange Server 2010’s Exchange Management Console with the error: “The attempt to connect to http://exchange.domain.com/PowerShell using “Kerberos” authentication failed: Connecting to remote server failed…”

Restarted the IIS didn’t help but Once the World Wide Web Publishing Service restarted, the Exchange Management Console was now able to load the organisation.
You can also try:

Go to the following folder and delete the Exchange Management Console file.

C:\users\<Shiraj>\AppData\Roaming\Microsoft\MMC\Exchange Management Console

Close EMC and reopen it.

Alternatively;

Open Powershell as Administrator;

winrm quickconfig

Press (y) when prompted to add exception to firewall.

Winrm e winrm/config/listener -> to check if we are able to query port 5985. if this fails get the error code.

I would prefer you run the EMTShoot.PS1 from the link below which would give us atleast a hint.

Troubleshoot Management tools startup Failures


Site to Site VPN with Netscreen 5GT and Netgear DG834G

Site to Site VPN with Netscreen 5GT and Netgear DG834G

I purchased my parents a new router/modem/wireless device the other day. It is a Netgear DG834G, great value for money.

Anyway the Netgear supports VPN termination, so I decided to setup a VPN between their house and mine. This allows me to run voip over the VPN without the need to worry about port forwarding (which is a real pain with SIP).

So the technical background:

My place:
1) Static IP address (59.167.253.89)
2) Juniper Netscreen 5GT running ScreenOS 5.3.0r2
3) 10.0.0.0/22 (10.0.0.0 – 10.0.3.255)
4) Router on address 10.0.0.254

Parents place: If you can get your ISP to give you static IP this will help big time, instead of dyndns.org use the static IP.
1) Dynamic IP address
2) Netgear DG834G running firmware V3.01.25 (Has also been tested to work with a DG834 with firmware V2.10.22)
3) 10.0.4.0/24 (10.0.4.0 – 10.0.4.254)
4) Router on address 10.0.4.254

Now the netgear has some limitations with the VPN. The main issue is that it only supports “Main Mode” authentication. Main Mode is designed for site to site VPNs both with static IP addresses. My parents don’t have a static IP address.

To get around this the netscreen allows you to point the remote end point (in this case the netgear) to a hostname. So for the netgear site you need to setup a dyndns.org account. For an example we will call this example.dyndns.org.

See below:
Dyndns Netgear

So lets setup the netscreen site first.

1) Setup IP Address Objects that point to each site. Under Objects > Addresses > List. In my case
10.0.0.0/22 TRUST (local)
10.0.4.0/25 UNTRUST (remote)
IP address object
IP address object
ip address object

2) Now to setup the VPN Gateway on the netscreen. Under VPNs > AutoKey Advanced > Gateway.
Add a new connection like below:
VPN gateway
Select your preshared key here too. VPN gateway

Now select Advanced (note you could use 3DES, but in this case I just use DES):

VPN gateway

3) Now you need to setup Phase 2. Under VPNs > AutoKey IKE
Autokey
AutoKey IKE

Then select advanced:
autokey

4) Now we need to create a policy that allows traffic to flow in both directions. This is called a bidirectional VPN policy.

In Policies under Trust to Untrust create this policy.

VPN policy

5) Now time to setup the netgear. Create an auto VPN account

Netgear VPN policy

Note the preshared key must be the same for each device.

netgear

That should be all you need to do. You can monitor the connection on both sides through the log files. The netscreen outputs a more detailed log so it is best to read this.

If the connection doesn’t work it is best to troubleshoot the VPN from a console connection to the netscreen.

To start the debugging process type:

set console dbuf
clear dbuf
debug ike detail

To finish the debugging type:

undebug all
get dbuf stream

iPhone in Windows 7 “no new videos or pictures were found on this device”

Recently upgraded to Windows 7, and I plugged in my iPhone like I normally would on Windows XP to download all the pictures and videos I took.

I plugged in my iPhone, and Windows 7 did detect the iPhone, but when I selected to import the images, I quickly got a “no new videos or pictures were found on this device” message.

I found out that you have to first disable passlock on your iPhone.

So, go under Settings icon and click on General Settings.  There you will be able to turn Passlock off.

Once turned off, plug it into the USB port again, and everything should work from there.

Don’t forget to turn passlock ON after you are done downloading the pictures and videos!


Windows 7 and Folder Redirection Issue

I found folder permissions to be the only problem when configuring folder redirection on windows 7.

Dont forget to enforce the policy on client PC by goign to cmd and typing “gpupdate /force” and reloging.

This is a user policy so you dont need to boot your PC, just log off and on to test the setting

I sucessfully manage to configure those on windows 7 so I can confirm they work. What I did was to manually ensure that the Parent Folder to where I was redirecting my folders had permission for the SYSTEM and USERS to create the personal folders required.

For instance if you are redirecting my documents to \\server\personal\%username% so that user Bob has the My Documents folder redirected to \\server\personal\Bob what you must ensure is that:

\\server\personal is Owned by Authenticated Users

\\server\personal has Full Control permission for Authenticated Users

\\server\personal has Full Control permission for SYSTEM

\\server\personal has Full Control permission for OWNER (may appear as Special Permission if the full control is only appliable to files and subfolders, still works!)

\\server\personal has Full Control permission for Admins (this may be option, I put it just in case)

if you already created a Bob dir manually make sure that:

\\server\personal\Bob is Owned by Bob

\\server\personal\Bob has Full Control permission for Bob

\\server\personal\Bob has Full Control permission for SYSTEM

\\server\personal has Full Control permission for OWNER (may appear as Special Permission if the full control is only appliable to files and subfolders, still works!)

\\server\personal\Bob has Full Control permission for Admins (this may be option, I put it just in case)

Hope this helps you


How To Create Shared Mailbox In Exchange Server 2010

30% off your entire order at GoDaddy.com!

Convert a Mailbox

http://technet.microsoft.com/en-us/library/bb201749.aspx

Set-Mailbox ConfRoom1 -Type Room

You can use the following values for the Type parameter:

  • Regular
  • Room
  • Equipment
  • Shared

In Exchange Server 2010 there is option to create a shared mailbox for use of several users. To create shared mailbox follow this steps:

1. Open EMS (Exchange Management Shell) and type this command,

New-mailbox shareduser –shared –userprincipalname Shareduser@somedomain.com

2. After that a new user mailbox created with different icons.

3. Right click the user (shared mailbox) and select “Manage Full Access Permissions” and add the users you wish to allow access.

4. Then you can add the users to your outlook profile.

Note:

When you add user to be folder contact, this user will receive calendar items to his inbox.

 

Question:How To Create Shared Mailbox In Exchange Server 2010

Answer: Shared mailbox is a mailbox that is being used by multiple users and they all have the same permission to the mailbox.

Please note that that the Shared Mailbox account is disabled by default and it is never used to login to the mailbox.

To Create A Shared Mailbox In Exchange Server 2010 follow the steps below:

Open the Exchange Shell and type the following command:

New-mailbox servicedesk –shared –userprincipalname servicedesk@domain.local

After creating the mailbox you use the Manage Full Access the Permission to give all the users that will Share the Mailbox permission to use it.

To do that, Right Click on the mailbox under Recipient Configuration.

Now you need to select the users that will Share the mailbox by clicking on Add and selecting the users.

After Selecting all users click on Finish.

Next tell the users to add the new mailbox to their outlook Client.


When you send an e-mail message from a shared mailbox in Outlook 2007, the sent message is not saved in the Sent Items folder of the shared mailbox

When you send an e-mail message from a shared mailbox in Outlook 2007, the sent message is not saved in the Sent Items folder of the shared mailbox

  1. To do this, follow these steps:
    1. Click Start, click Run, type regedit, and then click OK.
    2. Locate and then click the following registry subkey:
      HKEY_CURRENT_USERSoftwareMicrosoftOffice12.0OutlookPreferences
    3. On the Edit menu, point to New, and then click DWORD Value.
    4. Type DelegateSentItemsStyle, and then press ENTER.
    5. Right-click
      DelegateSentItemsStyle

      , and then click Modify.

    6. In the Value data box, type 1, and then click OK.
    7. Exit Registry Editor.

Important After you set the DelegateSentItemsStyle registry value to 1, the functionality is only available when the Microsoft Exchange account is set to Use Cached Exchange Mode. The DelegateSentItemsStyle registry value will not work consistently on an Exchange account that is configured in Online mode. For more information about enabling Use Cached Exchange Mode, see the following Microsoft Office support article:

http://office.microsoft.com/en-us/outlook-help/redir/HP001232935.aspx?queryid=cde1b9af5cc1430a8e0adaafea0c67aa&respos=0&CTT=1

There is a common query across everywhere, when we add a shared mailbox in outlook profile and sending a mail from that account (using Send-As or Send On Behalf of) by specifying it in From field, mail item will be saved into ‘Sent Item’ of primary mailbox instead of ‘Sent Item’ folder of shared mailbox as per normal behaviour of Outlook.

Something like when I opened ‘Support’ mailbox in my outlook profile as an additional mailbox and sending mail from ‘Support’ mailbox by specifying it into From field. It will be saved into ‘Sent Item’ of Amit Tank’s mailbox and not in Sent Item of ‘Support’ mailbox.!!

So how do we configure it to be saved into Sent Item of Shared mailbox by default? So far we had to use some third-party utility like IvaSoft Unisent but now Microsoft has given an easy solution for it.

Solution:

Outlook 2007: Microsoft has released an Outlook 2007 hotfix package dated June 30, 2009 to resolve certain issues and this issue is addressed in that list.

So Install this hotfix package and add a registry key to make it enable.

1. Hotfix: Description of the Outlook 2007 hotfix package (Outlook.msp): June 30, 2009

2. Set below registry key as per KB972148 to enable this functionality.

[HKEY_CURRENT_USERSoftwareMicrosoftOffice12.0OutlookPreferences]
“DelegateSentItemsStyle”=dword:00000001

Voila! Now all mails, sent from shared mailbox account, are being saved into ‘Sent Item’ of shared mailbox.

Update:

Outlook 2003: Similar hotfix KB953803 requires to be installed for Outlook 2003 and add the registry key mentioned in KB953804 to enable this functionality.


Install & Configure BES Express 5.0.3 With Exchange 2010

Outline

I will be covering the installation and initial configuration of Blackberry Express Server 5.0.3 on both Windows 2008 Server SP2 and Windows 2008 Server R2.  This particular scenario covers the installation of Blackberry Express Server 5.0.3 on the same server that hosts your Exchange 2010 installation, however depending on the size of your environment and how many BES Express users you are looking at supporting you may opt to have a dedicated member server to install BES Express onto.  The following guide will cover both scenarios.

This guide covers the installation on Exchange 2010 SP1, however most parts will be applicable to Exchange 2007 too.

Blackberry Express Server is an attractive option over running Blackberry Enterprise Server, particularly for small to medium business environments.  You will not require device CALS to hookup your Blackberries to the server, and you don’t need a server licence either!

If you plan on installing Blackberry Express Server on the same box as your Exchange 2010 installation, then you’ll be able to support a maximum of 75 BES users.  If you decide to go with a dedicated server, then that figure jumps up to 2000 BES users.   The main differences between Blackberry Enterprise Server and Blackberry Express Server are listed below

 

  • Blackberry Monitoring Service
  • High availability
  • Custom administration roles
  • Additional IT policies
  • Support for Blackberry Mobile Voice System and Enterprise Instant Messaging

With the introduction covered, let’s proceed to the pre-requisites.

Pre-requisites

For the purposes of this guide, you will need the following:-

Operating System:  Windows 2008 Server SP2 or Windows 2008 Server R2

You will also need to have installed and configured Exchange 2010 with Service Pack 1 installed, however all parts of this guide will also be applicable to Exchange 2007 other than the section on Throttling Policies

If you plan to do OTA activations from outside your company network, you will need to ensure you open TCP port 3101 to your BES server.

Create The BES Express Administrator Account

Firstly login to your Exchange 2010 server and navigate to the Microsoft Exchange Management Console.  Once the management console loads, navigate to ‘Recipient Configuration’ and then click on ‘Mailbox’.  Create a new mailbox by clicking on the ‘New Mailbox’ button on the right hand side.

Once completed, choose to create a new user and mailbox, with the name BESAdmin, as per below:-

Once completed, we will need to ensure that the BESAdmin account is a local administrator on the server. Open ‘Server Manager’, and then ‘Configuration’ and finally select ‘Local Users & Groups’.  Double click on ‘Administrators’ and then click ‘Add’. Type in ‘BESAdmin’ and choose to ‘Check Names’ and click OK once AD resolves the name.

Once completed click ‘OK’ to finish.

Finally, we’ll need to ensure the BESAdmin account has permission to ‘Log On Locally’ and ‘Log On As A Service’. Click on ‘Start’ and then in the search box type ‘secpol.msc’ and hit enter.

In the Local Security Policy MMC navigate to ‘Local Policies’ and then ‘User Rights Management’ and scroll down to the policy ‘Log on as a service’ and double click to open.  Once opened add the BESAdmin account and click ‘OK’ to close.

Apply AD Permissions To BESAdmin Account

Now that we’ve setup our BESAdmin account correctly, we’ll need to assign it permissions within AD. Open up Microsoft Exchange Management Shell (Note: You’ll need to be logged into your Exchange 2010 server with an account that has permission to execute cmdlets from the Exchange Management Shell)

Once the Microsoft Exchange Management Shell has opened, type the following Power Shell commands (Hit return after each command):-

Add-RoleGroupMember “View-Only Organization Management” -Member “BESAdmin”

Followed by:-

Get-MailboxDatabase | Add-ADPermission -User “BESAdmin” -AccessRights ExtendedRight -ExtendedRights Receive-As, ms-Exch-Store-Admin

Finally, we’ll need to apply the ‘Send As’ permission for our BESAdmin account, like so:-

Add-ADPermission -InheritedObjectType User -InheritanceType Descendents -ExtendedRights Send-As -User “BESAdmin” -Identity “CN=Users,DC=www,DC=test,DC=com”

You will notice that the section DC=www,DC=test,DC=com will need to be replaced with your Active Directory domain name.  So, if your domain name was www.joebloggs.net, it would look like the following:-

Add-ADPermission -InheritedObjectType User -InheritanceType Descendents -ExtendedRights Send-As -User “BESAdmin” -Identity “CN=Users,DC=www,DC=joebloggs,DC=net”

Likewise, if your AD domain is called joebloggs.local, it would look like the following:-

Add-ADPermission -InheritedObjectType User -InheritanceType Descendents -ExtendedRights Send-As -User “BESAdmin” -Identity “CN=Users,DC=joebloggs,DC=local”

After entering the last command, you may receive the following, rather common error:-

Active Directory operation failed on Domain ***Controllor Name***. This error is not retriable. Additional information: Access is
denied.
Active directory response: 00000005: SecErr: DSID-031521D0, problem 4003 (INSUFF_ACCESS_RIGHTS), data 0
+ CategoryInfo : WriteError: (0:Int32) [Add-ADPermission], ADOperationException
+ FullyQualifiedErrorId : DA172DD1,Microsoft.Exchange.Management.RecipientTa sks.AddADPermission

To rectify this issue you’ll need to manually assign the ‘Send As’ permission for your BESAdmin account in AD.

To accomplish this, open up ‘Active Directory Users & Computers’ and select ‘View’ and then ‘Show Advanced Features’.  Now right click on your domain on the left hand pane and choose ‘Properties’ and then navigate to the ‘Security’ tab.  On the ‘Permissions’ tab choose ‘Advanced’ and then click ‘Add’.  Add the BESAdmin account. When the permission entry dialog box appears, choose ‘Descendant User Objects’ on the ‘Apply To’ drop-down box.  Once completed, scroll down to ‘Send As’ and select ‘Allow’.

Once completed, click ‘OK’ to finish.

Create A New Exchange 2010 Client Throttling Policy For Blackberry Express Server

We’re now ready to create a new throttling policy.  This is required for Blackberry Express Server to operate correctly, as the default throttling policy in Exchange 2010 reduces available bandwidth for each respective mailbox automatically.

Open up the Microsoft Exchange Management Shell and type the following commands:-

New-ThrottlingPolicy BESEXPRESS -CPAMaxConcurrency $NULL -CPAPercentTimeInCAS $NULL -CPAPercentTimeInMailboxRPC $NULL -RCAMaxConcurrency $null -RCAPercentTimeInAD $null -RCAPercentTimeInCAS $null -RCAPercentTimeInMailboxRPC $null -EWSMaxConcurrency $null -EWSPercentTimeInAD $null -EWSPercentTimeInCAS $null -EWSPercentTimeInMailboxRPC $null -EWSMaxSubscriptions $null -EWSFastSearchTimeoutInSeconds $null -EWSFindCountLimit $null

Set-Mailbox “BESAdmin” -ThrottlingPolicy BESEXPRESS

Once completed, verify that the ‘BESEXPRESS’ policy has null values applied with respect to throttling, like so:-

Get-ThrottlingPolicy BESEXPRESS

You will need to scroll down and verify that the following policies have null values.

CPAMaxConcurrency

CPAPercentTimeInCAS

CPAPercentTimeInMailboxRPC

RCAMaxConcurrency

RCAPercentTimeInAD

RCAPercentTimeInCAS

RCAPercentTimeInMailboxRPC

EWSMaxConcurrency

EWSPercentTimeInAD

EWSPercentTimeInCAS

EWSPercentTimeInMailboxRPC

EWSMaxSubscriptions

EWSFastSearchTimeoutInSeconds

EWSFindCountLimit

I’d suggest also checking to see if the BESEXPRESS policy has been applied successfully to the BESAdmin account, by typing the following command:-

Get-Mailbox “BESAdmin” | fl Name,ThrottlingPolicy

You should get the following result, with the BESEXPRESS policy listed.

 

Create New Management Role For Exchange Web Services To Work Correctly With BES

Open up the Microsoft Exchange Management Console and type the following commands:-

New-ManagementRoleAssignment -Name “BES Admin EWS” -Role ApplicationImpersonation -User “BESAdmin”

Get-Mailbox -Server “<messaging_server_name>” | Set-CalendarProcessing -ProcessExternalMeetingMessages $true

Install Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1

We’re now ready to install the MAPI and CDO components required to run BES Express.  Navigate to the followinglink and download and run through the installation.

Install BES Express 5.0.3

We’re now ready to complete the actual installation of BES Express.  Firstly, login to your BES Express server using the BESAdmin account.  Once completed, launch your web browser and navigate to the following link

You’ll need to fill out some basic registration information, along with your email address.  When you have completed the registration form, you should receive an email with the download link for BES Express and your licence details.  I’d strongly recommend saving these licence details for future installations.

Once you have downloaded BES Express, extract the files to a folder of your choice and double click on ‘setup.exe’ to start.

During the installation you will want to make sure you choose the option to ‘Create a Blackberry Configuration Database’ and to ‘Install Microsoft SQL Server 2005 SP3′ when prompted.  When you are asked for your Windows account information, simply enter the BESAdmin username and password, and choose a name for your BES Server when asked.

After clicking ‘Install’ the installation process will begin and the server will reboot once before continuing.  After the restart, ensure you choose ‘Local’ for the database information screen.

When prompted for your Blackberry CAL and SRP information, use the licence details you received in the download request email.

On the following screen ‘Administration Settings’ you will need to enter an SSL certificate password for the Blackberry Administration Service.  On the ‘Advanced Administration Settings’ page you can choose between Active Directory authentication and Blackberry authentication.  You can choose whichever you prefer, as this is purely for authenticating to the Blackberry Administration Service management site.  Unfortunately in my environment I was receiving an LDAP error when attempting to use AD authentication.  This turned out to be down to stale DNS records for a DC which had to be forcibly removed from AD after a hardware failure.

On the ‘Start Services’ page, simply click ‘Start Services’ to bring up all Blackberry services, thus completing the installation.

Add BES Users And Devices From The Blackberry Administration Service Console

We’re now ready to add our first user to the BES Express. There are multiple ways in which to add Blackberry phones to your BES Express, however for the purposes of this guide we will be adding our first user via USB.  However this would clearly not be an efficient way to setup multiple users. In these cases OTA (Over The Air) activations, via GPRS or WiFi are highly recommended.

In order to install the required Activex control for scanning for connected USB devices, you will need to use Internet Explorer 6 up to 9.  On Windows 2008 SP2 and Windows 2008 R2 you will need to edit the IE ESC settings to allow less restricted web browsing.

Firstly navigate to ‘Server Manager’ and then ‘Configure IE ESC’ and disable restricted browser settings for local administrators, like so:-

Once completed open up Internet Explorer and navigate to Tools > Internet Options > Security.  Click on ‘Trusted Sites’ and then choose ‘Sites’.  You will then need to type in the address of your Blackberry Express webconsole, as per below:-

https://bes.joebloggs.com:3443/webconsole/login

Replace the server name and domain with your own information.

Once completed, click ‘Close’.  Next, we will need to ensure that the required third-party Activex control can run for the Blackberry Administration Service console.  Click on ‘Trusted Sites’ again and then choose ‘Custom Level’.  Ensure the following options are set, as per below:-

Automatic prompting for ActiveX controls – Enabled

Download unsigned ActiveX controls – Prompt

Initialize and script ActiveX controls not marked as safe for scripting – Prompt

Run ActiveX controls and plug-ins – Enabled

Once completed, click ‘OK’ and ‘OK’ to finish.

Finally, in order to detect Blackberry smart phones, you will need to download and install the Blackberry USB and Modem drivers from the following link on the BES Express.

We’re now ready to login to the Blackberry Administration Service console.  Launch Internet Explorer and navigate tohttps://bes.joebloggs.com:3443/webconsole/login, ensuring you substitute with your server name.  At the login screen choose either Active Directory authentication or Blackberry authentication, depending on which option you chose during the BES installation.  If you are using Active Directory authentication, login using your BESAdmin account.  If you are using Blackberry authentication, the default username is ‘admin‘ and your password is the one which was specified during the installation.

When prompted to install the Blackberry Administration ActiveX control, choose ‘Yes’.

Once logged in you should be greeted by the following screen:-

We’re now ready to add our first user account.  Click ‘User’ and then ‘Create a user’.  On the next screen type in the Exchange 2010 email address for the user you’d like to add, and then click ‘Search’ at the bottom of the form.

Once the user account is resolved in AD, hit ‘Create a user with activation password’ and then on the following screen type an activation password. (Note: As we are performing the activation via USB, the activation password will not be used)

With the user created, we now need to associate a Blackberry smart phone.  I would strongly recommended performing a security wipe on the Blackberry device before proceeding with this step, as I found that the enterprise activation stage would fail at around 97% on devices that contained existing data.

Backing Up Blackberry Smartphone Data And Performing A Factory Reset

Before we hook up the Blackberry smart phone to the BES, we’ll backup user data and perform a full security wipe.  I am using a Blackberry 9700 for this stage, however the steps should be applicable for most Blackberry phone models.

Firstly download and install Blackberry Desktop Manager from here. Once completed, attach your Blackberry device via the USB cable and allow Blackberry Desktop Manager to pickup the device.

Once the application has completed, choose ‘Backup & Restore’. I would suggest completing a full backup, which will backup all user data on the phone to a single file.  Once completed, remove the Blackberry smart phone and on the phone itself navigate to ‘Options’ > ‘Security Options’ > ‘Security Wipe’ and click the middle button on the phone.  When prompted which data to remove, choose all options, leaving the ‘Media Card’ option unticked.

You’ll be prompted for a password, enter blackberry.  After 5-10 minutes the phone will be reset back to factory defaults.

Add A Blackberry Smartphone And Associate With A User

We’re now ready to get our first user up and running on the BES Express.  Firstly launch the Blackberry Administration Web Console and login. (Note: I often found that attaching the Blackberry smart phone to the BES Server BEFORE launching the administration console would result in the device not being detected)

Once logged in, attach your security wiped phone via the USB cable to the BES Server (Note: Good luck if your server only has USB 1.1 ports!) You should see the Blackberry loader appear in the system tray, and the ‘Attached Devices’ drop-down box should then populate with four options.

If this does not occur, the problem is almost always related to the required ActiveX control not loading correctly due to Internet Explorer settings. You’ll want to head back to ‘Internet Options’ and lower your ActiveX security settings again.

From the ‘Attached Devices’ menu, choose ‘Manage Device’.  On the following screen you should see your Blackberry smart phone information, including the PIN and model number.  Choose to ‘Associate device to a user’ button and then select the user we added earlier.  Once completed, you’ll received a notification telling you that the Blackberry services are being delivered to the device.

After a few minutes you should see the Enterprise Activation process start on your phone.  This can take anywhere between 5-30 minutes, depending on the amount of data that is being synchronised.

Your device will now be activated and the user’s Exchange 2010 Calendar, Notes, Tasks and Email should sync successfully.

For subsequent activations, I would recommend creating the BES users as we did previously, and then performing an OTA enterprise activation.  (Note: You’ll need TCP port 3101 open to the outside world to achieve this)

Restore Blackberry Smartphone Data Using Blackberry Desktop Manager

We can now restore any user data back to our Blackberry smart phone.  Launch Blackberry Desktop Manager, and choose ‘Backup & Restore’ and then choose to restore from the file we created earlier.  You may notice that the majority of the user data is greyed out and cannot be restored.

To rectify this issue, on the Blackberry phone navigate to ‘Options’ > ‘Advanced Options’ > ‘Service Book’ and scroll down to ‘Desktop [SYNC]‘ and hit the Blackberry key and choose ‘Delete’.  If you now close ‘Backup & Restore’ in Blackberry Desktop Manager and then re-open it, you should now be able to restore all data.  Once you have completed the restoration process, on the Blackberry smart phone head back to ‘Service Books’ and hit the Blackberry key and choose ‘Undelete’  The ‘Desktop [SYNC]‘ entry should re-appear.

Finishing Up & Disabling Automatic Java Updates

I would strongly recommend disabling automatic Java updates, as JRE is essentially fundamental to the smooth operation of the Blackberry Administration Web Console, and I found that applying JRE updates prevented the BAS-AS service from starting.

On the BES Express server you will need to open the registry and create the following DWORD value, as per below:-

[HKEY_LOCAL_MACHINESOFTWAREJavaSoftJava UpdatePolicy] "EnableAutoUpdateCheck"=dword:00000000

This should disable automatic Java updates for all users on the server.   This can also be achieved by creating a GPO and applying it to the applicable OU for your BES Express servers, in cases where you have multiple servers.

Conclusion

We have now successfully setup a Blackberry Enterprise Express Server.  I have not covered some of the more advanced features of the Blackberry Administration Web Console, such as IT Policies, however I would strongly recommend checking out the official documentation on the Blackberry site to get to grips with the other features.

In a future guide, I will be covering some of the troubleshooting techniques you can employ to diagnose server side issues as well as Blackberry smart phone activation issues.