Wednesday, February 25, 2015

Building a Windows 2012 domain-GUI

Microsoft has made a variety of changes to Windows Server 2012. From the minute that you install your first Windows Server 2012 system, you will see these changes front and center as the new operating system and are greeted with the new management interface, which provides administrators with the ability to centrally manage all Windows Server 2012 servers. Microsoft has made great progress in their attempts to streamline the overall management paradigm for Windows Server; centralizing management enables administrators to be more efficient with their tasks.
In this article, I will provide you with the first in a series of “getting reacquainted with Windows” articles intended to bridge the gap and help identify and cover the changes that have taken place between Windows Server 2008 R2 and Windows Server 2012. This article covers the creation of a new domain controller in a brand new Windows Server 2012 domain. I’m going to start the process on the assumption that you’ve already installed Windows Server 2012 and are just getting into the initial configuration.
There are a few important items to note before you begin the process or creating a domain controller in Windows Server 2012:
  • dcpromo is gone and is no longer a supported method for creating a domain controller.
  • Make sure you’ve named your server something other than the default – if you want to – before you start the process described below.
  • It’s highly recommended that the server you intend to transform into a domain controller be assigned a static IP address.

The process – Part 1

When you first install a Windows Server 2012 system, it’s configured to start Server Manager automatically. The Server Manager dashboard is shown in Figure 1. To get started creating a new domain controller, click the Add roles and features option.
Image
Figure 1:
 The Windows Server 2012 Server Manager dashboard
The first screen of the wizard provides you with an overview of the process that is about to take place. Click the Next button to proceed.
Image
Figure 2:
 The before you begin page
Windows Server 2012 breaks role and feature installation apart from Remote Desktop Services installation. Choose the option marked Role-based or feature-based installation and then click the Next button to proceed.
Image
Figure 3:
 Choose role-based or feature-based installation
Here, we’re interested in installation Active Directory Domain Services, shown below in Figure 4. When you click in the box next to that option, the window you see in Figure 5 pops up. This pop up window describes the services that will be added to the Windows Server 2012 system.
Image
Figure 4:
 Choose Active Directory Domain Services
Image
Figure 5:
 Additional features are automatically selected for you
As roles are added, you may find it necessary to add additional features to support those roles. On the Select featurespage of the installation wizard, decide whether or not you wish to add additional features. In general, all of the features that are required to support the target role are already selected so you can just click the Next button to continue.
Image
Figure 6:
 No additional features beyond the default are required
The next screen of the wizard is for informational purposes only and provides details about the role you’re installing. Just click the Next button to continue (Figure 7).
Image
Figure 7:
 Some general notes about Active Directory Domain Services
Some roles and features require that the server be restarted to complete the installation. You can choose to let this happen automatically or do it manually. If you select the checkbox next to Restart the destination server automatically if required, the restart will happen without administrator intervention. Otherwise, you have to reboot manually. The warning message in Figure 9 will make sure you are aware that restarts will happen by themselves.
Click the Install button on the screen shown in Figure 8 to initiate the deployment of the Active Directory Domain Services role.
Image
Figure 8:
 The server needs to be restarted from time to time
Image
Figure 9:
 A warning appears regarding restarts
You’re provided with a status progress bar for the installation, as shown in Figure 10. Once the installation finishes, click the Close button.
Image
Figure 10:
 The installation is proceeding
However, you’re not done yet. While Active Directory Domain Services is installed, it’s not yet configured. Let’s get that done.

The process – Part 2

Now, it’s time to kick off the configuration. From the Server Manager dashboard, click the flag icon with the exclamation point and click the option marked Promote this server to a domain controller.
Image
Figure 11:
 Start the second part of the process
For this article, I’m creating both a new forest and a new domain. You may want to just add an additional domain controller to an existing forest. For my purposes, I chose the Add a new forest option. Click the Next button to continue.
Image
Figure 12:
 Add a whole new forest
On the next screen of the wizard, you get to choose a domain and forest functional levels and tell the wizard that you’d like to add the DNS server, which is a requirement for your Active Directory implementation. On this screen, shown below in Figure 13, you can also see that the Domain Controller Options page also asks you to provide a Directory Services Restore Mode password. Provide the requested information and click the Next button to proceed.
Image
Figure 13:
 Add appropriate domain controller options
Since this is the first forest and domain and the only existing DNS “server” is the VMware Fusion host upon which this Windows Server 2012 virtual machine is running, Windows can’t find a delegation for the DNS server. You will get some warnings to this effect. Click the OK button and then click Next to continue.
Image
Figure 14:
 Respond to DNS delegation warning
NetBIOS is still in use! Active Directory needs to make sure that the NetBIOS name you’ve selected for your domain is available on the network and is not a duplicate. If it is, you need to change the NetBIOS name on this screen (Figure 15) and then click the Next button to continue.
Image
Figure 15:
 Establish a NetBIOS domain name
Active Directory is just a grouping of a database and log files. The first two paths you see in Figure 16 are the database and log files. On this screen you also see the default for SYSVOL. You can either accept the defaults of choose a different location. Many people move database and log file folders to a non-system drive. Click the Next button to proceed.
Image
Figure 16:
 Choose paths for Active Directory database and SYSVOL
Before you commit to your selections, you have the opportunity to review your changes, as shown in Figure 17. Click the Next button to continue.
Image
Figure 17:
 Summary of selected options
You may see some warnings on the Prerequisites Check screen. These are generally expected. Run through them and make sure that there’s nothing egregious and click the Install button to continue.
Image
Figure 18:
 Check for necessary prerequisites
Again, you’re showed progress.
Image
Figure 19:
 Track your progress
And that’s the process.

AD DS Deployment Windows 2012 server(powershell version)

Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "Win2012" `
-DomainName "lowelab2.com" `
-DomainNetbiosName "LOWELAB2" `
-ForestMode "Win2012" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true

Wednesday, December 3, 2014

How to SCP(Copy) a file from one host to another in LINUX

Simple way to secure copy from one linux system to another:


root@myhost: ~# scp -P 22 <filename> root@<ip address or hostname>:<full directory path of file to copy>

Hit enter

You should get prompted for password to remote system. Enter the password and wait until the file copies over.

Done.

Tuesday, August 5, 2014

vCenter 5.1 installation issues establishing ODBC connection



Problem: After successfully configuring SQL server 2008, installing vCenter single sign-on, I could not get thru installing vCenter server. I created the ODBC connection with the tests running successfully. Still during the vCenter install, I could not connect to a supporting database.

Realization: The SQL native client needed to be installed first...then recreate a new ODBC connection to the backend SQL database before proceeding with vCenter server installation.

Before you proceed with installing vCenter Server, you need to install SQL Native Client. This is located on the SQL ISO (the one you installed SQL Server on @ SQL VM). It can be found in folder 1033_enu_lp\x64\setup\x64and is called sqlncli.msi.

The installation is just a matter of Next, Next, Next, Finish

ODBC error when upgrading or installing vCenter 4 or later

Configured DSN is pointing to an unsupported ODBC driver error while upgrading to vCenter 4.0


One of the errors my customers repeatly complain about while upgrading to vCenter Server 4 or even when trying to install it from scratch is the following error:
“The DSN is pointing to an unsupported ODBC driver. Please re-configure your DSN to use one of the supported drivers.”
If you face this problem the first thing to do is to ensure that you are running a supported Database. Hint! Hint! SQL 2000 is no longer supported. If you are running SQL 2000 then you must upgrade to SQL 2005 or SQL 2008 before upgrading to vCenter Server 4.0
If you have a supported database & still got the error then you must download & install the Microsoft SQL Server Native Client for your particular platform. You can use this link to download Microsoft SQL Server Native Client. See the Image below to see what the download link look like:
choose the odbc version suitable for you
After installing the required Microsoft SQL Server Native Client you will have to create a new ODBC connection using the just installed Microsoft SQL Server Native client as per the image below.
create new ODBC connection using the new driver
After following the above steps, you will have to restart the installation of vCenter Server 4 using the newly created ODBC connection.
The above steps should get the error out of the way & get you started. I hope this help, & please leave your feedbacks & other steps you needed to resolved the problem in the comments area.
Source: http://www.virtualizationteam.com/server-virtualization/configured-dsn-is-pointing-to-an-unsupported-odbc-driver-error-while-upgrading-to-vcenter-4-0.html

Wednesday, July 23, 2014

Unable to contact IP driver. General failure.

For some reason I cannot ping my domain controller.(It runs on Windows 2008 r2)

Pinged the server ip for the server itself , got the below error

c:\>ping xx.xx.xx.xx
Unable to contact IP driver. General failure.
 Tried to ping the loop back ip
c:\>ping 127.0.0.1
Unable to contact IP driver. General failure.

After extensive Googling, here is a solution I found:

It appears the TCP/IP stack may be corrupt.

Logged into the server via admin account , turned off the UAC then taking the following steps to reinstall and reset TCP/IP heap to its original state:

 1)Run the cmd as administrator (operation requires elevation (Run as administrator).
2)Type  netsh int ip reset in the Command Prompt shell, and then press the Enter key.
3)Restart your computer.
 Eventually pleasedownload and update the network driver to the latest version. If you server is VM, then goahead and update you VM tools.

Monday, May 12, 2014

How to change the limit imposed on remote desktop connections for Windows Server version xxxx

To configure the number of simultaneous remote connections allowed for a connection
  1. On the RD Session Host server, open Remote Desktop Session Host Configuration. To open Remote Desktop Session Host Configuration, click Start, point to Administrative Tools, point to Remote Desktop Services, and then click Remote Desktop Session Host Configuration.
  2. Under Connections, right-click the name of the connection, and then click Properties.
  3. In the Properties dialog box for the connection, on the Network Adapter tab, click Maximum connections, enter the number of simultaneous remote connections that you want to allow for the connection, and then click OK.
    If the Maximum connections option is selected and dimmed, the Limit number of connections Group Policy setting has been enabled and has been applied to the RD Session Host server.
You can also set the maximum number of simultaneous connections allowed for an RD Session Host server by applying the Limit number of connections Group Policy setting. This Group Policy setting is located in Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections and can be configured by using either the Local Group Policy Editor or the Group Policy Management Console (GPMC). Note that the Group Policy setting will take precedence over the setting configured in Remote Desktop Session Host Configuration.

Thursday, April 24, 2014

Add BGInfo to logon (Option#2)

Once you have the settings configured for your tastes, save the template by going to the File menu and clicking Save As.
SaveTemplate
The corresponding template can be saved anywhere but I just choose to store mine locally in the same location as the application.
In order to make BGInfo refresh the system information, you can create a batch file that launches on login.  To do this, open Notepad and type the following: “[Path to BGInfo App]\bginfo.exe” “[Path to template]\[TemplateName].bgi” /TIMER:0 /accepteula
The /TIMER:0 option forces the application to launch with the timer set to 0 seconds so the application GUI used earlier to configure the template never displays to the user.
The /accepteula flag prevents the user agreement splash screen from displaying during the first launch.
Save the new notepad file as a batch script.  I choose to just store this file in the same location as the application and template.



Local Computer Policy-->User Configuration-->Windows Settings-->Scripts(Logon/Logoff)-->Logon
I personally place my BGInfo directory in Windows\System32\BGInfo.

Here is what the bat file looks like:
C:\windows\system32\bginfo\bginfo.exe /ic:\windows\system32\BGInfo\logon.bgi /timer:0

Wednesday, April 23, 2014

Install NFS services for Windows 2008

Installing Server for NFS Services

 
 
ServerManagerCmd -install File-Services FS-NFS-Services
 
 
 
Simple...that's all I wanted :) 

Monday, April 21, 2014

Renaming a Windows Domain the not so hard way

Choosing a name for your domain is an important decision which will have many technical repercussions on the topology of your network infrastructure. Still, choosing a domain name is largely a business decision that is influenced greatly by the organization structure and needs.
The problem is that there is almost nothing more variable than the business environment and its needs. For example an organization restructuring may mean renaming some sub domains and/or changing their hierarchy, while a change of the company name will defiantly force a domain name change (a frightening prospect for many Windows administrators).
I was put in such a situation where a company that I am working with as an IT consultant had grown from a small design company of 20 employees with the name of Untilled Studios to became a successful group of companies employing 150+ person with the name of Think Arabia. For a while I ignored the problem but their needs have also developed and they started to need an internal SharePoint site with the name of the new organization and sub-sites for the different companies. It became obvious that a domain rename was needed.
I found that the procedure is very simple and can be easily done. Although there is nothing terrifying about it, I strongly suggest that you do as I did and try it in a test environment. I’ve installed the following virtual machines:
Two Domain controllers (DC0 and DC1): One domain controller can do, but I wanted to match the production environment as closely as I can.
1 - Production Environment
2 - Production Environment
One member server and/or one member workstation: Actually I created two of each to see the effect on member machines that were powered off during the procedure and member machines that were powered on. However, it turned out that all four machines I created acted in the same exact way regardless of whether they were on or off while I was renaming the domain :)
3 - Production Environment
4 - Production Environment
And the key to the procedure is one domain member machine that is not a domain controller to perform almost all steps from. This can be a Windows 7 machine with Remote Server Administration Tool (RSAT) installed, but I prefer to use Windows 2008 R2 server since the rendom utility gets installed automatically as part of “Active Directory Domain Services” role. But make sure not to promote the machine to a domain controller as this machine should not be a domain controller.
5 - Production Environment
Step 0: Create a new DNS zone with the new domain. As new records will start being created in that zone as soon as we perform the rename.
Step 0 Create a new DNS zone
Step 0 Create a new DNS zone 2
Step 1: From the Control Station run the rendom /list command.
An xml file will be created that lists the current domain information, namely ForestDNSZones, DomainDNSZones and NetBios name.
Step 1 Run rendom
Step 2: Edit this file to replace all mention of the old domain with the new domain name. In this case I’ve replaced all occurrences of untitled.local with thinkarabia.net and all occurrences UNTITLED with THINKARABIA.
Step 2 Edit domain
You can verify the new configuration using the rendom /showforest command:
Step 2 Edit domain 2
Step 3: Now that we feel more confident, it is time to upload the modified xml to our domain controllers using the command rendom /upload.
Step 3 Upload the modified xml
Step 4: Is to verify the radiance of the domain controllers using Run rendom /prepare.
Here is where I 1st faced an unexpected issue. In my first attempt, both of my test domain controllers were not prepared, but worked fine after turning off the Windows firewall. When I repeated the procedure, only one of the domain controllers gave an error while the other did not have any issues although the firewall was on. When I did it in production I turned the firewall off on all DC just in case, and it went fine on the first attempt.
Step 4 Verify the radiance
Step 5: The grand moment has come when you do the transfer rendom /execute.
Step 5 Transfer rendom execute
All your domain controllers will start to reboot at the same time!!!
Step 6: In order to continue you need to make your control server (the one we have been working with so far) aware of the domain name change. For that you will need to reboot it twice. Otherwise it will continue to use credentials from the old domain and will no longer be able perform changes on the new domain. By the way, all member servers and workstations will need to be rebooted twice to reflect the change, but not yet :)
Normally at first, all your machines will suggest logging in using the old domain name. No need for alarm, it is just remembering what user name you’ve used last time you have logged in. You simply need to switch user and login with the new domain name.
Step 6 Make your control server Step 6 Make your control server 2
Step 7: Reflecting the domain name change on your Group Polices.
Group polices still reference the old domain names, and hence we need to fix it.
Step 7 Group Polices
This is easily performed using the following two commands:
gpfixup /olddns: untitled.local /newdns:thinkarabia.ent
gpfixup /oldnb:UNTITLED /newnb:THINKARABIA
Step 7 Group Polices 2
Step 8: Renaming the domain controllers themselves.
Unfortunately they do not get automatically renamed by rebooting twice; you will need to do it using the following commands:
netdom computername dc0.untitled.local /add:dc0.thinkarabia.net
netdom computername dc0.untitled.local /makeprimary:dc0.thinkarabia.net
Step 8 Renaming the domain controllers
Restart the domain controller, and repeat for the other domain controller.
Step 9: There is nothing else left to do on the control server except clean up using rendom /clean
And now you have a new name for your domain controller. But you need to reboot all your member machines twice for the change to take effect on all of them. It is a good idea to schedule the reboot before performing the procedure so that it happens automatically afterwards.
Note that this same procedure can be used to change the hierarchy of your sub domain in the forest. For example the sub domain it.servies.rj.com can be renamed to it.rj.com to reflect an organization restructuring.

This info was taken directly from here

Monday, April 14, 2014

Add BGinfo in login script in case you forget your computer info (Option#1)

Prepare the Background Wallpaper to apply via BgInfo:
You need to:

Remark: It is important that the location of output bitmap for BigInfo is a folder on which the user has Read / Write access. If this is not true, the bitmap wallpaper would not be generated. To change the location of the output bitmap, click on Bitmap > Location …. By default, User’s temporary files directory option is used – You can keep it as it is if you do not want to choose another location.



2.       Prepare a Logon Script to run BgInfo:
You can use the following script to run BgInfo:
reg add HKU\.DEFAULT\Software\Sysinternals\BGInfo /v EulaAccepted /t REG_DWORD /d 1 /f
\\Server\Share\Bginfo.exe \\Server\Share\template.bgi /TIMER:00 /nolicprompt
\\Server\Share\ is a shared folder on which you have the following files:
  • Bginfo.exe
  • Template.bgi: This is the BgInfo template your saved in the previous step
These commands can be saved in a .bat file.
3.       Apply BgInfo logon script using a Group Policy:
To apply BgInfo logon script using a Group Policy, proceed like the following:
  • Create a new GPO then go to User Configuration > Policies > Windows Settings > Scripts (Logon/Logoff) and then double-click on Logon

  • Select your BgInfo logon script and then click on OK

After that, you need to link your Group Policy to the Organizational Unit containing the administrative accounts on which it will be applied.

Taken directly from: http://social.technet.microsoft.com/wiki/contents/articles/20262.apply-bginfo-using-a-group-policy-logon-script.aspx