Saturday, August 18, 2012

The Exchange Management Shell is missing and how to recover


Hello Friends,

Recently i have installed Microsoft Exchange 2010 on Server 2008 R2 with fully updated OS, All configuration went well and tested all services,OWA, Microsoft Console, etc...

After all necessary Testing i have decided to Upgrade Exchange 2010 with Service pack 2, then suddenly Outlook Web Access Was not working properly with below error.

Error : 

Outlook Web App didn’t initialize. If the problem continues, please contact your helpdesk.
Couldn’t find a base theme (folder name=base)


Problem: After installing Service Pack 2 for Exchange Server 2010, the Exchange Management Shell is missing.
Cause: Missing certain .ps1 scripts from the bin directory, removed during SP2 setup.

Resolution: There is no resolution at this time.


Workaround:


1.
Verify that the ConnectFunctions.ps1 , RemoteExchange.ps1 and CommonConnectFunctions.ps1 files are present in the %ExchangeInstallPath%\bin directory.

NOTE : If these files are missing, you can copy the files from the Exchange Server 2010 Service Pack 1 installation media to the %ExchangeInstallPath%\bin directory.
These files are present in the \setup\serverroles\common folder.
2.
Right click an open area on the Desktop, click New , click Shortcut .
3.
In the Type the location of the item , type in the text below:
%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command ". '%ExchangeInstallPath%\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto"
4.
Name the shortcut Exchange Management Shell and click Finish .
5.
Right click the Exchange Management Shell shortcut, click Properties and remove the text from Start In field on the Shortcut tab.
6.
On the Shortcut tab, click Change Icon , click Browse and type in the text below:
%SystemRoot%\Installer\{4934D1EA-BE46-48B1-8847-F1AF20E892C1}\PowerShell.exe
7.
Select the Exchange icon and click OK .
8.
Click Apply and click OK .
9.
Copy the new Exchange Management Shell shortcut to this location:
%systemdrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Exchange Server 2010

Run this Command to fix Outlook Web Access Problem :

1) Open Exchange Management Shell and run Power shell script which is located on below path..
C:\Program Files\Microsoft\Exchange Server\V14\Bin\UpdateCas.ps1 


Good Luck...

Saturday, August 4, 2012

Bare Metal Recovery of Windows 2008 R2 from Backup.

Hello Everyone..

In this blog i will demonstrate how to recover your Windows 2008 server from Bare Metal Recovery backup.

Bare Metal Backup is one of the best feature in windows backup which can help you to recover your server within 15 Mins without any extra efforts.

Now a day's many backup Software are available in the market for System Recovery which does the same as windows Bare Metal backup. why to pay extra while your Operating System has in build features.

Bare Metal Feature was introduce in Windows Vista, now up coming all windows version has these Feature like Windows 7, Widows Server 2008 , Windows Server 2008 R2.

Bare Metal System Recovery backup can be store in Local Drive or Network Drive, hear i will demonstrate system recovery using Network Location.

Before Starting Step by Step i am assuming that your server already has windows backup feature with command prompt support installed and Bare Metal backup has been taken on network drive "\\server\backup name" prior to recover system from backup.


1. Start the computer by using the Windows Server 2008 DVD

2. On the first screen Click Next.




3. Select the “Repair your computer” option in the lower-left corner of screen.




4. It will show you any currently installed operating systems. Click Next.
If this screen is blank you may have to load a third-party driver for your mass storage driver. You can click Load Drivers to load the mass storage driver from your USB flash drive.

5. Click “Windows Complete PC Restore”.





6. It will report “A valid backup location could not be found”. Click cancel.


7. Select “Restore a different backup” then next.
8. Click Advanced.

9. If the network adapter driver is included with Windows Server 2008 you can click “Search for a backup on the network. If the network adapter driver is not included you have to click “install a driver” and browse to your driver to load it. In my test I was using a Hyper-V virtual machine with the legacy network adapter. The legacy network adapter driver is in Windows Server 2008 so that it just works. The synthetic driver is not included.


You would receive an error similar to the following when you try to connect to the server.

If you Receive above error then please follow below steps, above error occurs due to Network Driver is not installed / IP Address not set.

IP ADDRESS ASSIGNMENT: 

You may need to assign an IP address if DHCP is not configured on the network you are wanting to restore to.

   A. Shift+F10 to open a command window.
    B.  Ipconfig /all- to list interfaces and ip addresses - make a note of the network connection name "Local Area Connection" if you have more than one.

    C.  netsh
         interface
          tcp
            ipv4
               set address "Local Area Connection" static 192.168.1.1  255.255.255.0  192.168.1.1 1


NETWORK DRIVER LOAD

If your network adapter is not included with Windows you need to load the driver using drvload.

Drvload driver.inf

Where driver.inf is the inf for the network adapter. You can load this from an usb flash drive or the local drive if it is available.

Start /w wpeinit

Run ipconfig to verify the driver loaded and you have a valid ip address. If you have to set a static IP address, you could use IP ASSIGNMENT PROCESS.


10. Click Yes to the “Are you sure you want to connect to the network” and then specify the path of your backup. You can use IP address instead to eliminate any netbios/dns issues.


11. Select the backup listed and then click Next.


12. Select the backup then Next.


13. You are presented with the restore options.


The exclude disks option enables you to exclude disks from the restore process.
The advanced button has the following options.


14. Click Finish to confirm the settings.


If you selected “Format and repartition disks” you are prompted with “Windows Complete PC restore will format the disks you chose to restore, which will erase all existing data”. Click “I confirm that I want to format the disks and restore the backup”.



You can monitor the progress through the final dialog box.


The restart will automatically occur or you can delay it.



BACKUP RESTORE FROM COMMAND PROMPT :-

first of all install Network Driver and assign IP address and then map network drive in to your computer as mention above.

Net use z: \\server\share /user:username

Where \\server\share is the location that you saved your backup to. There should be a WindowsImageBackup folder in the root of the share/directory that you saved your backup to.

wbadmin get versions -backuptarget:\\server\share

You should output similar to the following

wbadmin 1.0 - Backup command-line tool
(C) Copyright 2004 Microsoft Corp
.

The times of the backups displayed are based on the timezone of the current
operating system you have booted into.

The timezone used currently is (GMT -08:00) Pacific Standard Time
Backup time: 1/8/2009 11:20 AM 

Backup target: Network Share labeled \\server\share
Version identifier: 01/08/2009-19:20 

Can Recover: Volume(s), File(s), Application(s), Bare Metal Recovery

From this you must have the Version Identifier for the next step.
Note this basically wipes the drive so be careful when you use the next command

wbadmin start sysrecovery –backuptarget:\\server\share -version:01/08/2009-19:20 -recreatedisks –restoreallvolumes -quiet

so friends now you may understand how to recover server from Bare Metal Recovery backup in windows server and Client.

See yaa...see you in my next technology Blog. 

Keep Rocking... Keep Blogging..

Gaurang Patel