Network Administrator Knowledgebase

Jun 25 2009   7:00AM GMT

Windows Preinstallation Environment (Windows PE 3.0 - based on Windows 7)



Posted by: Michael Khanin
WinPE, winpe 3.0

Windows® Preinstallation Environment (Windows PE) is a minimal operating system designed to prepare a computer for Windows installation (and not just for Installation). Windows PE is available as a stand-alone product to customers with the proper licensing agreement. It is an integrated component of many Windows Setup and recovery technologies, including Setup for Windows® 7and Windows Deployment Services (WDS).

Windows PE 3.0 is the latest release based on the Windows 7 operating system.

I’ve changed few scripts that I’ve found on MSFN Forum and now I’d like to share a script, that will create a WinPE 3.0 ISO just by one click :)…

I called this script _WinPE-3_Builder.bat. here is a content of _WinPE-3_Builder.bat:

@Echo off
%SYSTEMDRIVE%

CD “C:\Program Files\Windows AIK\Tools\PETools”

Set Architecture=x86
Set PEDest=c:\winpe_x86
Set ISOName=winpe_x86.iso
Set removeboot=true

pushd %cd%

call copype.cmd %Architecture% %PEDest%

Dism /Mount-Wim /WimFile:%PEDest%\winpe.wim /index:1 /MountDir:%PEDest%\mount
Dism /image:%PEDest%\mount /Get-Packages

Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-hta.cab”
Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-hta_en-us.cab”

Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-legacysetup.cab”
Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-legacysetup_en-us.cab”

Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-mdac.cab”
Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-mdac_en-us.cab”

Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-pppoe.cab”
Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-PPPOE_en-us.cab”

Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-scripting.cab”
Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-scripting_en-us.cab”

REM Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-setup.cab”
REM Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-setup_en-us.cab”

REM Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-setup-client.cab”
REM Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-setup-client_en-us.cab”

REM Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-setup-server.cab”
REM Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-setup-server_en-us.cab”

Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-wmi.cab”
Dism /image:%PEDest%\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-wmi_en-us.cab”

copy “C:\Program Files\Windows AIK\Tools\%Architecture%\imagex.exe” %PEDest%\mount\Windows\System32\

Dism /Unmount-Wim /MountDir:%PEDest%\mount /Commit
Copy %PEDest%\winpe.wim %PEDest%\ISO\sources\boot.wim

IF “%removeboot%”==”true” del /q %pedest%\iso\boot\bootfix.bin

oscdimg -n -b%PEDest%\etfsboot.com %PEDest%\ISO %PEDest%\%ISOName%

popd

Jun 24 2009   7:00AM GMT

Hyper-V: Step-by-Step Guide to Using Live Migration in Windows Server 2008 R2



Posted by: Michael Khanin
Microsoft Hyper-V Server 2008 R2

Microsoft released Step-by-Step Guide to Using Live Migration in Windows Server 2008 R2


Jun 23 2009   7:00AM GMT

SSH in vSphere 4i



Posted by: Michael Khanin
SSH, vSphere 4i

To enable SSH in vSphere 4i we should do the following steps (similar as esx 3i):

1. First, press Alt + f1 then type “unsupported” and press enter.
2. At the prompt for password, provide the credentials, previously configured, and we will be able to log in to the service console.
3. Do a vi /etc/inetd.conf and look for #ssh. Remove the # and save the file after this.
4. Go to /sbin, and run this command ./services.sh restart

Now, we will have SSH enabled.


Jun 22 2009   7:00AM GMT

Install Windows updates on the command line and in scripts



Posted by: Michael Khanin
windows updates, wsus, Command line

Everybody knows that i’m a real fan of scripting :).
I was really happy to read post of Michael Pietroforte about WuInstall 1.2 Pro

Continue at http://4sysops.com


Jun 21 2009   3:50PM GMT

The Windows 7 Upgrade Advisor Beta



Posted by: Michael Khanin
Win7, Windows 7, Advisor

Want a quick way to check if your PC can run Windows 7? In general, if your PC can run Windows Vista, it can run Windows 7. But if you’re not running Windows Vista, or are just not sure if your system is ready to run Windows 7, download the Windows 7 Upgrade Advisor Beta. The Windows 7 Upgrade Advisor Beta is a pre-release version, and is available in U.S. English only.


Jun 21 2009   3:41PM GMT

How To Shrink VMware Virtual Disk Files (.vmdk) (Windows OS installed as Guest).



Posted by: Michael Khanin
vmdk, virtual disk, shrink

Recently I worked on building VM Appliance and when I was ready to convert my VM to appliance I’ve figured out that virtual disk is too big. So, I did what I usually do in this situation. And now I’d like to show how you can shrink the virtual disk files of your VMware virtual machines so that if you zip them, they will use much less space. It is then easier to upload and share them with other people.

Yes, I know, many of you now said “Misha is going to talk about Shrink”. You know what, you pretty true, but …

Everybody knows What the “shrink” does. Shrink removes an empty space from .VMDK file.

However, the problem is this: What is empty space?

When Windows deletes a file, it doesn’t actually delete the data on the disk, it just deletes the references/pointers in the file allocation table. So when “Shrink” is processing a vmdk and is looking at the raw disk, it’s seeing values that aren’t empty (non-zero), and exports them as such.

You can easily test this out. Create a new vmdk on a VM. Export the VMDK right after you’ve created it. The exported files will be very small. Now fill the vmdk up with files and export; it will be very big. Now, delete all the files in the vmdk and export; it’ll still be big! If you will try to do a “Shrink”, you will see that the vmdk file is still big.

So, before doing a Shrink, I’m always using a really cool command line tool developed by Mark Russinovich, SDelete. Simply, execute SDelete with parameter -c inside running Virtual machine, then shut down the Guest and do a Shrink.

Last note. Just in case you forget how to do a shrink ;). From command line go to C:\Programme\VMware\VMware Server\ and execute the vmware-vdiskmanager.exe as shown in following example:

“C:\Programme\VMware\VMware Server\vmware-vdiskmanager.exe” -k “ITSTUFF-SRV-1.vmdk”


	


May 23 2009   3:23PM GMT

Simplify the ImageX Result, Make it More Readable



Posted by: Michael Khanin
ImageX, wim

Simplify the ImageX’s result, make it more readable. See the result in following format:

Index Image Name
[1] Windows 7 STARTER
[2] Windows 7 HOMEBASIC
[3] Windows 7 HOMEPREMIUM
[4] Windows 7 PROFESSIONAL
[5] Windows 7 ULTIMATE

Continue @ ITstuff.ca


May 3 2009   10:05PM GMT

Unattended Installation Avira Antivirus on Windows 7



Posted by: Michael Khanin
Unattended, silent, Installation, Avira Antivirus, Windows 7

Everybody knows that I’m real fun of Unattended Installation. I try to do as much as possible to automate everything :). Time to time, I meet applications are not supporting unattended or silent installation. In this situation, my “Best Friend” is Autoit helps me. In the following video, you can see a demo, how by using Autoit script (BTW, any Autoit script could be compiled into .EXE file) I’m installing Avira Antivirus on Windows 7 RC1 (Win7 RC1).


Apr 28 2009   4:06PM GMT

FREE Live Migration and Host Clustering in Hyper-V Server 2008 R2



Posted by: Michael Khanin
Microsoft Hyper-V Server 2008 R2, System Center Virtual Machine Manager 2008 R2

According to Zane Adam, senior director of virtualization and System Center, Microsoft Hyper-V Server 2008 R2 will continue to be free, and now will include live migration and host clustering capabilities…

Customers won’t need to pay thousands of dollars for alternate Virtualization platforms to get these features. With Microsoft Hyper-V Server 2008 R2, customers have a solution for both planned and unplanned downtime and can use it for scenarios like server consolidation, branch server consolidation, high availability (HA), and VDI.

You can download Microsoft Hyper-V Server 2008 R2 beta here. Microsoft Hyper-V Server 2008 R2 can be managed by System Center Virtual Machine Manager 2008 R2. You can download the beta here.

You can find more info on Microsoft’s virtualization products and solutions at http://www.microsoft.com/virtualization.


Apr 28 2009   1:36PM GMT

Join ITStuff.ca



Posted by: Michael Khanin
Windows, vmware, Hyper-V, Virtualization, HP Servers, Blades

I’d like to let everybody know about my new (rebuild) blog, ITStuff.ca. This blog dedicated to IT Technologies.
ITStuff.ca is all about Windows, VMware, Hyper-V, Virtualization, HP Servers, Blades and other IT Technologies. An invaluable source of Tools and Scripts for IT Network Administrators. A valuable advice, Tips, Tricks and best practices for Net Admins.

Please join ITStuff.ca. And, PLEASE :) promote my new endeavour, ITStuff.ca by spreading the word!