Tuesday, 19 July 2016

How to Install a New Windows Server 2012 Active Directory Forest using PowerShell

There are many ways/methods are available to install the Active Directory, here I am going to explain you one of the PowerShell command line method to install Active Directory.
This step by step process explain you to install AD using PS command.
In Windows Server 2012, AD DS replaces the Dcpromo tool with a Server Manager and Windows PowerShell-based deployment system.
To install activity directory on windows Server 2012, we need to first install AD-DS Service
Install AD-DS Service using windows feature PS command as shown in below.
PS C:\> Add-WindowsFeature ad-domin-services
Once installation started you will see progress bar to give you status on it.
Once installation completed you will get successful installation exit code as shown below.
PS C:\> Add-WindowsFeature ad-domain-services

Success Restart Needed Exit Code      Feature Result                          
------- -------------- ---------      --------------                          
True    No             Success        {Active Directory Domain Services, Rem...

PS C:\> 
Now next step to start the actual installation of your Activity directory installation new DC in new Forest, go to PowerShell command control use the “Install-ADDSForest” command with -DomainName switch like showed in below.
PS C:\> Install-ADDSForest -DomainName sysadminworld.lab

Once you enter it will ask you to provide the “Safemodeadministratorpassword” you should remember this pass word since this password will useful when you restore the Active Directory please refer below snap.
PS C:\> Install-ADDSForest -DomainName sysadminworld.lab
SafeModeAdministratorPassword: ********
Confirm SafeModeAdministratorPassword: ********
Once you confirm the password it will as you reboot confirmation after successfully installation completed press Y to yes
PS C:\> Install-ADDSForest -DomainName sysadminworld.lab
SafeModeAdministratorPassword: ********
Confirm SafeModeAdministratorPassword: ********

The target server will be configured as a domain controller and restarted when this operation is
complete.
Do you want to continue with this operation?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):
Once you confirm it will start installing AD on your server, it will show each background installation task progress.
After installation is completed you will get successful status message .
PS C:\> Install-ADDSForest -DomainName sysadminworld.lab
SafeModeAdministratorPassword: ********

 Install-ADDSForest

   Validating environment and user input
      All tests completed successfully
      [oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo]
   Installing new forest
      Configuring the DNS Server service on this computer...


Congratulation you have successfully installed AD

Sunday, 26 June 2016

Capture Windows Server Reference Image using


Create and capture Windows Server reference image is important because that image serves as the foundation for the devices in your organization..

This image is the core operating system you need on your network environment. The image requires all needed software for your Windows Target Server to be installed. So before capturing Windows Server image, make sure you update Apps and Windows with latest updates.

1.    Log in to Windows Target server which you are going to capture.
2.    Explorer in path “C:\Windows\System32\Sysprep”.
3.    Press Windows+R to open run and type Sysprep and run Sysprep. On theSysprep tool select Enter System Out-of-Box Experience (OOBE) and selectGeneralize the click OK. 
4.    2. Once the Sysprep has completed, system will restart and boot it from Network. You must configure you system to boot from network. Just press F12 to go to Pexe
5.    Now select Capture Image to capture Windows server reference image or PC.
6.    On the Welcome to Windows Deployment Services Image Capture Wizard page click Next.
7.     Now select the directory where you want to capture, type image name and image description then click Next.
8.    Select Name and Location or tick the check box of Upload image to a Windows Deployment Services server. When done click Connect and type user credential. Select Image Group name also then click Next. 
9.    This will take a long time to complete the process of capturing Windows reference PC.
10. . When it has complete click Finish and restart your Windows server reference PC.Configure and select the reference PC language, time, user and password, because it has been completely out of box by executing Sysprep

11. Go to Windows Deployment server and check the result of Windows Server capturing. The Windows Server captured image should be transferred successfully to WDS server.

Deploying Windows Server Using WDS


Deploying Windows Server using Windows Deployment Services with Windows Server 2012 R2, we already added Windows server install.wim image and created a boot image also.

The WDS Server is ready to response for client requests. Make sure that the active directory and DHCP Server are running and work perfectly. It depends to your network environment; I have installed Active directory and DHCP Server in one server and WDS on the separate server which is the member of domain. You can install them on one server, both of them work the same but installing on the same server is not a good practice in real environment.

1.    Go to Target Server and boot it with network card (Pxe). In BIOS you have to set the boot option to boot from the network and just turn on the server.
2.    The system will boot from network, so ask you to press F12 for network service boot. Press F12 to boot the system with Pre-boot Execution Environment (PXE).
3.    On the Windows Setup page, select the language and keyboard then click Next. The system will ask you the credential, type user name and password and click OK.
4.    You must enter the correct user name and password, otherwise you will face credential errors and unable to continue.
5.    Now select each Windows image you want to install. Select the and click Next.

6.    Follow other process are the same as the clear installation of a windows Server operating system.

Add Image to Windows Deployment Services

Now below steps by step will show you how to add Windows Images for deploying, creating Boot Image and Capture Image for capturing the reference Server which is a custom images of a Windows operating system.

We need to add two types of images in WDS, install.wim and boot.wim. Then install.wim images are the operating system images that you deploy to the Target server. You can also use the Install.wim file from the installation media (in the \Sources folder of Windows DVD), or you can create your own custom images.

To boot you system through network card, you must add the boot.wim image of the latest Windows Operating System. The Boot.wim images are Windows PE images that you boot a client computer to perform an operating system installation. In most scenarios. Boot.wim image is also located in the Sources folder of Windows DVD.

1.    Login to WDS server as domain admin or member administrator group
2.    go to Server Manage and open Windows deployment services from Tools tab of Server Manger Dashboard.
3.    Expend the Servers then right click the Install Images  and click Add Install Image
4.    On the Add Image Wizard page type the name of a group and click Next
5.    On the Image Files page click Browse and select the install.wim image from Windows sources folder and click Open and then click Next. 
6.    On the Available Images pages select Windows edition, whatever you want and clickNext. Here we only have Windows technical preview for enterprise.
7.    It will take a few minutes to check the integrity of image’s and adding image. When the image added successfully, just click Finish and see the Clients group that has the image ready for deploying to clients machines.
8.    That is it. You can add as much as Image you want. But now try to add the Boot.wim image the same as Install image. But instead of install.wim image select boot.wim image.    

9.    Now you can deploy and install Windows server for your network clients. The next part we will install client operating system through network using WDS.

Configure Windows Deployment Services

Step By Step Configure Windows Deployment Services

1.    While you are log in as domain admin account or local administrators group members, go to Server Manager and click Tools then click Windows Deployment Services in order to open it.
2.    On the Windows Deployment Services console page expand the Servers and right click the Server then click Configure Server.
3.    On the Windows Deployment Services Configuration Wizard page, read it once and click Next.
4.    On the Install Options page select integrated with Active Directory and then click Next.
5.    On the Remote Installation Folder Location (D:\RemoteInstall), select the location where you want to keep all Windows Images and configuration files and then click Next.
6.    On the PXE Server Initial Settings page select Respond to all client computers (Know and unknown) and click Next. Remember, we are in the test area so in the real network environment select whatever you want.
7.    The sever will start and complete the configuration. On the Operation Complete page unchecked the Add image to server now and then click Finish 


The installation has completed successfully. To continue the WDS configuration, adding Windows images and creating capture image read the following articles.

Tuesday, 14 June 2016

Install and Configure WDS (Windows Deployment Services) on Windows Server 2012 R2

 Prerequisites
  • Active Directory Domain Services (AD DS) domain or a domain controller.`
  • Domain Name System (DNS) server on the network before you can run Windows Deployment Services
  • Dynamic Host Configuration Protocol (DHCP) server with an active scope on the network because Windows Deployment Services uses PXE

Steps for Installation
1.    Sign in to the server as a domain admin and open the Server Manager.
2.    On the Server Manager click Manage and then click Add roles and features. On the before you begin page click Next.
3.    On the Select installation type page, click Role-based or feature-based installation, and then click next.
4.    On the Select destination server page, select the appropriate server, and then click Next. By default the MS2.technig.local server has selected.
5.    On the Select server roles page, scroll down and then select Windows Deployment Services check box. in the Add feature that are required for Windows Deployment Services? Click Add Features and click next. This task will install the Windows Deployment Services Tools which included in Windows Remote server administration tools.
6.    On the Select features page, click next.
7.    On the WDS page once read the information and click next.
8.    On the Select role services page, select the role services to install for Windows Deployment Services. Leave these role services selected by default if you want to install both the Deployment Server and Transport Server. Click Next.
9.    Finally on the Confirm installation selections page, click Install.

10. When the installation process complete successfully, click Close and go to Server Manager Dashboard.  

Tuesday, 7 June 2016

New functions and changes Windows Deployment Services (WDS) in Windows Server 2012.

WDS is part of server role that allow you to deploy Windows OS remotely. Network-based installation and configuration on new servers/desktop no need any direct media like CD, USB drive, or DVD.
To use WDS pre-requisite are DHCP, DNS, AD-DS and Preboot eXecution Environment.

Feature
Windows Server 2012
Operating systems deployed
Windows Server 2003
Windows Server 2008
Windows Server 2008 R2
Windows Server 2012
Windows Server 2012 R2
Windows XP
Windows Vista SP1
Windows 7
Windows 8
Windows 8.1
Image types deployed
.wim and .vhd images are both supported similar to Windows Server 2008 R2.
.vhd images can now be managed via the WDS management snap-in in addition to the command-line.
In addition, .vhdx files (a new file format available in Windows Server 2012) are supported directly and over multicast.
The .vhdx format supports a sparse, dynamic representation of a disk, which produces a relatively small disk image file (compared to directly storing the full contents of the disk). The .vhdx format is supported for VDH boot scenarios in addition to direct application to system volumes (similar to .wim deployments).
Boot environment
Windows PE
Administration experience
MMC snap-in and WDSUTIL. Windows PowerShell cmdlets added in Windows Server 2012 R2.
Multicasting
Provides support for TFTP and multicasting over IPv6 and DHCPv6.
Improved multicast deployment by eliminating the need for making a local copy of the install.wim file. You can apply the install.wim file while it is being downloaded without significant impact to the application process.
Applying the install.wim file concurrently with the multicast download decreases overall deployment time, offers higher disk write throughput, and requires less space on the client system.
Reduced default block size fits within an Ethernet MTU and works on customer hardware that does not support IP fragmentation.
Driver provisioning
Extends filters for driver groups to support manufacturer Model Number and Device Groups. Driver import automatically detects and prevents duplicate driver packages from being added to the driver store.
Extensibility
Supports custom PXE providers.
Supports transmitting data and images by using multicasting on a stand-alone server (Transport Server). Includes a PXE provider to boot clients.
Supports custom multicast providers.

Extensible Firmware Interface (EFI)
Support x86 clients (32-bit processors) with Unified Extensible Firmware Interface (UEFI) to network boot and complete an end-to-end deployment by using WDS.
PowerShell cmdlet scripting
Supported on Windows Server 2012 R2 only
A WDS server running Windows Server 2012 R2 can be managed by using the Windows PowerShell cmdlets for WDS. By using Windows PowerShell cmdlets, you can add driver packages, add client images, enable and disable boot and install images, and perform many other common WDS tasks. For a full reference, see Windows Deployment Services in Windows PowerShell.