Tuesday, February 19, 2013

Common interview questions and answers.


To help you to prepare for any interview, we have listed down the most common interview questions. If you go through these interview questions and answers thoroughly, it ensures that you are well prepared in advance and face the interview confidently. All the best!
1. Tell me about yourself
This is the most commonly asked question in any interview. And also, usually, this is the first question to be asked. As your answer to this question will be the basis for subsequent questions, you need to prepare a short statement about yourself and rehearse it thoroughly. However, ensure that it does not sound as rehearsed. Limit your answer to work-related items unless instructed otherwise. Talk about your work experience, the projects you took part or managed, your educational qualifications, and your achievements which are related to the position you are being interviewing for.


2. Why did you leave your previous job?
Mention about leaving for a positive reason such as to look for new opportunities and challenges, a chance to do something special or other forward-looking reasons. Never refer to any management problems or issues with your supervisors or collegues. If you do so, interviewers may think that you are also a part of those problems and will rate you negatively. This is not the right place for complaining about your previous job.


3. Why do you want to join this organization?
This question is asked to find out whether you are really interested to join this organisation, and your plan is not to use this organisation just as a temporary stop over until you find another job. So, you need to convince the interviewers that this is your dream job and you are going to stay with them for a long period. Mention about your long term career goals and explain how this organisation suits to your goals and aspirations.


4. Are you a team player?
Organisations are, in fact, teams working together to achieve common goals. So, the employees are expected to do their part as individual and also in a team. So, you should demostarte that you can work well with the team members and communicate with various kinds of personalities in the team without any issue. Prepare some examples of projects or activities you successfully completed being part of a team.


5. Why should we hire you?
This question is asked to find out what special qualities and strengths you have compared to other candidates. It gives you an opportunity to explain all your strengts and past achievements and how they can benefit the organisation. However, do not mention about or make a comparison with any other candidate.


6. What is your strength?
Again, this question is asked find out your bright spots. You can mention a few positive qualities about you such as your problem solving skills, ability to work under pressure, professional expertise, leadership skills and positive attitude. Your answer should be focused to the skills relevent to the job.


7. What is your weakness?
This question is asked to find out whether you have any major blind spots or negative qualities that alerts the interviewer. Be warned that a honest answer to this question may trap you! In fact, all of us have blind spots. So, do not reveal any personal issues. You can tell that you are not aware of any negative qualities.


8. Do you have any questions for me?
Prepare some questions in advance. Asking questions will reinforce the point that you are really interested in the organisation. You can ask questions about the type of projects, work location, etc.


Hi If you found this post useful then kindly share your view and feed back through comments.

Thnaks
R.karthikeyan



What is XAMPP?


Acronym       Definition
XAMPP      X (any of four different operating systems), Apache, MySQL, PHP and Perl


I am sure a lot of my friends who know XAMPP very well must be thinking he is stupid who is writing about XAMPP but I think it is a good idea to write about XAMPP for a lot of young web software (webware) developers out there who don’t know what is XAMPP and how it can benefit their software development.
So let’s start with the basics, XAMPP is Free and Open Source Cross-Platform Web Server SOlution Stack. It comes with Apache Web Server, MySQL Database, PHP adn Perl Programming Languages. Together with these there is an SMTP and FTP server included as well.
So what’s special?
The best feature of XAMPP is ease of installation. With XAMPP you don’t need to install each of the individual components of a web server individually and hence the installation is easier and quicker. No need to worry about the PHP configuration or MySQL setup etc.
Also, it is portable and if you don’t want to run XAMPP automatically every time your computer starts; you don’t need to install the services.
Can you run your web server on XAMPP?
My view is why not, you just need to open the ports on your computer’s firewall and you are ready to serve dynamic website and web applications.
So how to install it?
Just download the package from apache friends’ website unzip in a folder on your hard disk. I prefer to put it in the root of the drive e.g. D:\ on my Windows 7 laptop. Now go to the folder and run xampp-control.exe; this will open up a control panel. Click start button in front of each of the components to run them. Once you click start for Apache you can type localhost in your web browser of choice and you will get XAMPP home page. You can now put your web applications in htdocs folder inside xampp folder and they will be served in your web browser.

Thanks
R.karthikeyan

How to Use XAMPP and IIS together

I installed IIS in my windows, it worked…. OMG i just remembered i had installed XAMPP (the windows flavor of Apache, MySQL, Perl and PHP) as well and when i started running it the Apache Server couldn’t get started. When i looked for the issue i could see that IIS uses port 80 for its functioning so Apache of XAMPP couldn’t get started. I guess most of the Web Developers who needs to install both services might be facing this problem, As i did. Today i got a solution for that.
Snap Shots: This is a snapshot when i try to run apache, the service of Apache couldn’t get started. [IIS has already been installed and it doesn't allow to use port 80]

xaamp
There are two ways to solve this:
  • Either change IIS (the harder way)
  • Change the Apache config (the easier way)
from both way you’ll achieve the same thing. Personally I went the Apache route and here’s how I did it (using XAMPP ).

Only one way Change the  Default Port

By default IIS uses ports 80 and 443 for HTTP and HTTPS access respectively. By default, Apache also assumes these same settings. By altering two config files in Apache you can easily over-ride this:
Steps to go:
Firstly find xampp\apache\conf\httpd.conf
  • Find Listen :80 …. Change to 81 [this tells Apache to listen to all IP addresses on port 81]
  • Again find ServerName localhost:80 change it to 81
Secondly find xampp\apache\conf\extra\httpd-ssl.conf
  • Find Listen 443…. Change to 442 [This changes the SSL (HTTPS) port to 442 (or again, your port of choice).]
Snap Shot : I edit the two files as mentioned above.
edit
Finally You are done….Enjoy Both Servers at the same time
apapa











The Service had been Started after editing 2 files.
iis xaa
NOTE: When You start the XAMPP in browser type : localhost:81



Thanks
R.karthikeyan

Monday, February 18, 2013

What's the difference between a hub, a switch, and a router?




Hubs, switches, and routers are all devices that let you connect one or more computers to other computers, networked devices, or even other networks. Each has two or more connectors called ports into which you plug in the cables to make the connection. Varying degrees of magic happen inside the device and therein lies the difference. I often see the terms misused, so let's clarify what each one really means.

Hubs

A hub is typically the least expensive, least intelligent, and least complicated of the three. Its job is very simple - anything that comes in one port is sent out to the others.
That's it.
If a message comes in for computer "A", that message is sent out all the other ports, regardless of which one computer "A" is on:
Message coming into a hub
And when computer "A" responds, its response also goes out to every other port on the hub:
Response being sent through a hub
Every computer connected to the hub "sees" everything that every other computer on the hub sees. The computers themselves decide if they are the targeted recipient of the message and when a message should be paid attention to or not.
The hub itself is blissfully ignorant of the data being transmitted. For years, simple hubs have been quick and easy ways to connect computers in small networks.

Switches

A switch does essentially what a hub does, but more efficiently. By paying attention to the traffic that comes across it, it can "learn" where particular addresses are.
Initially, a switch knows nothing and simply sends on incoming messages to all ports:
The initial contact through a switch
Even accepting that first message, however, the switch has learned something - it knows on which connection the sender of the message is located. Thus, when machine "A" responds to the message, the switches only need to send that message out to the one connection:
Response being processed through a switch
In addition to sending the response through to the originator, the switch has now learned something else - it now knows on which connection machine "A" is located.
That means that subsequent messages destined for machine "A" need only be sent to that one port:
Switch sending an incoming message to the machine who's location it is aware of.
Switches learn the location of the devices that they are connected to almost instantaneously. The net result is that most network traffic only goes where it needs to rather than to every port. On busy networks, this can make the network significantly faster.

Routers

A router is the smartest and most complicated of the bunch. Routers come in all shapes and sizes - from the small, four-port broadband routers that are very popular right now to the large industrial strength devices that drive the internet itself.
A simple way to think of a router is as a computer that can be programmed to understand, possibly manipulate, and route the data that it's being asked to handle. Many routers today are, in fact, little computers dedicated to the task of routing network traffic.
As far as simple traffic routing is concerned, a router operates exactly as a switch, learning the location of the computers on its connections and routing traffic only to those computers.
Consumer grade routers perform at minimum two additional and important tasks: DHCP and NAT.

DHCP - Dynamic Host Configuration Protocol - is the way dynamic IP addresses are assigned. A device asks for an IP address to be assigned to it from "upstream" and a DHCP server responds with an IP address assignment. A router connected to your ISP-provided internet connection will typically ask your ISP's server for an IP address; this will be your IP address on the internet. Your local computers, on the other hand, will ask the router for an IP address and these addresses are local to your network.
Router reciving an IP address from ISP, and itself handing out IP addresses to local computers
NAT - Network Address Translation - is the way that the router translates the IP addresses of packets that cross the internet/local network boundary. When computer "A" sends a packet out, the IP address that it's "from" is that of computer "A" - 192.168.1.2 in the example above. When the router passes that on to the internet, it replaces the local IP address with the internet IP address assigned by the ISP. It also keeps track, so that if a response comes back from somewhere on the internet, the router knows to do the translation in reverse - replace the internet IP address with the local IP address for machine "A" and then send that response packet on to machine "A".
A side effect of NAT is that machines on the internet cannot initiate communications to local machines - they can only respond to communications initiated by those local machines.
The net effect is that the router then also acts as a firewall:
Router acting as a firewall
What that means is that malware that might spread by trying to independently connect to your computer over the network cannot.
All routers include some kind of user interface for configuring how the router will treat traffic. The really large routers include the equivalent of a full-blown programming language to describe how they should operate as well as the ability to communicate with other routers to describe or determine the best way to get network traffic from point A to point B.

A note about speed

A quick note on one other thing that you'll often see mentioned with these devices and that's network speed. Most devices now are capable of both 10mpps (10 mega-bits, or million bits, per second) as well as 100mbps and will automatically detect the speed.
More and more devices are now capable of handling 1000mbps or a billion bits per second (1gpbs).
Similarly, many devices are now also wireless transmitters that simply act like additional ports on the device.


Thanks
R.karthikeyan

Saturday, February 16, 2013

useful commands-Fortinet Firewall

Monitoring commands:
show
  • Show global or vdom config
sh system interface
  • Equivalent to show run interface
diagnose hardware deviceinfo nic
  • Equivalent to show interface
get system status
  • show version information
sh firewall policy 6
  • show firewall rule numer 6
sh router policy
  • Show Policy Routing rules
diagnose system session list
  • Show the excisting translations
diagnose system session clear
  • Clears all xlate/translations
diagnose ip arp list
  • Shows the arp table of connected hosts
get router info routing-table all
  • Equivalent to ‘show ip route’
diagnose system top
  • Show System Processes running with PIDs
diagnose system kill 9 <id>
  • Kill the specific PID
diag test auth ldap <server_name> <username> <password>
  • Ldap test query from the Forti to the AD



Useful Commands
1. IP addresses

#diag ip address list

Displays all IP addresses assigned to interfaces including VIPs and IP pools.

2. ARP table

#diag ip arp list
Display the FortiGate unit ARP cache.

3. Routing table

#diag ip route list
Display the current routing table in the kernel. All routing decisions depend on this
table. The kernel routing table is updated dynamically as the routing configuration or
dynamic routing changes.

4. Resources usage

#diag sys top 1 100
 From left to right, the columns are:
process name
process id
CPU usage
memory usage

#diag sys kill signal_number process_id

As signal_number you can use for example:
9 as SIGKILL
15 as SIGTERM

5. PPPoE interface

#diag debug en
#diag debug app ppp 3
This debug is useful for the F60DSL models

6. Interface status

#diag hard dev nic portName


 Thanks
R.karthikeyan

Monday, February 11, 2013

How to backup & restore IIS7 configuration

Backup/Restore via the command line

Backing up IIS7 configuration is as simple as copying the \windows\system32\inetsrv\config directory (and subdirectories) into a backup directory, so you don't need anything special to do it.  Just include this directory in whatever your OS/content back-up plan is, or write a custom script to do it.

To help make managing backups easy, we've added a simple cmd-line option to AppCmd.exe that makes management of backup/restore sets easy.  For example, to backup configuration, run the follow command:

%windir%\system32\inetsrv\appcmd.exe add backup "My Backup Name"

To restore that backup, run this command:

%windir%\system32\inetsrv\appcmd.exe restore backup "My Backup Name"

To delete a backup, run this command:
%windir%\system32\inetsrv\appcmd.exe delete backup "My Backup Name"

Pretty easy, eh?  Except for the dirty little secret everyone knows...remembering to do a backup!  Thankfully, IIS7 comes to the rescue here.  Thanks to a feature called IIS7 configuration history, IIS will automatically make history snapshots of ApplicationHost.config each time a change is detected, enabling you to easily restore to a prior version.  By default, IIS checks for a new version every 2 mins, and will keep 10 prior versions of the file.  IIS7 stores these snapshots in the %systemdrive%\inetpub\history folder by default.  You can change any of these settings by editing the <system.applicationHost/configHistory> section in ApplicationHost.config.  This article explains the feature in great detail.

IMPORTANT NOTE:  This feature only appears in Windows Server 2008 and Vista SP1.  It is not in original release version of Vista , as it was not yet finished when Vista first shipped.  This is one of the thousands of changes that was made to IIS7 after Vista RTM, and is one of many reasons you should install SP1 as soon as possible

How do you restore a prior snapshot?  Well, you could just go to the \inetpub\history\cfgHistory_NNNNNNNNNN directory and copy the applicationHost.config file into it's proper place: \windows\sytem32\inetsrv\config.  Or you can use the same command as above for restoring a backup to restore a configuration history file. 

To enumerate a list of backups and configuration history files, use the following command:

%windir%\system32\inetsrv\appcmd.exe list backup


Thanks
R.karthikeyan

Sunday, February 10, 2013

Install a New Windows Server 2012 Active Directory Forest


This topic explains the new Windows Server 2012 Active Directory Domain Services domain controller promotion feature at an introductory level. In Windows Server 2012, AD DS replaces the Dcpromo tool with a Server Manager and Windows PowerShell-based deployment system.
  • Active Directory Domain Services Simplified Administration
  • Technical Overview
  • Deploying a Forest with Server Manager
  • Deploying a Forest with Windows PowerShell


Active Directory Domain Services Simplified Administration

Windows Server 2012 introduces the next generation of Active Directory Domain Services Simplified Administration, and is the most radical domain re-envisioning since Windows 2000 Server. AD DS Simplified Administration takes lessons learned from twelve years of Active Directory and makes a more supportable, more flexible, more intuitive administrative experience for architects and administrators. This meant creating new versions of existing technologies as well as extending the capabilities of components released in Windows Server 2008 R2.
What Is AD DS Simplified Administration?

AD DS Simplified Administration is a reimagining of domain deployment. Some of those features include:
  • AD DS role deployment is now part of the new Server Manager architecture and allows remote installation.
  • The AD DS deployment and configuration engine is now Windows PowerShell, even when using a graphical setup.
  • Promotion now includes prerequisite checking that validates forest and domain readiness for the new domain controller, lowering the chance of failed promotions.
  • The Windows Server 2012 forest functional level does not implement new features and domain functional level is required only for a subset of new Kerberos features, relieving administrators of the frequent need for a homogenous domain controller environment.
Purpose and Benefits

These changes may appear more complex, not simpler. In redesigning the AD DS deployment process though, there was opportunity to coalesce many steps and best practices into fewer, easier actions. This means, for example, that the graphical configuration of a new replica domain controller is now eight dialogs rather than the previous twelve. Creating a new Active Directory forest requires a single Windows PowerShell command with only one argument: the name of the domain.
Why is there such an emphasis on Windows PowerShell in Windows Server 2012? As distributed computing evolves, Windows PowerShell allows a single engine for configuration and maintenance from both graphical and command-line interfaces. It permits fully featured scripting of any component with the same first class citizenship for an IT Professional that an API grants to developers. As cloud-based computing becomes ubiquitous, Windows PowerShell also finally brings the ability to remotely administer a server, where a computer with no graphical interface has the same management capabilities as one with a monitor and mouse.
A veteran AD DS administrator should find their previous knowledge highly relevant. A beginning administrator will find a far shallower learning curve.

Technical Overview
 What You Should Know Before You Begin

This topic assumes familiarity with previous releases of Active Directory Domain Services, and does not provide foundational detail around their purpose and functionality. For more information about AD DS, see the TechNet Portal pages linked below:
Functional Descriptions
AD DS Role Installation

Select server roles pageActive Directory Domain Services installation uses Server Manager and Windows PowerShell, like all other server roles and features in Windows Server 2012. The Dcpromo.exe program no longer provides GUI configuration options.
You use a graphical wizard in Server Manager or the ServerManager module for Windows PowerShell in both local and remote installations. By running multiple instances of those wizards or cmdlets and targeting different servers, you can deploy AD DS to multiple domain controllers simultaneously, all from one single console. Although these new features are not backwards compatible with Windows Server 2008 R2 or earlier operating systems, you can also still use the Dism.exe application introduced in Windows Server 2008 R2 for local role installation from the classic command-line.

Add Windows Feature
AD DS Role Configuration

Deployment Configuration
Active Directory Domain Services configuration – previously known as DCPROMO – is a now a discrete operation from role installation. After installing the AD DS role, an administrator configures the server as a domain controller using a separate wizard within Server Manager or using the ADDSDeployment Windows PowerShell module.
AD DS role configuration builds on twelve years of field experience and now configures domain controllers based on the most recent Microsoft best practices. For example, Domain Name System and Global Catalogs install by default on every domain controller.
The Server Manager AD DS configuration wizard merges many individual dialogs into fewer prompts and no longer hides settings in an “advanced” mode. The entire promotion process is in one expanding dialog box during installation. The wizard and the ADDSDeployment Windows PowerShell module show you notable changes and security concerns, with links to further information.
The Dcpromo.exe remains in Windows Server 2012 for command-line unattended installations only, and no longer runs the graphical installation wizard. It is highly recommended that you discontinue use of Dcpromo.exe for unattended installs and replace it with the ADDSDeployment module, as the now-deprecated executable will not be included in the next version of Windows.
These new features are not backwards compatible to Windows Server 2008 R2 or older operating systems.
Install AD DS Forest
ImportantImportant
Dcpromo.exe no longer contains a graphical wizard and no longer installs role or feature binaries. Attempting to run Dcpromo.exe from the Explorer shell returns: “The Active Directory Domain Services Installation Wizard is relocated in Server Manager. For more information, see http://go.microsoft.com/fwlink/?LinkId=220921.” Attempting to run Dcpromo.exe /unattend still installs the binaries, as in previous operating systems, but warns: “The dcpromo unattended operation is replaced by the ADDSDeployment module for Windows PowerShell. For more information, see http://go.microsoft.com/fwlink/?LinkId=220924.” Windows Server 2012 deprecates dcpromo.exe and it will not be included with future versions of Windows, nor will it receive further enhancements in this operating system. Administrators should discontinue its use and switch to the supported Windows PowerShell modules if they wish to create domain controllers from the command-line.
Prerequisite Checking

Domain controller configuration also implements a prerequisite checking phase that evaluates the forest and domain prior to continuing with domain controller promotion. This includes FSMO role availability, user privileges, extended schema compatibility and other requirements. This new design alleviates issues where domain controller promotion starts and then halts midway with a fatal configuration error. This lessens the chance of orphaned domain controller metadata in the forest or a server that incorrectly believes it is a domain controller.

Deploying a Forest with Server Manager

This section explains how to install the first domain controller in a forest root domain using Server Manager on a graphical Windows Server 2012 computer.
Server Manager AD DS Role Installation Process

The diagram below illustrates the Active Directory Domain Services role installation process, beginning with you running ServerManager.exe and ending right before the promotion of the domain controller.

AD DS Server Manager Deployment
Server Pool and Add Roles

Any Windows Server 2012 computers accessible from the computer running Server Manager are eligible for pooling. Once pooled, you select those servers for remote installation of AD DS or any other configuration options possible within Server Manager.
To add servers, choose one of the following:
  • Click Add Other Servers to Manage on the dashboard welcome tile
  • Click the Manage menu and select Add Servers
  • Right-click All Servers and choose Add Servers
This brings up the Add Servers dialog:

Add Servers
This gives you three ways to add servers to the pool for use or grouping:
  • Active Directory search (uses LDAP, requires that the computers belong to a domain, allows operating system filtering and supports wildcards)
  • DNS search (uses DNS alias or IP address via ARP or NetBIOS broadcast or WINS lookup, does not allow operating system filtering or support wildcards)
  • Import (uses a text file list of servers separated by CR/LF)
Click Find Now to return a list of servers from that same Active Directory domain that the computer is joined to, Click one or more server names from the list of servers. Click the right arrow to add the servers to the Selected list. Use the Add Servers dialog to add selected servers to dashboard role groups. Or Click Manage, and then click Create Server Group, or click Create Server Group on the dashboard Welcome to Server Manager tile to create custom server groups.
noteNote
The Add Servers procedure does not validate that a server is online or accessible. However, any unreachable servers flag in the Manageability view in Server Manager at the next refresh
You can install roles remotely on any Windows Server 2012 computers added the pool, as shown:

Add Roles Features
You cannot fully manage servers running operating systems older than Windows Server 2012. The Add Roles and Features selection is running ServerManager Windows PowerShell Module Install-WindowsFeature.

ADDS_SMI_TR_AddADDSToAnotherServerYou can also use the Server Manager Dashboard on an existing domain controller to select remote server AD DS installation with the role already preselected by right clicking the AD DS dashboard tile and selecting Add AD DS to Another Server. This is invoking Install-WindowsFeature AD-Domain-Services.

The computer you are running Server Manager on pools itself automatically. To install the AD DS role here, simply click the Manage menu and click Add Roles and Features.

Add Roles
Installation Type

Select Installation Type
The Installation Type dialog provides an option that does not support Active Directory Domain Services: the Remote Desktop Services scenario based-installation. That option only allows Remote Desktop Service in a multi-server distributed workload. If you select it, AD DS cannot install.
Always leave the default selection in place when installing AD DS: Role-based or Feature-based Installation.
Server Selection

Select Destination Server
The Server Selection dialog enables you to choose from one of the servers previously added to the pool, as long as it is accessible. The local server running Server Manager is automatically available.
In addition, you can select offline Hyper-V VHD files with the Windows Server 2012 operating system and Server Manager adds the role to them directly through component servicing. This allows you to provision virtual servers with the necessary components before further configuring them.
Server Roles and Features

Select Server Roles
Select the Active Directory Domain Services role if you intend to promote a domain controller. All Active Directory administration features and required services install automatically, even if they are ostensibly part of another role or do not appear selected in the Server Manager interface.
Server Manager also presents an informational dialog that shows which management features this role implicitly installs; this is equivalent to the -IncludeManagementTools argument.
Select FeaturesAdditional Features can be added here as desired.
Active Directory Domain Services

Introduction
The Active Directory Domain Services dialog provides limited information on requirements and best practices. It mainly acts as a confirmation that you chose the AD DS role – if this screen does not appear, you did not select AD DS.
Confirmation

Confirmation
The Confirmation dialog is the final checkpoint before role installation starts. It offers an option to restart the computer as needed after role installation, but AD DS installation does not require a reboot.
By clicking Install, you confirm you are ready to begin role installation. You cannot cancel a role installation once it begins.
Results

Results
The Results dialog shows the current installation progress and current installation status. Role installation continues regardless of whether Server Manager is closed.
Verifying the installation results is still a best practice. If you close the Results dialog before installation completes, you can check the results using the Server Manager notification flag. Server Manager also shows a warning message for any servers that have installed the AD DS role but not been further configured as domain controllers.

Task Notifications

Task Notifications
AD DS Details

Details
Task Details

Task Details
Promote to Domain Controller

Promote
At the end of the AD DS role installation, you can continue with configuration by using the Promote this server to a domain controller link. This is required to make the server a domain controller, but is not necessary to run the configuration wizard immediately. For example, you may only want to provision servers with the AD DS binaries before sending them to another branch office for later configuration. By adding the AD DS role before shipping, you save time when it reaches its destination. You also follow the best practice of not keeping a domain controller offline for days or weeks. Finally, this enables you to update components before domain controller promotion, saving you at least one subsequent reboot.
Selecting this link later invokes the ADDSDeployment cmdlets: install-addsforest, install-addsdomain, or install-addsdomaincontroller.
Uninstalling/Disabling

You remove the AD DS role like any other role, regardless of whether you promoted the server to a domain controller. However, removing the AD DS role requires a restart on completion.
Active Directory Domain Services role removal is different from installation, in that it requires domain controller demotion before it can complete. This is necessary to prevent a domain controller from having its role binaries uninstalled without proper metadata cleanup in the forest. For more information, see Demoting Domain Controllers and Domains (Level 200).
WarningWarning
Removing the AD DS roles with Dism.exe or the Windows PowerShell DISM module after promotion to a Domain Controller is not supported and will prevent the server from booting normally. Unlike Server Manager or the AD DS Deployment module for Windows PowerShell, DISM is a native servicing system that has no inherent knowledge of AD DS or its configuration. Do not use Dism.exe or the Windows PowerShell DISM module to uninstall the AD DS role unless the server is no longer a domain controller.
Create an AD DS Forest Root Domain with Server Manager

The following diagram illustrates the Active Directory Domain Services configuration process, in the case where you have previously installed the AD DS role and started the Active Directory Domain Services Configuration Wizard using Server Manager.

Process flowchart for deploying a forest
Deployment Configuration

Add New Forest
Server Manager begins every domain controller promotion with the Deployment Configuration page. The remaining options and required fields change on this page and subsequent pages, depending on which deployment operation you select.
To create a new Active Directory forest, click Add a new forest. You must provide a valid root domain name; the name cannot be single-labeled (for example, the name must be contoso.com or similar and not just contoso) and must use allowed DNS domain naming requirements.
For more information on valid domain names, see KB article Naming conventions in Active Directory for computers, domains, sites, and OUs.
WarningWarning
Do not create new Active Directory forests with the same name as an external DNS name. For example, if your Internet DNS URL is http://contoso.com, you must choose a different name for your internal forest to avoid future compatibility issues. That name should be unique and unlikely for web traffic. For example: corp.contoso.com.
A new forest does not need new credentials for the domain's Administrator account. The domain controller promotion process uses the credentials of the built-in Administrator account from the first domain controller used to create the forest root. There is no way (by default) to disable or lock out the built-in Administrator account and it may be the only entry point into a forest if the other administrative domain accounts are unusable. It is critical to know the password before deploying a new forest.
DomainName requires a valid fully qualified domain DNS name and is required.
Domain Controller Options

AD DS DC Options page
The Domain Controller Options enables you to configure the forest functional level and domain functional level for the new forest root domain. By default, these settings are Windows Server 2012 in a new forest root domain. The Windows Server 2012 forest functional level does not provide any new functionality over the Windows Server 2008 R2 forest functional level. The Windows Server 2012 domain functional level is required only in order to implement the new Kerberos settings "always provide claims" and "Fail unarmored authentication requests." A primary use for functional levels in Windows Server 2012 is to restrict participation in the domain to domain controllers that meet minimum-allowed operating system requirements. In other words, you can specify Windows Server 2012 domain functional level only domain controllers that run Windows Server 2012 can host the domain. Windows Server 2012 implements a new domain controller flag called DS_WIN8_REQUIRED in the DSGetDcName function of NetLogon that exclusively locates Windows Server 2012 domain controllers. This allows you the flexibility of a more homogeneous or heterogeneous forest in terms of which operating systems are permitted to be run on domain controllers.
For more information about domain controller Location, review Directory Service Functions.
The only configurable domain controller capability is the DNS server option. Microsoft recommends that all domain controllers provide DNS services for high availability in distributed environments, which is why this option is selected by default when installing a domain controller in any mode or domain. The Global Catalog and read only domain controller options are unavailable when creating a new forest root domain; the first domain controller must be a GC, and cannot be a read only domain controller (RODC).
The specified Directory Services Restore Mode Password must adhere to the password policy applied to the server, which by default does not require a strong password; only a non-blank one. Always choose a strong, complex password or preferably, a passphrase.
DNS Options and DNS Delegation Credentials

DNS Options
The DNS Options page enables you to configure DNS delegation and provide alternate DNS administrative credentials.
You cannot configure DNS options or delegation in the Active Directory Domain Services Configuration Wizard when installing a new Active Directory Forest Root Domain where you selected the DNS server on the Domain Controller Options page. The Create DNS delegation option is available when creating a new forest root DNS zone in an existing DNS server infrastructure. This option enables you to provide alternate DNS administrative credentials that have the rights to update DNS zone.
For more information about whether you need to create a DNS delegation, see Understanding Zone Delegation.
Additional Options

Additional Options
The Additional Options page shows the NetBIOS name of the domain and enables you to override it. By default, the NetBIOS domain name matches the left-most label of the fully qualified domain name provided on the Deployment Configuration page. For example, if you provided the fully qualified domain name of corp.contoso.com, the default NetBIOS domain name is CORP.
If the name is 15 characters or less and does not conflict with another NetBIOS name, it is unaltered. If it does conflict with another NetBIOS name, a number is appended to the name. If the name is more than 15 characters, the wizard provides a unique, truncated suggestion. In either case, the wizard first validates the name is not already in use via a WINS lookup and NetBIOS broadcast.
For more information on valid domain names, see KB article Naming conventions in Active Directory for computers, domains, sites, and OUs.
Paths

Paths
The Paths page enables you to override the default folder locations of the AD DS database, the database transaction logs, and the SYSVOL share. The default locations are always in subdirectories of %systemroot% (i.e. C:\Windows).
Review Options and View Script

Review Options
The Review Options page enables you to validate your settings and ensure they meet your requirements before you start the installation. This is not the last opportunity to stop the installation when using Server Manager. This is simply an option to confirm your settings before continuing the configuration
The Review Options page in Server Manager also offers an optional View Script button to create a Unicode text file that contains the current ADDSDeployment configuration as a single Windows PowerShell script. This enables you to use the Server Manager graphical interface as a Windows PowerShell deployment studio. Use the Active Directory Domain Services Configuration Wizard to configure options, export the configuration, and then cancel the wizard. This process creates a valid and syntactically correct sample for further modification or direct use. For example:
#
# Windows PowerShell Script for AD DS Deployment
#

Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDNSDelegation `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "Win2012" `
-DomainName "corp.contoso.com" `
-DomainNetBIOSName "CORP" `
-ForestMode "Win2012" `
-InstallDNS:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SYSVOLPath "C:\Windows\SYSVOL"
-Force:$true

noteNote
Server Manager generally fills in all arguments with values when promoting and does not rely on defaults (as they may change between future versions of Windows or service packs). The one exception to this is the -safemodeadministratorpassword argument (which is deliberately omitted from the script). To force a confirmation prompt, omit the value when running cmdlet interactively.
Prerequisites Check

Prerequisite Check
The Prerequisites Check is a new feature in AD DS domain configuration. This new phase validates that the server configuration is capable of supporting a new AD DS forest.
When installing a new forest root domain, the Server Manager Active Directory Domain Services Configuration Wizard invokes a series of modular tests. These tests alert you with suggested repair options. You can run the tests as many times as required. The domain controller process cannot continue until all prerequisite tests pass.
The Prerequisites Check also surfaces relevant information such as security changes that affect older operating systems.
For more information on the specific prerequisite checks, see Prerequisite Checking.
Installation

InstallationWhen the Installation page displays, the domain controller configuration begins and cannot be halted or canceled. Detailed operations display on this page and are written to logs:
  • %systemroot%\debug\dcpromo.log
  • %systemroot%\debug\dcpromoui.log
noteNote
You can run multiple role installation and AD DS configuration wizards from the same Server Manager console simultaneously.
Results

Sign OffThe Results page shows the success or failure of the promotion and any important administrative information. The domain controller will automatically reboot after 10 seconds.

Deploying a Forest with Windows PowerShell

This section explains how to install the first domain controller in a forest root domain using Windows PowerShell on a Core Windows Server 2012 computer.
Windows PowerShell AD DS Role Installation Process

By implementing a few straightforward ServerManager deployment cmdlets into your deployment processes, you further realize the vision of AD DS simplified administration.
The next figure illustrates the Active Directory Domain Services role installation process, beginning with you running PowerShell.exe and ending right before the promotion of the domain controller.

Server manager deployment with Windows PowerShell

 

ServerManager Cmdlet Arguments (Bold arguments are required. Italicized arguments can be specified by using Windows PowerShell or the AD DS Configuration Wizard.)
Install-WindowsFeature/Add-WindowsFeature-Name
-Restart
-IncludeAllSubFeature
-IncludeManagementTools
-Source
-ComputerName
-Credential
-LogPath
-Vhd
-ConfigurationFilePath
noteNote
While not required, the argument -IncludeManagementTools is highly recommended when installing the AD DS role binaries
The ServerManager module exposes role installation, status, and removal portions of the new DISM module for Windows PowerShell. This layering simplifies the most tasks and reduces need for direct usage of the powerful (but dangerous when misused) DISM module.
Use Get-Command to export the aliases and cmdlets in ServerManager.
Get-Command -module ServerManager

For example:
Get Command
To add the Active Directory Domain Services role, simply run the Install-WindowsFeature with the AD DS role name as an argument. Like Server Manager, all required services implicit to the AD DS role install automatically.
Install-WindowsFeature -name AD-Domain-Services
If you also want the AD DS management tools installed - and this is highly recommended - then provide the -IncludeManagementTools argument:
Install-WindowsFeature -name AD-Domain-Services -IncludeManagementTools

For example:
 Install Windows Features

To list all features and roles with their installation status, use Get-WindowsFeature without arguments. Specify -ComputerName argument for the installation status from a remote server.
Get-WindowsFeature
Because Get-WindowsFeature does not have a filtering mechanism, you must use Where-Object with a pipeline to find specific features. The pipeline is a channel used between multiple cmdlets to pass data and the Where-Object cmdlet acts as a filter. The built-in $_ variable acts as the current object passing through the pipeline with any properties it may contain.
Get-WindowsFeature | where-object <options>
For example, to find all features containing "Active Dir" in their Display Name property, use:
Get-WindowsFeature | where displayname -like "*active dir*"

Further examples illustrated below:
Get Windows Feature
For more information about more Windows PowerShell operations with pipelines and Where-Object, see Piping and the Pipeline in Windows PowerShell.
Note also that Windows PowerShell 3.0 significantly simplified the command-line arguments needed in this pipeline operation. Windows PowerShell 2.0 would have required:
Get-WindowsFeature | where {$_.displayname - like "*active dir*"}
By using the Windows PowerShell pipeline, you can create readable results. For example:
Install-WindowsFeature | Format-List
Install-WindowsFeature | select-object | Format-List

Install AD DS
Note how using the Select-Object cmdlet with the -expandproperty argument returns interesting data:

Install AD DS With Tools
noteNote
The Select-Object -expandproperty argument slows down overall installation performance slightly.
Create an AD DS Forest Root Domain with Windows PowerShell

To install a new Active Directory forest using the ADDSDeployment module, use the following cmdlet:
Install-addsforest
The Install-AddsForest cmdlet only has two phases (prerequisite checking and installation). The two figures below show the installation phase with the minimum required argument of -domainname.

 

ADDSDeployment Cmdlet Arguments (Bold arguments are required. Italicized arguments can be specified by using Windows PowerShell or the AD DS Configuration Wizard.)
Install-Addsforest-Confirm
-CreateDNSDelegation
-DatabasePath
-DomainMode
-DomainName
-DomainNetBIOSName
-DNSDelegationCredential
-ForestMode
-Force
-InstallDNS
-LogPath
-NoDnsOnNetwork
-NoRebootOnCompletion
-SafeModeAdministratorPassword
-SkipAutoConfigureDNS
-SkipPreChecks
-SYSVOLPath
-Whatif
noteNote
The -DomainNetBIOSName argument is required if you want to change the automatically generated 15-character name based on the DNS domain name prefix or if the name exceeds 15 characters.
The equivalent Server Manager Deployment Configuration ADDSDeployment cmdlet and arguments are:
Install-ADDSForest
-DomainName <string>
The equivalent Server Manager Domain Controller Options ADDSDeployment cmdlet arguments are:
-ForestMode <{Win2003 | Win2008 | Win2008R2 | Win2012 | Default}>
-DomainMode <{Win2003 | Win2008 | Win2008R2 | Win2012 | Default}>
-InstallDNS <{$false | $true}>
-SafeModeAdministratorPassword <secure string>

The Install-ADDSForest arguments follow the same defaults as Server Manager if not specified.
The SafeModeAdministratorPassword argument's operation is special:
  • If not specified as an argument, the cmdlet prompts you to enter and confirm a masked password. This is the preferred usage when running the cmdlet interactively.

    For example, to create a new forest named corp.contoso.com and be prompted to enter and confirm a masked password:

    Install-ADDSForest –DomainName corp.contoso.com
    
  • If specified with a value, the value must be a secure string. This is not the preferred usage when running the cmdlet interactively.
For example, you can manually prompt for a password by using the Read-Host cmdlet to prompt the user for a secure string:
-safemodeadministratorpassword (read-host -prompt "Password:" -assecurestring)
WarningWarning
As the previous option does not confirm the password, use extreme caution: the password is not visible.
You can also provide a secure string as a converted clear-text variable, although this is highly discouraged.
-safemodeadministratorpassword (convertto-securestring "Password1" -asplaintext -force)
Finally, you could store the obfuscated password in a file, and then reuse it later, without the clear text password ever appearing. For example:
$file = "c:\pw.txt"
$pw = read-host -prompt "Password:" -assecurestring
$pw | ConvertFrom-SecureString | Set-Content $file

-safemodeadministratorpassword (Get-Content $File | ConvertTo-SecureString)

WarningWarning
Providing or storing a clear or obfuscated text password is not recommended. Anyone running this command in a script or looking over your shoulder knows the DSRM password of that domain controller. Anyone with access to the file could reverse that obfuscated password. With that knowledge, they can logon to a DC started in DSRM and eventually impersonate the domain controller itself, elevating their privileges to the highest level in an Active Directory forest. An additional set of steps using System.Security.Cryptography to encrypt the text file data is advisable but out of scope. The best practice is to totally avoid password storage.
The ADDSDeployment cmdlet offers an additional option to skip automatic configuration of DNS client settings, forwarders, and root hints. You cannot skip this configuration option when using Server Manager. This argument matters only if you installed the DNS Server role prior to configuring the domain controller:
-SkipAutoConfigureDNS
The DomainNetBIOSName operation is also special:
  • If the DomainNetBIOSName argument is not specified with a NetBIOS domain name and the single-label prefix domain name in the DomainName argument is 15 characters or fewer, then promotion continues with an automatically generated name.
  • If the DomainNetBIOSName argument is not specified with a NetBIOS domain name and the single-label prefix domain name in the DomainName argument is 16 characters or more, then promotion fails.
  • If the DomainNetBIOSName argument is specified with a NetBIOS domain name of 15 characters or fewer, then promotion continues with that specified name.
  • If the DomainNetBIOSName argument is specified with a NetBIOS domain name of 16 characters or more, then promotion fails.
The equivalent Server Manager Additional Options ADDSDeployment cmdlet argument is:
-domainnetbiosname <string>
The equivalent Server Manager Paths ADDSDeployment cmdlet arguments are:
-databasepath <string>
-logpath <string>
-sysvolpath <string>

Use the optional Whatif argument with the Install-ADDSForest cmdlet to review configuration information. This enables you to see the explicit and implicit values of a cmdlet's arguments.

For example:
Paths
You cannot bypass the Prerequisite Check when using Server Manager, but you can skip the process when using the AD DS Deployment cmdlet using the following argument:
-skipprechecks
WarningWarning
Microsoft discourages skipping the prerequisite check as it can lead to a partial domain controller promotion or damaged AD DS forest.
Note how, just like Server Manager, Install-ADDSForest reminds you that promotion will reboot the server automatically.



Reboot
Install Progress

To accept the reboot prompt automatically, use the -force or -confirm:$false arguments with any ADDSDeployment Windows PowerShell cmdlet. To prevent the server from automatically rebooting at the end of promotion, use the -norebootoncompletion argument.

Thanks
R.karthikeyan

Share this

Labels

WINDOWS SERVER (22) Windows (20) IIS (15) Interview questions (10) TFS (9) Troubleshooting Tips (9) Fortigate Firewall (8) SQL (8) Backup (6) Team Foundation Server (6) Webserver (6) Windows Administration Task (6) Microsoft certification (5) Virtualization (5) ADDS (4) Active Directory (4) FTP (4) PHP (4) SQL 2012 (4) SQL Server (4) server (4) DBA (3) MSSQL (3) Networking (3) Offer (3) Webhosting (3) Windows 8 (3) 74-409 (2) Agile Methodology (2) Apache (2) CLI Commands (2) DNS (2) Dedicated server (2) Difference between Active and Passive Connection Mode (2) Fortinet (2) GPO (2) IIS8 (2) IPAddress (2) IPV6 (2) MVA (2) Microsoft News (2) NAT (2) Software Development (2) TFS2013 (2) Uncategorized Post (2) XAMPP (2) firewall Administration. (2) powershell (2) .htaccess (1) ALM (1) Agile vs Scrum Difference (1) Blogging TIPS (1) CPanel (1) Command for Administrator (1) DC (1) DHCP (1) Domain joining nano server (1) Exam 74-409 (1) Excel TIps (1) File server (1) Fortigate Firewall HA (1) Fortigate Firmware Upgrade (1) Free Exam 70-740 (1) Free Voucher (1) Generation2 VM (1) Group Policy (1) HP (1) HP ILO IP CHange (1) HP OA IP Change (1) HP Proliant Servers (1) HTTP to HTTPS (1) Hyper-V (1) IAS (1) IIS Server hardening (1) ILO (1) Install dll (1) MCSA 2016 (1) Microsoft Virtual Academy (1) Microsoft file sharing Port (1) Migration (1) MySQL (1) NPS (1) Nano server (1) Network Drive (1) OA (1) Plesk Panel (1) Ports (1) Ports for windows file sharing (1) RADIUS (1) RDP (1) Remote Desktop Connection (1) SCRUM (1) SQL ErrorLog (1) SQL TEMPDB (1) Second Shot (1) Server 2012 (1) Startup Parameters (1) TEMPDB Movement (1) TIPS (1) Team Foundation Server 2013 (1) Temp profile. (1) Troubleshooting DNS (1) URL Rewriting (1) VDOM (1) VPS (1) VSS (1) Virtual Labs (1) Visual Studio (1) Visual Studio 2012 (1) Visual Studio 2013 (1) Visual source safe (1) Waterfall Model vs Agile Methodology (1) Windows 2016 (1) Windows 7 (1) Windows Server 2012 (1) Windows command line (1) XP (1) certification path (1) exam (1) free online courses (1) protocols/ports for windows file sharing on a firewall (1) sql error (1) what features has been installed in your SQL Server (1) windows 2012 (1) windows Time Service (1) work item types difference (1)

E-Books

Blogger Gadgets