myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


How can I ge the disk NAME after measure-object ?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Scripting Technologies] >> Windows PowerShell >> How can I ge the disk NAME after measure-object ? Page: [1]
Login
Message << Older Topic   Newer Topic >>
How can I ge the disk NAME after measure-object ? - 8/31/2008 5:29:24 AM   
new2ps

 

Posts: 1
Score: 0
Joined: 8/31/2008
Status: offline
I would like to know the logical disk name that have the MAX FreeSpacefor example I have drive C: and drive D: and I want to know where i have the most freespaceI run:get-wmiobject win32_logicaldisk |measure-object -property freespace -maxI get:Count    : 3Average  :Sum      :Maximum  : 3883384832Minimum  :Property : freespaceBUT - How can I know if it refers to drive C: ? or D: ?TIA
Post #: 1
RE: How can I ge the disk NAME after measure-object ? - 9/1/2008 1:56:05 PM   
jholbach

 

Posts: 12
Score: 0
Joined: 8/31/2003
Status: offline
Try this:

get-wmiobject win32_logicaldisk | sort-object -descending -property freespace | select -first 1

or this:

get-wmiobject win32_logicaldisk | sort-object -property freespace | select -last 1

(in reply to new2ps)
Post #: 2
Page:   [1]
All Forums >> [Scripting Technologies] >> Windows PowerShell >> How can I ge the disk NAME after measure-object ? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.328