Get disk space – %Free column

Welcome Forums General PowerShell Q&A Get disk space – %Free column

Viewing 3 reply threads
  • Author
    Posts
    • #222822
      Participant
      Topics: 13
      Replies: 17
      Points: 193
      Rank: Participant

      Hello,

      Using the following script, i could get the space and usage columns.

      what should i add to it to get a %free column instead of calculate it manually?

    • #222828
      Participant
      Topics: 10
      Replies: 2480
      Points: 6,537
      Helping Hand
      Rank: Community MVP

      What do you mean with “calculate it manually”? You just have to add another calculated property … !?

    • #222843
      Participant
      Topics: 13
      Replies: 17
      Points: 193
      Rank: Participant

      I meant that when there is no % column i just did – free space*100/total space.

      thanks for your answer.

    • #222891
      Participant
      Topics: 17
      Replies: 1956
      Points: 4,011
      Helping Hand
      Rank: Community Hero

      Percentage can also be done with string format directly:

      The way that Olaf is presenting is better as it’s still a numeric value and this is a string. You can’t do comparison if you store it as a string

Viewing 3 reply threads
  • The topic ‘Get disk space – %Free column’ is closed to new replies.