Windows PowerShell


PowerShell Files - Query Disk

PowerShell Script Files

PowerShell files home page.

get-wmiobject -query "select deviceid,size,freespace from win32_logicaldisk where drivetype=3" |select deviceID,Size,FreeSpace
| format-Table -auto

PS C:\> $servers=get-content servers.txt

PS C:\> $d={get-wmiobject -computer $computer -query "select deviceid,

size,freespace from win32_logicaldisk where drivetype=3" |select

deviceID,Size,FreeSpace | format-Table -auto}

PS C:\> foreach ($s in $servers) {$computer=$s;$computer;&$d}

 

Drive 3 = Hard Drive

See Also PowerShell Tutorials:

PowerShell Home  • Com  • Shell Application  • Active Directory  • QAD Snap-in  • Get-Member

Please write in if you see errors of any kind.  Please report any factual mistakes, grammatical errors or broken links, I will be happy to not only to correct the fault, but also to give you credit.

Download my ebook:Getting Started with PowerShell
Getting Started with PowerShell - only $9.25

You get 36 topics organized into these 3 sections:
   1) Getting Started
   2) Real-life tasks
   3) Examples of Syntax.

In addition to the ebook, you get a PDF version of this  Introduction to PowerShell ebook  It runs to 120 pages of A4.

 *


Google

Webcomputerperformance.co.uk

Guy Recommends: SolarWinds Exchange Monitor

Exchange Monitor from SolarWindsHere is a free tool to monitor your Exchange Server

 

Home Copyright © 1999-2008 Computer Performance LTD All rights reserved

Please report a broken link, or an error.