Tony-SouthFLVMUG / vDiagram2.0

vDiagram 2.0 based off Alan Renouf's vDiagram
79 stars 17 forks source link

CSV Validation Errors #25

Closed kanoble88 closed 2 years ago

kanoble88 commented 2 years ago

I've been trying to run the CSV Validation however, none of the CSV's that 've collected from the network are being detected. I've tried with just 1 CSV and I've tried importing multiple but they don't seem to be detected. When I try to do a import I always get the same error though:

Import-Csv : Could not find file 'C:\NewOutputForTest-VmExport.csv'. At C:\vDiagram2.0-master\vDiagram2.0-master\vDiagram_2.0.12.ps1:4037 char:12

  • $SrmVMs = Import-Csv $SrmVMsFile
  • CategoryInfo : OpenError: (:) [Import-Csv], FileNotFoundException
  • FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ImportCsvCommand

You cannot call a method on a null-valued expression. At C:\vDiagram2.0-master\vDiagram2.0-master\vDiagram_2.0.12.ps1:4038 char:43

I've also tried collecting CSV's by connecting to vCenter with hostname and IP and both give the same results.

Thanks

Tony-SouthFLVMUG commented 2 years ago

@kanoble88 I'm not totally sure what you have going on there but if you are available to jump on a Webex/Zoom with me tomorrow after 11am EST I can try and figure out what you have going on.

kanoble88 commented 2 years ago

I think I was able to figure out what was causing the error. I wasn't connected to vCenter when doing the check for CSV's. Once I connected to vCenter I the CSV checks went through and I was able to kick off a drawing. Is there any way to bypass having to be connected to vcenter to check for the CSV's and create the drawing?

Tony-SouthFLVMUG commented 2 years ago

You only have to be connected to collect. You do however have to put the vCenter info exactly as you did when you collected in order to so the validation, this is due to the csv files containing the vCenter name. This was done by design for those that have multiple vCenters that they work with.

kanoble88 commented 2 years ago

That is what I was doing wrong then. It is working now! Thank you!

Tony-SouthFLVMUG commented 2 years ago

Are you good with me closing this issue then?