Jump to content
Software FX Community

JonathanH

Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About JonathanH

  • Rank
    Newbie
  1. I should also state that when testing a couple of scripts before emailing this, I seem to have found a common denominator. At least for several of the scripts that were crashing they are ones that had "drill_through" scripts specified. As several of them after removing this parameter they run fine. Though I do have other scripts that are also using that and work just fine, so still not 100% certain what the combination is.
  2. Well I sent an email this morning, but I'm not sure if you'll get it or not. I actually got an auto-response back basically telling me that the email address is no longer the proper place to send Support requests to.
  3. Just a not to everyone... This is not limited to an "older version" of Powergadgets I had the same issue with the lastest version running. It appears to be an issue with PowerShell 3.0 and powergadgets in general. Furthermore, it doesn't occur on *all* of my scripts that use out-gauge. I was not able to pinpoint a specific difference between the places where it worked and where it didn't, however uninstalling powershell 3.0 fixes the issue. This proved to be a real issue for me as I needed powershell 3.0 for another script that I'm running on the box. Today however I was able to successfully work around this issue with Powershell 3.0 installed. I re-installed Powershell 3.0 on my machine and confirmed that the same scripts with out-gauge that were previously crashing were still doing so. I then modified my scheduled tasks that were actually calling the powershell scripts in question to start powershell with the -version 2.0 flag. When starting powershell with this commandline option before launching my scripts that were crashing in powershell 3.0 everything works fine. So if you need powershell 3.0 on the box and also need out-gauge to work, be aware that as long as you aren't needing powershell 3.0 specific features in the scripts that call out-gauge, you can use this workaround to allow things to work.
  4. Did you ever get this figured out? I'm running into the same problem on my dev box now.. I can specifically say that my problem started when I upgraded powershell to powershell 3.0.
  5. No, we must have had a mis-understanding. I'm not pasting the powershell script into the script window, I'm referencing the script. So in the Powershell script window I simply have the script name for the first of the two scripts.. getCompanyScore.ps1. So the source for the data in the PGF file is the same as the script I call in my "second" script in the working example using out-chart where I basically have the code as ... getCompanyScore.ps1 | out-chart -template CompanyScore.pgt
  6. I would have thought so too which is why this was so puzzling to me. No big rush, since as I say it's working fine for me with the out-chart method, so I have a work around for now, but I'd really like to get it working with the powergadget's creator too, or at least figure out why it's *not* working. Like I say when I try to use the first script as a source for the PowerGadgets creator, it "looks" like it's going to work. I can run the "test" and the data shows up properly in the "results" pane, but clicking the "Finish" button, just refreshes the test results and won't ever let me actually save the change. At first I thought the problem might be due to something odd in the data itself, so I modified the data set. Originally I had the "Score" values as floating point with varying precision, I rounded them to Integers. That didn't make a difference. Then I thought maybe some odd character in the Company names might be causing the issue (specifically a couple of the companies had "&" in the company name), so I did a character replace on those characters, that didn't make a difference. Had a couple of company names that were quite large, so I truncated them all to 10 characters or less, and that didn't make a difference either. Overall, I'm stumped.
  7. The second script is pretty straight forward. It's simply in the form of script1.ps1 | out-chart -refresh 00:10:00 -floating .... etc etc.. Other options to format the chart the way I wanted.. I then actually simplified that with the use of a template so that it's down to just script1.ps1 | out-chart -template myscript.pgt -refresh 00:10:00 The only reason that I even have it as a script rather than a manual entry is I've got several other users who need to be able to run it without having to understand all of the "command line stuff", that goes along with it. Script1, basically selects two columns from a database table, one that has the name of a company, and the other that has a series of comma separated values. I then have to take those comma separated values, and use them to perform a calculation which becomes my 0-100 value in the output.. I tried a couple of different ways of building the output and my last attempt looks something like this.. # $result is the variable holding the return of my SQL query from invoke-sql.. $i = 0 #Buld our output table $output = New-Object System.Data.Datatable "ResultTable" $col1 = New-Object system.Data.DataColumn Company,([string]) $col2 = New-Object system.Data.DataColumn Score,([decimal]) #Add the Columns $output.columns.add($col1) $output.columns.add($col2) while ( $i -lt $result.count) { #Do a bunch of stuff with the comma separated value field to calculate a score... ..... #$score = final calculated value, number from 0 to 100. $row = $output.newRow() $row.Company = $result[$i]["Company"] $row.Score = $score $output.Rows.Add($row) $i += 1 } $output
  8. I've been having pretty good success getting things working for me, but I ran into a problem with one particular thing I'm trying to accomplish. Most of my gadgets are using SQL as the data source, and they are all working fine, but I ran into one where I need to "massage" the data as I can't get it into exactly the format that I need directly from the SQL database. I've gotten the data brought into powershell and got it into exactly the format that I want, and this is all working great. Then if I pipe the output of all my work to out-chart with the correct parameters it all works great and generates exactly the information I'm looking for. However in order to get this to refresh it ends up having to be two scripts, one that gets the data and outputs it and then the second that calls the first and pipes it to out-chart. Again that all works just fine. For consistancy's sack however I'd really like to get this whole thing working from a .pgf file so that it's easier to edit the formatting of the chart later with powergadgets creator. This is where I run into problems. If I select the Powershell script (the first one that actually returns the data...) as the source for the chart, I can click test and it shows my data in the results window just fine, however if I click the finish button to try and get it to save that change then it simply refreshes the data in the results wizard and won't go any further... Really frustrating... I've tried a number of different methods but I can't seem to get this to work at all. I've tried building the data as an array of objects, or as a datatable, and either method "looks" the same on the Powershell output screen and works find with the out-chart method, but does *not* work trying to use it as the source in powergadgets creator. My data consists basically of a series of data pairs with a company name paired with a percentage value from 0 to 100. What am I doing wrong? What format does the data returned from the powershell script need to be in for it to work properly with powergadget creator? Thanks, Jonathan
×
×
  • Create New...