Posted by: Preetam | May 6, 2008

Computer Model Information, Disk Size,

Get-WmiObject -Class win32_computersystemproduct | fl Name,UUID,Identifyingnumber,Vendor

 

Name : IBM eServer BladeCenter HS20 -[86786JX]-
UUID : 30A02FBC-B450-124A-AF23-ECA2279ED40D
Identifyingnumber : KBNY999
Vendor : IBM

———————————–

$LogicalDisks=Get-WmiObject -Class win32_logicaldisk
Foreach($Disk in $logicaldisks) {
if($disk.drivetype -eq “3”) {
$freespace=$Disk.deviceid + ” = {0:N}” -f (($Disk.freespace)/1Gb) + ” GB Free”
$freespace
   }
}

#Result looks like below

C: = 27.77 GB Free
E: = 33.49 GB Free
F: = 39.50 GB Free
G: = 59.79 GB Free
H: = 10.89 GB Free
I: = 11.54 GB Free


Responses

  1. you are a powershll nerd, you answered my question before even i asked it. thanks a million !


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: