Excel and HTML Asset Reports With Powershell

This set of powershell functions gathers hardware health, drive space, networking information and much much more from several computers concurrently. It then generates multiple types of html reports and can export all data directly to excel.

 
 
 
 
 
4.8 Star
(12)
8,602 times
Add to favorites
Operating System
2/26/2014
E-mail Twitter del.icio.us Digg Facebook
  • Languages
    1 Posts | Last post February 24, 2019
    • Hi Zach,
      
      I am new to PowerShell and just wanted to know how many languages have used to write such an awesome script and what are those. So, I can look forward to learn those languages.
      
      Basically, I just need to know, along with PowerShell what are the other languages should I learn to be more proficient in Powershell.
      
      Thanks in Advance !!
      
      Regards,
      Anubhav
  • SaveDataFile
    7 Posts | Last post February 01, 2018
    • Zach.  I am trying to run your PowerShell script, but keep getting the following error:
      New-AssetReport : Cannot process argument transformation on parameter 'SaveDataFile'. Cannot convert value
      "System.String" to type "System.Management.Automation.SwitchParameter". Boolean parameters accept only Boolean values
      and numbers, such as $True, $False, 1 or 0.
      At C:\Scripts\New-AssetReport\New-AssetReport.ps1:13983 char:1
      + New-AssetReport @reportsplat
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : InvalidData: (:) [New-AssetReport], ParameterBindingArgumentTransformationException
    • JMartin21, sorry about that. There was a minor fix I had on my local workstation that I forgot to upload. Try downloading the most recent version and give it a whirl.
      
      Thanks!
      Zach
    • How do you run it against other computers?
    • Actually.  How do you run it against multiple computers at the same time...
    • Specify an array of computer names to the -Computers parameter.
      
      So: 
      
      $Servers = @('Computer1','Computer2','Computer3')
      ./New-AssetReport -Computers $Servers
      
      or you can select and highlight them with the ADDialog as well (make certain they are actually highlighted in the listbox),
      ./New-AssetReport -ADDialog
      
    • $Servers = Get-Content C:\temp\servers1.txt
      .\New-AssetReport.ps1 -Computers $Servers -PromptForInpu
      
      
      Much better than server1','server2 << this became a nightmare when I had to run on 90+ servers. Not powershell pro but figured out the get-content command quite useful
      
    • Hi
      
      I have the same error, than Jmartin, it looks like you never upload the fix.
  • Excel export
    1 Posts | Last post June 23, 2017
    • Hi. Could you please help?? When trying to export do excel, the following error appears:
      Argument types do not match
      At D:\Tools\SystemAssetReports\SystemAssetReports\V1.5\New-AssetReport.ps1:11570 char:21
      + ...             $ColumnIndex = $ColumnLoc | Foreach-Object{($_.NodesBefor ...
      +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : OperationStopped: (:) [], ArgumentException
          + FullyQualifiedErrorId : System.ArgumentException
      
  • How to integrate with CSV
    2 Posts | Last post March 15, 2017
    • Script work great 
      
      I would like to integrate with CSV Could you please let me know how to integrate 
      
      I am keep getting error once I am trying to integrate
    • My above question  has resolve.
       But I have another question, when I run the script it create excel files separately (and does not save as it does on HTML)
      
      How do I  combined  all excel to one
  • How to Save the Exported Excel File
    5 Posts | Last post March 23, 2016
    • Hello Zachary,
      
      Script is working Great, 
      When i Select Excel as a Reporting option, Excel application launches upon the execution of the script but its not saving the File,
      Kindly help in this regard
      Thanks in Advance
    • I've been unable to save the Excel report via any parameters as well. I also have an issue when running it again 1000+ servers where it appears the script hangs forever - I've let it run (where it appears to be hung) for more than 24hrs and still nothing so I'm working on hacking it to run in chunks of servers.
      
      Not sure where the bug is though.
      
      ~CBM
    • If you add the following code, it will save the file to the location specified:
      
      Find "#$Excel = New-Object -Com Excel.Application -ErrorAction Stop" in the script and add the following right above it on a new line:
      
      Add-Type -AssemblyName Microsoft.Office.Interop.Excel
      $xlFixedFormat = [Microsoft.Office.Interop.Excel.XlFileFormat]::xlWorkbookDefault
      
      Find "$Workbook.Worksheets.Item("Sheet3").Delete()" and add the following on a new line after it:
      
      $Excel.ActiveWorkbook.SaveAs("C:\Path\To\Save\Directory\FileNameToSaveAs.xls",$xlFixedFormat)
      $Excel.Workbooks.Close()
      $Excel.Quit()
      
      Save your changes and test! This works great for me.
      
      ~CBM
      
    • Thanks for answering the question with a proposed answer. I feel badly I've had zero bandwidth to address this and the hundred other open questions I have about many of my scripts. Your taking matters into your own hands and sharing a solution is more appreciated than you probably realize ;)
    • Zachary,
      
      I'm seeing an issue where we may have a server (or two) that's having RPC and or WMI issues and therefore we're unable to properly query it via your script and it results in the script hanging forever. I do get a WARNING: Timeout SERVERNAME for the servers in question but when this occurs, the script never completes and I never get my data! Any ideas where the bug might be?
      
      If I eliminate the servers where we get a timeout listed, the script completes without issue.
      
      Help!
      
      ~CBM
  • Saving the report
    2 Posts | Last post January 27, 2016
    • Hi Zac, I'm successful reporting to Excel (which opens and shows everything correctly) but how do I save it?  I am a little unclear on the variables that would save the Excel file...
      thanks in advance,
      Jeff
    • well, been 10 months since I asked this.  guess Zac isn't checking this guy.  oh well.  I'll just run it and try to figure this out myself.  sorry.
  • Can you report on the following?
    1 Posts | Last post January 22, 2016
    • Hi Zachary,
      
      Love the script, it's been a huge help! Any chance you've updated it to do the following?
      
      1) If you detect that it's a VMware VM, connect to vSphere and gather the ESX host the VM is running on to the system summary?
      2) Again if you detect that it's a VMware VM, add the ability to pull attributes and or tags of corresponding VM's in vSphere? 
      3) Add the ability to include the CN / object path of the computer object in the system summary?
      
      Again we appreciate all the effort you put into this excellent resource!
      
      CBM
  • DNS information
    1 Posts | Last post October 23, 2015
    • Zachary, this is an awesome script.  So useful! Great work.
      
      I just wanted to ask about two things:
      
      1)  Is it possible to have the html report name in the top with the server name?  At the moment it just says System Report, where if you have a few can be hard to find.
      2)  Can any DNS information be added, including such things as the domain name.  It would be quite useful to see what domain the server is on.
      
      Thanks!
      Justin
      
  • Did it support IBM Hardware
    2 Posts | Last post December 30, 2014
    • Script includes dell hardware health status could you let me know how we can customize it for IBM x system
    • If the IBM systems have a wmi provider installed with whatever management tools are installed it should be a matter of isolating the different hardware elements you want reporting on and including them in your results. I have no IBM systems to work against so you'd have to add it yourself, sorry.
  • In Excel Disk usage bar issue.
    1 Posts | Last post December 11, 2014
    • Hi,
      
      While generating Asset report to Excel, disk usage bar in coming. It is given in the following "<Font Color=Green>&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;</Font><Font Color=Transparent>&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;&#9608;</Font>".
      
      Please let us know any changes need to done.
      
      Thank you,
1 - 10 of 20 Items