Monday, June 30, 2008

Redefine the temp folders

When you install a software, most of the installers will try to extract some files in a temporary folder on the hard drive. The default temporary folder can be accessed by the environment variable TMP or TEMP.

By default, those folders will point to the following folder on your Windows drive (X):\Document and Settings\UserName\Temp , the path may vary according to Windows version.

Sometimes, a huge software installation like Windows Service Packs or Visual Studio Service Packs, will need to extract a (very) large file in the temp folder, and if no enough (here I mean great) free space no installation can take place.

Anyway, keep long story short :) ... to allow your temp folders to go into a new drive, you need to redefine the path associated with the Environment variables:

Go to My Computer , right click Manage, select the Advanced table, click on Environment Variables button, then select the TEMP and TMP variables and point to a new folder , and enjoy large installations on limited free space drives :)

Tuesday, June 10, 2008

PowerShell Seminar @ ITWorx [CuttingEdge-Club]

I will present a seminar at ITWorx CuttingEdge club about PowerShell.

The seminar's presentation :

Monday, June 09, 2008

How to get the Physical Memory size of a remote computer

Using 2 lines of PowerShell to get the Physical memory of a remote computer :

$mem = Get-WmiObject win32_computersystem -computername server-vm-0001

$mem.totalphysicalmemory / 1Gb

This is just an example, and other system information can be retrieved through using the WMI objects, the above script can be easily extended to get the Physical memory (or anything) for all the machines in a whole network.