BRONZE PARTNER:
BRONZE PARTNER:
Industry News:

| |
 |
 |
 |
| PowerGadgets In Action |
 |
|
|
By: Ying Li
Posted On: 7/19/2007
If you want to add more power or to have more fun with PowerShell, you could try adding PowerGadgets to your toolbox.
PowerGadgets is a PowerShell snap-in that add charts, gauges and maps to your scripts.
Try save the following script as FolderSize.ps1:
$items = get-childitem $args
foreach($item in $items)
{if($item -is [System.IO.DirectoryInfo])
{add-member -inputobject $item -membertype ScriptProperty -Name FolderSize
-Value{$a = get-childitem $this.fullname -include *.* -recurse |
measure-object -sum Length;if($a-eq $null) {return 0;}else {return $a.sum}}
write-output $item
}
}
Then type FolderSize | out-chart
Now you can see PowerGadgets in Action!
Of course, you need to have PowerGadgets installed first! You can get a free trial copy of PowerGadgets at www.powergadgets.com
|
 |
 |
 |
|
|