Wednesday, August 24, 2011

Windows Server 2008 Hyper-V Backup

I did a lot of research before providing this solution to public and I think that the combination of the script I wrote with some registry modifications and the limitation of Windows Backup Schedule to store the backup to a remote network share or external drive with automatic date creation to store the backups, inspired me to share a solution around this.

First of all make sure that you applied the registry modification to support Hyper-V VSS Writer. Instructions on how to do so you can find in this post:
To be able to enable VSS backup of Hyper-V Virtual Machines you will need to manual add a registry hack that will enable Hyper-V VSS Writer to be used with Windows Server 2008 Backup.

Be sure that you have the latest patches installed for your Windows Server before proceed.

1) Regedit
2) Browse:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\
3) Select CurrentVersion and Create a New Key WindowsServerBackup
4) Select WindowsServerBackup and create a new key: Application Support
5) Select Application Support and create a new key: {66841CD4-6DED-4F4B-8F17-FD23F8DDC3DE}
6) Under {66841CD4-6DED-4F4B-8F17-FD23F8DDC3DE} create a New String Value named


Application Identifier with the value Hyper-V
Or
You could create a new file hyperv_vss_writer.reg and paste the following:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup\Application Support]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup\Application Support\{66841CD4-6DED-4F4B-8F17-FD23F8DDC3DE}]
"Application Identifier"="Hyper-V"

Then execute the file to import the modifications to registry

Create a batch file with the following code:
@echo off
:: set variables
set remote=\\remoteip\remotefolder
set folder=%date:~7,2%-%date:~4,2%-%date:~10,4%
set localC=C:
set localD=D:
:: do not modify below
echo Backup Started..
mkdir “%remote%\%folder%”
wbadmin start backup -backupTarget:”%remote%\%folder%” -include:%localC%,%localD% -quiet
echo Backup Complete Succesfully
@pause
In the variables area we define: set folder=%date:~7,2%-%date:~4,2%-%date:~10,4%” which a dated folder directory will be created on the remote location in the format of d-m-Y (ex: 05-11-2008).
Then we execute the wbadmin command with -backupTarget: option to select our destination backup folder. That could be a second local drive, an external usb drive or a network share.
After that we are using the -include: option to select the local drives or paths that we want to backup, which in our case is two volumes called C: and D:. You are not limited to backup the whole volumes but you could easily decide to backup only specific folders from each volume but you will have to define them in the script above.

I had tested a full backup and restoration of Hyper-V images and they are booting succesfully.

To create a scheduled backup

1) Create a new folder on C: drive named BackupSchedule
2) Place the backup script to BackupSchedule Folder
3) Create a backup account that will run the schedule (ex: backup)
4) Create a Schedule Task to run on daily basis the time and hour you wish to backup your server. Remember while you create your task to assign the backup account and select Run whether user is logged on or not option. Also be sure to have the same account details on the remote network location to avoid asking for a password.

 


Sample Output of the batch script running:

 


Default IIS 7 Log files location

As you might notice in Internet Information Services 7 the default log location for files has been changed. In this article we are pointing out the default log files location for both IIS7 and its predecessor IIS6

IIS 7 Log files location

%SystemDrive%\inetpub\logs\LogFiles

IIS 6 Log files location

%windir%\System32\LogFiles

Backup and Restore IIS 6.0 in Windows Server 2003

This article will show how to succesfully backup and restore an IIS 6.0 configuration without any issues to a new server installation. Although it is an easy process to do there are some issues that we have to be aware of.
If we plan to backup and restore IIS 6.0 to the same server installation or repair an IIS we can create a backup without a passsword. This way we are creating a non-portable backup for IIS 6 metabase. Because the machine key is used in case we dont provide a backup we will have to restore it to the same original machine.
The trick here is that to succesfully create a backup for a new server and for us to be able to restore it without errors we MUST create a password. This approach is called a portable backup for IIS 6 metabase.
Portable Backup of IIS 6.0 Metabase
1) Open IIS Manager
2) Second Mouse Click on Local Computer -> All Tasks -> Backup/Restore Configuration


3) Under Configuration backup name type a name for your backup
4) Select Encrypt backup using password and type your password twice.


5) Start -> Run -> %systemroot%\system32\inetsrv\MetaBack
6) Copy to the new server the two ackup files created under the name you give with extensions .SC0 and MD0
7) Copy all your web folders to the new server

Restoring IIS 6.0 Metabase on new server

1) Restore all your web folders back to the new server
2) Open IIS Manager
3) Second Mouse Click on Local Computer -> All Tasks -> Backup/Restore Configuration




4) Select the file you want to restore and enter the password when prompt



After restoration is complete be sure that you have installed latest Framework 3.5 SP1 and in case you have the sites connected to an external sql database you double check your configuration changes.

Friday, August 19, 2011


1) What is Active Directory?
A central component of the Windows platform, Active Directory directory service provides the means to manage the identities and relationships that make up network environments. For example we can create, manage and administrator users, computers and printers in the network from active directory.

2) What is DNS? Why it is used? What is “forward lookup” and “reverse lookup” in DNS? What are A records and mx records?

DNS is domain naming service and is used for resolving names to IP address and IP addresses to names. The computer understands only numbers while we can easily remember names. So to make it easier for us what we do is we assign names to computers and websites. When we use these names (Like yahoo.com) the computer uses DNS to convert to IP address (number) and it executes our request.

Forward lookup: Converting names to IP address is called forward lookup.

Reverse lookup: Resolving IP address to names is called reverse lookup.

‘A’ record: Its called host record and it has the mapping of a name to IP address. This is the record in DNS with the help of which DNS can find out the IP address of a name.

‘MX’ Record: its called mail exchanger record. Its the record needed to locate the mail servers in the network. This record is also found in DNS.

3) What id DHCP? Why it is used? What are scopes and super scopes?

DHCP: Dynamic host configuration protocol. Its used to allocate IP addresses to large number of PCs in a network environment. This makes the IP management very easy.

Scope: Scope contains IP address like subnet mask, gateway IP, DNS server IP and exclusion range which a client can use to communicate with the other PCs in the network.

Superscope: When we combine two or more scopes together its called super scope.

4) What are the types of LAN cables used? What is a cross cable?

Types of LAN cables that are in use are “Cat 5″ and “Cat 6″. “Cat 5″ can support 100 Mbps of speed and “CAT 6″ can support 1Gbps of speed.

Cross cable: Its used to connect same type of devices without using a switch/hub so that they can communicate.

5) What is the difference between a normal LAN cable and cross cable? What could be the maximum length of the LAN cable?

The way the paired wires are connected to the connector (RJ45) is different

in cross cable and normal LAN cable.

The theoretical length is 100 meters but after 80 meters you may see drop in speed due to loss of signal.

6) What would you use to connect two computers without using switches?

Cross cable.

7) What is IPCONFIG command? Why it is used?

IPCONFIG command is used to display the IP information assigned to a computer. From the output we can find out the IP address, DNS IP address, gateway IP address assigned to that computer.

What is APIPA IP address? Or what IP address is assigned to the computer when the DHCP server is not available?

When DHCP server is not available the Windows client computer assigns an automatic IP address to itself so that it can communicate with the network computers. This ip address is called APIPA. ITs in the range of 169.254.X.X.

APIPA stands for Automatic private IP addressing. Its in the range of 169.254.X.X.

9) What is a DOMAIN? What is the difference between a domain and a workgroup?

Domain is created when we install Active Directory. It’s a security boundary which is used to manage computers inside the boundary. Domain can be used to centrally administrator computers and we can govern them using common policies called group policies.

We can’t do the same with workgroup.

10) Do you know how to configure outlook 2000 and outlook 2003 for a user?

Please visit the link below to find out how to configure outlook 2000 and outlook 2003. http://www.it.cmich.edu/quickguides/qg_outlook2003_server.asp

11) What is a PST file and what is the difference between a PST file and OST file? What file is used by outlook express?

PST file is used to store the mails locally when using outlook 2000 or 2003. OST file is used when we use outlook in cached exchanged mode. Outlook express used odb file.

12) What is BSOD? What do you do when you get blue screen in a computer? How do you troubleshoot it?

BSOD stands for blue screen of Death. when there is a hardware or OS fault due to which the windows OS can run it give a blue screen with a code. Best way to resolve it is to boot the computer is “Last known good configuration”.

If this doesn’t work than boot the computer in safe mode. If it boots up than the problems with one of the devices or drivers.

13) What is RIS? What is Imaging/ghosting?

RIS stands for remote installation services. You save the installed image on a windows server and then we use RIS to install the configured on in the new hardware. We can use it to deploy both server and client OS. Imaging or ghosting also does the same job of capturing an installed image and then install it on a new hardware when there is a need. We go for RIS or imaging/ghosting because installing OS every time using a CD can be a very time consuming task. So to save that time we can go for RIS/Ghosting/imaging.

14) What is VPN and how to configure it?

VPN stands for Virtual private network. VPN is used to connect to the corporate network to access the resources like mail and files in the LAN. VPN can be configured using the steps mentioned in the KB: http://support.microsoft.com/kb/305550

15) Your computer slowly drops out of network. A reboot of the computer
fixes the problem. What to do to resolve this issue?

Update the network card driver.

16) Your system is infected with Virus? How to recover the data?

Install another system. Install the OS with the lates patches, Antivirus with latest updates. Connect the infected HDD as secondary drive in the system. Once done scan and clean the secondary HDD. Once done copy the files to the new system.

17) How to join a system to the domain? What type of user can add a system to the domain?

Please visit the article below and read “Adding the Workstation to the Domain” http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologi /directory/

18) What is the difference between a switch and a hub?

Switch sends the traffic to the port to which its meant for. Hub sends the traffic to all the ports.

19) What is a router? Why we use it?

Router is a switch which uses routing protocols to process and send the traffic. It also receives the traffic and sends it across but it uses the routing protocols to do so.

20) What are manageable and non manageable switches?

Switches which can be administered are called manageable switches. For example we can create VLAN for on such switch. On no manageable switches we can’t do so.

KCC


The KCC is a built-in process that runs on all domain controllers and generates replication topology for the Active Directory forest. The KCC creates separate replication topologies depending on whether replication is occurring within a site (intrasite) or between sites (intersite). The KCC also dynamically adjusts the topology to accommodate new domain controllers, domain controllers moved to and from sites, changing costs and schedules, and domain controllers that are temporarily unavailable.

How do you view replication properties for AD?

By using Active Directory Replication Monitor.

Start--> Run--> Replmon



What are sites What are they used for?

One or more well-connected (highly reliable and fast) TCP/IP subnets. A site allows administrators to configure Active Directory access and replication topology to take advantage of the physical network.

Name some OU design considerations?

OU design requires balancing requirements for delegating administrative rights - independent of Group Policy needs - and the need to scope the application of Group Policy. The following OU design recommendations address delegation and scope issues:

Applying Group Policy An OU is the lowest-level Active Directory container to which you can assign Group Policy settings. Delegating administrative authority usually don't go more than 3 OU levels

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

What are FMSO Roles? List them.

Fsmo roles are server roles in a Forest

There are five types of FSMO roles

1-Schema master

2-Domain naming master

3-Rid master

4-PDC Emullator

5-Infrastructure master


Logical Diagram of Active Directory ?, What is the difference between child domain & additional domain Server?

Well, if you know what a domain is then you have half the answer. Say you have the domain Microsoft.com. Now microsoft has a server named server1 in that domain, which happens to the be parent domain. So it's FQDN is server1.microsoft.com. If you add an additional domain server and name it server2, then it's FQDN is server2.microsoft.com.

Now Microsoft is big so it has offices in Europe and Asia. So they make child domains for them and their FQDN would look like this: europe.microsoft.com & asia.microsoft.com. Now lets say each of them have a server in those child domains named server1. Their FQDN would then look like this: server1.europe.microsoft.com & server1.asia.microsoft.com..

What are Active Directory Groups?

Groups are containers that contain user and computer objects within them as members. When security permissions are set for a group in the Access Control List on a resource, all members of that group receive those permissions. Domain Groups enable centralized administration in a domain. All domain groups are created on a domain controller.

In a domain, Active Directory provides support for different types of groups and group scopes. The group type determines the type of task that you manage with the group. The group scope determines whether the group can have members from multiple domains or a single domain.



Group Types

* Security groups: Use Security groups for granting permissions to gain access to resources. Sending an e-mail message to a group sends the message to all members of the group. Therefore security groups share the capabilities of distribution groups.

* Distribution groups: Distribution groups are used for sending e-main messages to groups of users. You cannot grant permissions to security groups. Even though security groups have all the capabilities of distribution groups, distribution groups still requires, because some applications can only read distribution groups.

Group Scopes

Group scope normally describe which type of users should be clubbed together in a way which is easy for there administration. Therefore, in domain, groups play an important part. One group can be a member of other group(s) which is normally known as Group nesting. One or more groups can be member of any group in the entire domain(s) within a forest.

* Domain Local Group: Use this scope to grant permissions to domain resources that are located in the same domain in which you created the domain local group. Domain local groups can exist in all mixed, native and interim functional level of domains and forests. Domain local group memberships are not limited as you can add members as user accounts, universal and global groups from any domain. Just to remember, nesting cannot be done in domain local group. A domain local group will not be a member of another Domain Local or any other groups in the same domain.

* Global Group: Users with similar function can be grouped under global scope and can be given permission to access a resource (like a printer or shared folder and files) available in local or another domain in same forest. To say in simple words, Global groups can be use to grant permissions to gain access to resources which are located in any domain but in a single forest as their memberships are limited. User accounts and global groups can be added only from the domain in which global group is created. Nesting is possible in Global groups within other groups as you can add a global group into another global group from any domain. Finally to provide permission to domain specific resources (like printers and published folder), they can be members of a Domain Local group. Global groups exist in all mixed, native and interim functional level of domains and forests.

* Universal Group Scope: these groups are precisely used for email distribution and can be granted access to resources in all trusted domain as these groups can only be used as a security principal (security group type) in a windows 2000 native or windows server 2003 domain functional level domain. Universal group memberships are not limited like global groups. All domain user accounts and groups can be a member of universal group. Universal groups can be nested under a global or Domain Local group in any domain.

What are the types of backup? Explain each?

Incremental

A "normal" incremental backup will only back up files that have been changed since the last backup of any type. This provides the quickest means of backup, since it only makes copies of files that have not yet been backed up. For instance, following our full backup on Friday, Monday’s tape will contain only those files changed since Friday. Tuesday’s tape contains only those files changed since Monday, and so on. The downside to this is obviously that in order to perform a full restore, you need to restore the last full backup first, followed by each of the subsequent incremental backups to the present day in the correct order. Should any one of these backup copies be damaged (particularly the full backup), the restore will be incomplete.

Differential

A cumulative backup of all changes made after the last full backup. The advantage to this is the quicker recovery time, requiring only a full backup and the latest differential backup to restore the system. The disadvantage is that for each day elapsed since the last full backup, more data needs to be backed up, especially if a majority of the data has been changed.

What is the SYSVOL folder?

The Windows Server 2003 System Volume (SYSVOL) is a collection of folders and reparse points in the file systems that exist on each domain controller in a domain. SYSVOL provides a standard location to store important elements of Group Policy objects (GPOs) and scripts so that the File Replication service (FRS) can distribute them to other domain controllers within that domain.

You can go to SYSVOL folder by typing : %systemroot%/sysvol

What is the ISTG Who has that role by default?

The first server in the site becomes the ISTG for the site, The domain controller holding this role may not necessarily also be a bridgehead server.

What is the order in which GPOs are applied?

Local, Site, Domain, OU




How to move Exchange databases and logs in Exchange Server 2003

If you want to move log files or database files to another drive, use the following procedures.


To move log filesStart Exchange System Manager.

Click Administrative Groups.

Note If Administrative Groups does not appear, it may not be turned on. To turn

on Administrative Groups, right-click Exchange Organization in Exchange

System Manager, and then click Properties. Click to select the Display

Administrative Groups check box.

Locate the storage group where you want to change log file paths, right-click the storage group, and then click Properties.

Click the General tab, click the Browse button next to the Transaction log location box, and then specify the new drive or folder location for the log files.

To move databasesStart Exchange System Manager.

Open the administrative group that contains the database that you want to change.

Under Storage Group, right-click the mailbox store or the public folder store that you want to change, and then click Properties.

Click the Database tab.

Next to the database that you want to change, click Browse, and then specify a new drive or folder location for the files.

Notes

With the databases, you can decide to move the Exchange Database (.edb file), the Exchange Streaming Database (.stm file), or both.

If the databases are still mounted, you receive the following message:

You are about to perform the following operation(s):

- change Exchange database location

To perform the requested operation(s), the store must be temporarily dismounted which will make it inaccessible to any user.


Do you want to continue?

Click Yes to dismount the database automatically and move the location.

When you finish moving the databases, remount the databases manually.

You can move the log files and database files to any folder that you want to create. When you move logs and database files, you may want to create the Exchsrvr\Mdbdata file structure for consistency reasons, but you are not obligated to do so.

You must grant the following default permissions to the new Mdbdata folder that contains the log files and database files:

Administrators: Full Control

Authenticated Users: Read and Execute, List Folder Contents, Read

Creator Owner: None

Server Operators: Modify, Read and Execute, List Folder Contents, Read, Write

System: Full Control

Note Only assign permissions to the Server Operators group if the Exchange server is a domain controller. Otherwise, assign permissions to the Power Users group. Only domain controllers should have permissions to the built-in Server Operators group. Stand-alone and member servers should have permissions to the built-in Power Users group.

You may also have to grant the following permissions to the root drive that contains the new Mdbdata folder:

System: Full Control

During the process of moving log files and database files, your store is temporarily dismounted. Because the store is temporarily dismounted, it is inaccessible to your users until the process is completed. Moving log files or database files invalidates all existing incremental and differential backups; therefore, make a full backup after these changes.

Do not delete or rename the Old MDBdata Folder path after you move the Exchange database. If you want to delete the old MDBdata folder, make sure that the following working directory parameter in the registry points to the new location:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersSystem

Value name: Working Directory

Value type: REG_SZ

Value data: C:\Program Files\Exchsrvr\Mdbdata

Do not move databases to the root of a drive. Instead, move databases at least one subfolder down from the root drive. For example, do not use C:\ as the path of the database or log files. Instead, you could use the C:\Subfolder path. In an organization that uses Exchange 2003 and Exchange 2007, the 2007 management tools will flag database or log files that are the root of a drive as an error.

APPLIES TOMicrosoft Exchange Server 2003 Enterprise Edition

Microsoft Exchange Server 2003 Standard Edition

Understanding of Flexible Single Master Operations (FSMO) Role / Server or Simply Operations Master for Windows 2003 and 2008 servers


What is FSMO Roles?

Microsoft designed Active Directory in such a fashion that you can perform most configuration activities from any domain controller. However, certain functions within the directory are restricted to specific domain controllers, which are known as Flexible Single Master Operations (FSMO) Role / Server or Simply Operations Master.

There are five roles in FSMO out which two roles are forest based and rest three are domain based roles.

Forest Based Roles

•Schema master

•Domain naming master

Domain Based Roles

•PDC emulator

•Infrastructure master

•RID master

In details below:-

Schema master—holds the only writable copy of the Active Directory Schema. This is a configuration database that describes all available object and function types in the Active Directory forest. Only one domain controller in the forest holds this role.

Domain naming master—ensures that any newly created domains are uniquely identified by names that adhere to the proper naming conventions for new trees or child domains in existing trees. Only one domain controller in the forest holds this role.

PDC emulator—Serves as a primary domain controller (PDC) for Windows NT 4.0 client computers authenticating to the domain and processes any changes to user properties on these clients, such as password changes. This server also acts as a time synchronization master to synchronize the time on the remaining domain controllers in the domain. One domain controller in each domain holds this role.

Infrastructure master—Updates references in its domain from objects such as domain group memberships to objects in other domains. This server processes any changes in objects in the forest received from global catalog servers and replicates these changes to other domain controllers in its domain. One domain controller in each domain holds this role.

RID master—Assigns security identifiers (SIDs) to objects created in its domain. A SID consists of a domain identifier common to all objects in its domain and a relative identifier (RID) that is unique to each object. This server ensures that no two objects have the same RID and hands out pools of RIDs to every domain controller in its domain. One domain controller in each domain holds this role.

Thursday, August 18, 2011

Exchange Server 2007 Interview Question And Answer


What is Exchange Server 2007?
Microsoft Exchange Server 2007 is the next version of Microsoft Exchange. Microsoft Exchange is the industry’s leading e-mail, calendaring, and unified messaging server. The release of Exchange Server 2007 is closely aligned with the 2007 Microsoft Office release. Together, these products deliver a best-in-class enterprise messaging and collaboration solution.

What is new in Exchange Server 2007?
Exchange 2007 provides built-in protection to keep the e-mail system up and running and protected from outside threats and lets employees work more productively from wherever they are by using a variety of clients. These clients include Microsoft Office Outlook 2007, Microsoft Office Outlook Web Access, and mobile devices. Exchange Server 2007 makes it easier for IT departments to deliver these new capabilities to their organizations by making the messaging environment easier to manage and more cost-efficient. For more information about Exchange Server 2007
How does Exchange Server 2007 integrate with Microsoft Office Outlook 2007?
Outlook 2007 provides the most complete e-mail, calendaring, contacts, and tasks functionality available in an e-mail client that is compatible with Exchange. When Outlook 2007 is used with Exchange Server 2007, users benefit from the new Scheduling Assistant that automates time-consuming meeting and resource scheduling, the ability to plan and customize out-of-office communications, and managed e-mail folders that facilitate compliance with internal and regulatory policies. Outlook 2007 and Exchange Server 2007 also combine to enhance security by offering features that are easy to use and let users confidently send and receive sensitive business communications through e-mail. By enabling the Autodiscover service, you can reduce the complexity of client configuration and reduce administrative costs that are associated with troubleshooting connectivity issues for users.
What are the different editions of Exchange Server 2007?
Exchange Server 2007 is offered in two server editions: Standard Edition and Enterprise Edition. Exchange Server 2007 Standard Edition is designed to meet the messaging and collaboration needs of small and medium organizations. It may also be appropriate for specific server roles or branch offices. Exchange Server 2007 Enterprise Edition, designed for large enterprise organizations, enables the creation of multiple storage groups and databases. For more information about Exchange Server 2007 editions and Client Access Licenses

How can I upgrade my current Exchange 2000 Server or Exchange Server 2003 environment?
When you upgrade to Exchange Server 2007, you cannot perform an in-place server upgrade on an existing Exchange server. Instead, you must install a new Exchange 2007 server into the existing organization, and then move the required data to the new Exchange server. Exchange Server 2007 supports mixed environments that include Exchange 2000 Server, Exchange Server 2003, or both. This allows for an easier and more gradual transition. For more information about how to plan and deploy Exchange Server 2007
Should I map my current routing groups to my current Active Directory sites?
Exchange 2007 is based on Active Directory sites. If your current Microsoft Exchange environment maps as closely as possible to Active Directory sites, your interoperability and migration story will be easier. Additionally, the recommended upgrade path is to upgrade all the Exchange 2000 Server or Exchange Server 2003 servers in a single routing group before you upgrade the next routing group. This lets you fully decommission a routing group as you upgrade and reduces the complexity of your current routing topology. Mapping the Exchange 2000 Server or Exchange Server 2003 routing groups to the Exchange 2007 physical topology also makes it easier to plan for an upgrade to Exchange 2007 because the two environments are similarly organized and generally correlate to Active Directory sites.