Disk Space Report - Reports only disks that are below a threshold - HTML output.

I have created a Powershell script to report on a list of server's disks space.  Unlike most reports out there, this one only reports on those disks that are below the set thresholds.  My previous attempt at this saved the results to a CSV file, attached to an email and sent out

 
 
 
 
 
4.7 Star
(13)
14,983 times
Add to favorites
Storage
8/12/2011
E-mail Twitter del.icio.us Digg Facebook
  • I am unable to loop all 6 servers in the servers_c.txt
    2 Posts | Last post August 13, 2015
    • The script worked as expected but its just not looping all the servers that were mentioned in the servers_c.txt file. It is just looking at the first server listed out in the file. Any one ran in to this situation and How did you fix it ? 
      
      Thanks,
      Ram
    • Never Mind .. It's working fine as it should be .. It is looking at Drive level free space not at the Mount level free space. I got confused between the two.. 
  • Sir i'm getting the output as empty except the server name that i've added in the servers_c.txt file....
    2 Posts | Last post August 12, 2015
    • Sir i'm getting the output as empty except the server name that i've added in the servers_c.txt file.... 
      
      The free Space shows NAN...
      
      Please guide me through this... what all should i've to change.?
    • TO resolve NAN free space issue: 
      Try to replace your server names with the Physical Server name. You might be using IP address. Do not include Instance Information in the server name. It worked for me after trying different options for 6 hours.
  • Answer to jayromega's question
    2 Posts | Last post August 12, 2015
    • @jayromega.
      I'm also a newbie to any scripting language, however with some research I've found that this script filters for fixed drives '3'. If you need more thant that, you will need to add the other types e.g.shared, etc
    • TO resolve NAN free space issue: 
      Try to replace your server names with the Physical Server name. You might be using IP address. Do not include Instance Information in the server name. It worked for me after trying different options for 6 hours. 
  • Only One Drive
    1 Posts | Last post June 18, 2015
    • Some have asked, I have found it.  How to get just the C: drive.
      In the section "# Start processing disk space reports against a list of servers"
      
      Change -Filter
      FROM:
      $disks = Get-WmiObject -ComputerName $computer -Class Win32_LogicalDisk -Filter "DriveType = 3"
      
      
      TO:
      $disks = Get-WmiObject -ComputerName $computer -Class Win32_LogicalDisk -Filter "DeviceID = 'c:' "
  • Show all Workstations on the Report
    1 Posts | Last post April 21, 2015
    • Can you tell me what modifications can I make to get the script to display all workstations in my text file on the report, reguardless of whether it is low on space or not? So those workstations will show up but not be highlighted in red or orange  
      
      Thanks,
      Ron
  • Script is not giving result for few of the drives in the server from one account. While it is giving proper result for all the drives from other account. However both the accounts have admin access on all the server. Can any one please help in this.
    1 Posts | Last post January 05, 2015
    • I am facing below error.
      
      Get-WmiObject : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
      At C:\Program Files\BHI_Utils\Free Disk Space Report\FreeDiskSpaceReport.ps1:131 char:24
      +     $disks = Get-WmiObject <<<<  -ComputerName $computer -Class Win32_LogicalDisk -Filter "DriveType = 3"
          + CategoryInfo          : NotSpecified: (:) [Get-WmiObject], UnauthorizedAccessException
          + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
      
  • Error
    1 Posts | Last post August 04, 2014
    • hey Mike,
      
      i got the same error as MSTSCH but i was manage to worked it out by filling out the servers_c.txt, however, how will this script work also to other drives if you have more than 1 drive? what modification do I need to insert?
  • I see the HTML report with the server list but the all the other colums are blank and FreeSpace column shows NaN fro all servers..........please advise !!
    3 Posts | Last post August 04, 2014
    • 
      Server1                ServerIP        percentage free space = NaN
      Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
      At E:\DiskSpaceTest.ps1:123 char:24
      +  $disks = Get-WmiObject <<<<  -ComputerName $computer -Class Win32_LogicalDisk -Filter "DriveType = 3"
          + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], COMException
          + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    • Got it working. Thanks !!
    • @MSTSCH
      
      how did you manage to work this script?i got the same error. Please tell me the methods and modification you made. Also i think this is just for 1 drive, how about we have several drives
  • wont give expected data via task scheduler
    1 Posts | Last post June 25, 2014
    • When I run it from powershell it works fine but when I use it in task scheduler >> it sends out email but with no information. 
      
       How can I make it work with task scheduler
  • How to ignore a certain drive letter?
    3 Posts | Last post October 19, 2013
    • Hi there
      This is a very nice script and exactly what I needed. However, we have a large number of Server VMs with swap drives stored on S: Drive. Is there a way to ignore this particular drive?
      Thanks for your help.
      
      Regards
      Steve
    • Hello Steve. Did you figure out how to leave out other drives?
    • Hi, no... although I got sidetracked and forgot about this to be honest. Did anyone have any luck?
21 - 30 of 39 Items