2012年5月14日 星期一

如何將ESXi 5.0安裝到USB/SD卡

以下是VM官網原文出處:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2004784



  1. Acquire and create an installation CD/DVD by downloading ESXi 5.0 from the VMware Download Center and burn the ISO file onto CD/DVD media.
  2. Insert the ESXi 5.0 Installable CD into the CD/DVD-ROM drive.
  3. Press the key required to activate your machine's BIOS setup. This key is often a function key or the Delete key. For more information, consult your hardware vendor documentation.
  4. Ensure that you have set the BIOS to boot from a CD/DVD-ROM device. This varies based on manufacturer.
  5. Boot off the ESXi 5.0 Installation CD/DVD media.
  6. Let the Automatic boot countdown and boot as normal. The ESXi 5.0 installation process begins and you see that the kernel modules and drivers are loaded. The installation continues to load at a yellow screen.
  7. Wait for the installation to load completely.
  8. After you see the Welcome screen, press Enter to continue with the installation.
  9. Read the End-User License Agreement (EULA) and press F11 if you accept.

    The installer detects the disks available for installation. If it sees the flash drive, it is be presented as USB under type, and the model as flash reader.
  10. Select this device to install ESXi 5.x and press Enter. If the device is not listed, ensure that your machine sees the device and that the device is compatible. For more information, see the vSphere Compatibility Matrix.
  11. Select the keyboard layout. This is usually Default.
  12. Enter the root password you want. VMware recommends that you do not leave this blank.

    The installation begins and may take up to 15 minutes.
  13. When the installation completes, remove the installation CD/DVD-ROM.
  14. Press Enter to reboot the host.
  15. Set the first boot device to be the drive on which you installed ESXi on to the USB flash drive or SD flash card.

2012年5月9日 星期三

如何大量更改Home Folder路徑


公司要換主機,事前準備項目很繁瑣,例如像Home folder就要改,而且必須每個帳號都更改。如果有3500個帳號或更多,可能會改到要離職。


還好,有了這支偉大程式,讓辛苦的MIS人員,不用熬夜加班,快樂回家做家事。

程式碼改前面兩行即可,存成vbs檔在DC上執行即可。
==============================================
strNewServer = "ServerName"
strContainerDN = "OU=Users,DC=abc,DC=com"

' Bind to container.
Set objContainer = GetObject("LDAP://" & strContainerDN)
' Filter on user objects.
objContainer.Filter = Array("user")
' Enumerate users in container.
For Each objUser In objContainer
  ' Read existing homeDirectory.
  strHomeDirectory = objUser.homeDirectory
  If strHomeDirectory <> "" Then
    ' Strip off server name from UNC path.
    intIndex = InStr(3, strHomeDirectory, "\")
      If intIndex > 3 Then
      ' Home folder with server name stripped off.
      strPath = Mid(strHomeDirectory, intIndex)
      ' Construct new homeDirectory.
      strNewHome = "\\" & strNewServer & strPath
      objUser.Put "homeDirectory", strNewHome
      objUser.SetInfo
    End If
  End If
Next