Friday, 5 August 2016

Create Datacenter and add ESXi host to VMware Vcenter 6.0 using PowerCLI

VMware vSphere PowerCLI is a command-line interface (CLI) tool for automating vSphere and vCloud management. VMware vSphere PowerCLI debuted as the VMware Infrastructure Toolkit, also called the VI Toolkit.
PowerCLI commands are executed in Windows PowerShell by using PowerShell cmdlets. PowerCLI cmdlets are available for VMware High Availability and Distributed Resource Scheduler setup, infrastructure activity reporting, VM ownership alerts and other tasks. 
PowerCLI 6.3 Release1 requires Windows  PowerShell 3.0 and a supported version of .NET Framework. This latest tool version includes the vCloud Director PowerCLI snapin. 
In this chapter we are going connect VI servers using PowerCLI and create new DataCenter in VCenter, also we how to add new host in VCenter server using PowerCLI.
Connect to VCenter Server.

To Connect VCenter server using powercli cmdlet "Connect-VIServer"

Creating a new DataCenter

To Create New DataCenter Name Called "LAB" use PowerCLI cmdlet "New-Datacenter"

Once DataCenter is crated you can cross verify using "Get-DataCenter" Command.

Add Esxi Host to Newly created DataCenter "LAB"

To add new Esxi host to newly created Datacenter use "Add-VMHost" command.

monitor the progress on screen

Once host get added successfully you can seen connection status and all other host related details like CPU, Memory usages, total CPU and Memory capacity.

To check all host in Data Center you can use "Get-VMhost", it will show list of host under VCenter DataCenter.

I will be adding more article for VMware administration with PowerCLI  

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
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: ********


   Validating environment and user input
      All tests completed successfully
   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

  • 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.