Tuesday, 30 April 2013

Some PowerShell Commands

 

Restarting Computer

Use the following command to restart the local computer

Restart-Computer

Shutdown Computer

Use the following command to restart the local computer

Stop-Computer

Renaming Computer

Use the following command to restart the local computer

Rename-Computer -NewName <name_in_string>

You need to restart the computer after renaming. If you want powershell to do it use the “-Restart” option as shown below

Rename-Computer -NewName <name_in_string> -Restart

Initial ESXi Configuration through direct console


To perform these initial configurations one has to access the ESXi server through direct console. (Unless, ofcourse DHCP is not set)


This is the ESXi console window. Press “F2” here to customize the ESXi server. On pressing “F2” a login window as shown below will appear.


The default “root” user is there. Enter the Password and press “Enter” key to login. On logging in the following window will appear, which helps you to change the desired setting for ESXi.


In the above window the first entry is for changing the “root” user password. The third one named “Configure Management Network” will help you set IP address, DNS, gateway, hostname etc for ESXi host. Use arrow key to select the entry and press “Enter” key to go into the configuration screen.


On pressing “Enter” key here you will be taken to the below screen.


This will show the network card selected for configuring Management Network. The MAC address of the card is also shown. Pressing the “Enter” key will display the screen as shown below.



If more than one network card is there, all will be displayed here. You can select the desired one from here. Pressing “Enter” key will save the changed while “Esc” will discard the changes.
Use the arrow keys on the parent window to select the “IP Configuration” entry as shown below


Now press “Enter” key to go to the configuration window as shown below


Here by default, the dynamic IP address setting is selected. Change it to static IP address to configure a static IP address. The enter the IP address , the mask and default gateway if any. Then press “Enter” key. This will take you to the parent window.
Now from the parent window select “IPV6 Configuration” and press “Enter” key. This will take you to the following window



Here by default IPV6 will be enabled. You can disable it here.
Now from the parent window select “DNS Configuration” and press “Enter” to configure the DNS and hostname entries. You will be taken to the following window


Set the DNS entries and hostname as you desire. Now press “Enter” key to save it.


After all these setting have been changed press “Esc” key from the above window to save the "Configuration. On pressing “Esc” key a dialog box as shown below will appear.


Press “Y” on this screen. If you have disabled IPv6, the host will reboot itself to save the changes.
Otherwise it will only restart the management network service. Then it will go the “System Customization” window.


If you want to ensure the network connectivity of ESXi server after these configurations, use the “Test Management Network” entry as shown in the above screen.


Here one will be address of the Gateway. The other entries by default will be DNS server address, if they are present. Else you can specify the address manually. Click “Enter” will begin the test and will show you the results.
After all the changes the console window will now look as follows.

Tuesday, 23 April 2013

ESXi5.1 in Virtualbox


First create a VM in Virtualbox with the following settings. All other setting are in the default state


Here select “Type” as Linux and “Version” as Linux 2.6.
 

Here select 2 GB memory. This is the minimum requirement for ESXi.

Here select 2 CPUs. This is the minimum requirement for ESXi.


Here I have set 8 GB for disk. It is more than enough. If you want you can set it to 2 GB.

After creating the VM now mount the ESXi iso as the CD drive for the VM in virtualbox. Now start the VM. It will boot from the CD and display the initial screen as shown below.


ESXi boot menu

On pressing enter in the above screen will take you to the next screen, which shows the loading of ESXi installer.


The loading of ESXi installer continues here


In this screen the ESXi installer is asking the users permission to continue with the installation


On pressing enter in the above screen, you will be taken to the License Agreement screen as shown below. Here you should press “F11” to accept the license agreement. Then only you would be able to continue to the next screen.


In this screen as shown below the ESXi installer is scanning for medias to find out a suitable media for installation.


After scanning for medias, the installer will list out the medias it found suitable for installing ESXi. See the below screen, where it lists the local Hard Disk.


On pressing enter it will take the user to the next screen where it will ask about the Keyboard Layout to be selected. Press enter after selecting the correct keyboard layout.


The next screen will ask for the “root” password. Enter the root password of your choice here


After successfully entering the password in both fields it will show a message stating whether it is matching or not. If OK press “Enter” key to continue.


After that the installer will spend some time to gather the additional information about the system.


Then it will display the screen stating Hardware virtualization is not enabled. This will appear only when you install the ESXi in Virtualbox. This won’t appear in case of a physical machine, if you have enabled Hardware virtualization in BIOS. Just press “Enter” to go to the next screen


Now the installation of ESXi starts.


This screen shows that the installation has been completed and you need to reboot the system. Press “Enter” to reboot the system.


After rebooting a screen as shown below will appear. Now the installation is complete.

Monday, 22 April 2013

Changing the location of “Windows Update” folder in Windows 7


Normally the Windows Update folder named “SoftwareDistribution” folder is located in %systemdrive%\Windows. All the Windows Update files downloaded by Windows is kept in this folder. This will gradually eat up a lot of space in the %systemdrive%. To change this folder to some other location do the following.
  1. Stop the Windows Update service
  2. Move the “SoftwareDistribution” folder to the desired drive. Now there will be no folder named "SoftwareDistribution" in the path "%systemdrive%\Windows".
  3. Now open the command prompt in “Administrator” mode (Type “cmd” in start menu search box and press ctrl+shift+enter)
  4. Change to “Windows” directory by issuing the command “cd %systemdrive%\Windows
  5. Now use the command "mklink" to create a junction point to the “SoftwareDistribution” folder, that you moved to a different drive. The command is “mklink /J SoftwareDistribution <path to the new location>
  6. This will save your system drive from being eaten up by Windows Update

Changing FTP access method in Windows


By default Windows uses Passive FTP access method. If you want to change this method to Active please follow the steps below
  1. Open Internet Explorer.
  2. Go to Internet Options.
  3. Go to the “Advanced” tab.
  4. Uncheck the checkbox named “Use Passive FTP (for firewall and DSL modem compatibility)”.
  5. Click “Apply” and then “OK” button.
  6. Now close IE and try to access an FTP location. It will be in “Active” mode

Windows About Dialog Box


To display the Windows about dialog box, please type the command “winver’ in Run prompt and press the enter key. You will see a dialog box similar to the one shown below. This is for Windows 7 Ultimate edition


The dialog box shows the following details
  1. Windows Version with build number and service pack if any
  2. The owner of the product
  3. Copyright notification from Microsoft