Jump to content
Software FX Community

marco.shaw

Members
  • Posts

    249
  • Joined

  • Last visited

Everything posted by marco.shaw

  1. Just for fun... Can you try disabling any/all snap-ins you might have in your profile, and either leave only the PowerGadgets snap-in or load it manually, then retry? I have extra snap-ins loaded and it works fine for me, but this is just a small test I'd like someone to try. I've never had any problems with refresh, but am definitely curious to know what's up... What would really be nice to see is a log created by sysinternals.com's Filemon (I don't think Regmon would be required). A filter for "*powergadgets*" migth point to the issue. Please contact me directly at marco.shaw@AT.gmail.com (remove the "AT."), and I can try to walk you through the process of using Filemon to try to see what's going on with your system.
  2. It is not possible to create a unified view of gadgets on one Windows form, for example, with PowerGadgets. For this you could try out Chart FX (www.softwarefx.com). That being said your other option is to create multiple gadgets, yet they must be presented independantly. Marco
  3. An example of a custom map: http://marcoshaw.blogspot.com/2007/07/custom-maps-with-powergadgets.html
  4. Refresh should work. Are you implying that using a certain combination of parameters seems to cause refresh to stop working or it doesn't work at all?
  5. Yes, it does appear out-map will also support scriptblocks. I should have checked the documentation before posting... out-map also has the '-condition' parameter.
  6. Does out-gauge support a scrolling display (similar to a stock ticker)? If not, perhaps add it to the wish list of features. Something that would have a property of how many characters to display at once, and how fast the characters would scroll by. Marco
  7. Running the script from a shared folder sounds like a good idea. For ease of use for end-users, perhaps you could pass around a VBscript script to all the users, which could kick off the PowerShell script. Using VBscript will allow you to easily create a script that can easily be defined with an icon, so it can easily be identified. By default, Windows has no idea what to do with a .ps1 script and will just likely open it in notepad if it is double-clicked. It is pretty simple to create a VBscript to kick off a PowerShell script. Here's an article that shows how to use VBscript (even if you're not planning to use this as a scheduled task, the concept is the same): http://blog.sapien.com/current/2006/12/25/more-fun-with-scheduled-powershell.html (It also links to a previous article.) This way, you have an .vbs script with the somewhat familiar script icon associated with it already. (I've not had the time to play with your issue of how you can setup your bar colors dynamically, but I'm thinking about it. I haven't played much with the transpose option, if that's what will give you the solution you need.)
  8. So you'd like to see something like:message text #1message text #2etc. All of this on the same view? Putting them on the same line might cause a really long line that might be diffucult to read. Hmmm... Checked the out-gauge docs, and don't see a scroll feature, which might be cool in this case.
  9. I don't know of a way to change the grid layout. So, what else are we left with outstanding? Just how to install the application on some other machines? I checked the install .exe (with just a simple /? flag), and it doesn't seem to accept any options which leads me to believe something "silent" is not possible. Do you have any kind of tool to remotely access the other machines? I'd like to think there's a remote way to automate PowerGadgets installs, but I can't think of any way right now.
  10. A very basic traffic light: http://marcoshaw.blogspot.com/2007/07/custom-maps-with-powergadgets.html
  11. I'm short on time to comment on the remainder of your questions, but I'll address the one above. How are you loading PowerGadgets? In your profile or via add-pssnapin? Instead of using "& command", try "invoke-expression $command". Make sure to do a 'write-host $command' to make sure the string looks OK. If anyone else doesn't come along, I'll give your other questions some more thought in the next few days.
  12. You cannot split the lines in this case. This is basically a PowerShell limitation currently: http://community.softwarefx.com/forums/t/9104.aspx You can, however, do different things to cut things down, but it will still require extra steps/scripting: http://community.softwarefx.com/forums/t/9041.aspx Other than that, you're left with possibly using the built-aliases like 'gwmi' instead of 'get-wmiobject'. Most of the built-in cmdlets have aliases for their parameters. PowerGadgets doesn't currently support shorter counterparts for the parameters, but it is something I've suggested before.
  13. You're joining this thread late... What exactly are you trying with refresh? Have you tried something like this: get-date | out-gauge -refresh 0:0:1 -type digital -floating What if you tried this instead: get-date | out-gauge -refresh 0:10:0 -type digital -floating This time, you right-click on the gadgets and do a manual refresh... What happens?
  14. You should be able to just download a new trial version and input whatever key you might have. Uninstall your old version, before installing the new.
  15. I would recommend upgrading. I've seen some issues with refresh in earlier releases. I am currently running 1.0.2682.33396 (and can't remember if that's an interim build that fixes something minor). This definitely works for me, so you should upgrade first, then retry: get-date | out-gauge -refresh 0:0:1 -type digital -floating
  16. I think we need to start over... Run this again: $processed = invoke-sql -server DBSERVER -SQL "set nocount ondeclare @xx table(dataflow varchar(50), FLOW_PROCESS_MIN int,FLOW_DELTA int)insert into @xxSELECT top 26 DATAFLOW, FLOW_PROCESS_MIN, FLOW_DELTA FROM DB.dbo.DataFlowStats (nolock) ORDER BY AuditTimeStamp DESC UPDATE @xx SET FLOW_DELTA = 0 WHERE dataflow IN ('MQMSGMUREX','MQSEQMUREX')SELECT SUM (FLOW_PROCESS_MIN) as Processed, SUM (FLOW_DELTA) as Delta from @xx" $obj = new-object System.objectadd-member -inputobject $obj -membertype NoteProperty -Name Processed -value $processed.Processed add-member -inputobject $obj -membertype NoteProperty -Name Delta -value $processed.Delta $obj <Show us results> $obj|get-member <Show us results> What are you intending on doing the data once you have the above object properly working?
  17. OK, so first you are providing us with the output of "$processed|get-member", then the result of the invoke-sql cmdlet? Perhaps I'm missing something, but didn't you previously mentioned that invoke-sql was giving you a delta value, but from what you just copied, it isn't?
  18. Can we actually see the output of the command and also what get-member says? get-member doesn't lie! ;-)
  19. I just have a real basic Cisco router without a whole lot of SNMP features I can query. Along with what Rene says, here's an example using NetCmdlet's get-snmp cmdlet: get-snmp -agent 192.168.1.1 -community xxxx -oid sysUpTime.0|out-gauge -type digital -value oidvalue Above, I'm just doing an SNMP query to get the sysUpTime of my 800 series router I have just sitting around doing nothing. I think that's in milliseconds. I then take that output and pass that to the out-gauge cmdlet. The results give me a LED style graphic that shows me the sysuptime value. (I can also use the -refresh flag to get the value updated at a regular interval.) I can do this to get seconds using a "scriptblock": get-snmp -agent 192.168.1.1 -community xxxx -oid sysUpTime.0|out-gauge -type digital -value {$_.oidvalue/1000} NetCmdlets and PowerGadgets work well together!
  20. eenlow, So you are trying to just write *one* stored procedure? Am I assuming too much when thinking that you could just write 3 or 4 SPs, and have each one query the proper DB? We could then combine the results after...
  21. So you've managed to create a stored procedure that you can use to get the value from each database? From there, since you're posting here, I'll assume you have PowerGadgets installed. You can run a stored procedure easily from PowerShell: PSH>invoke-sql -server SQLSERVER -sql "exec stored_procedure" (ignoring authentication for now unless you need it) I'm not sure what kind of information your stored procedure will output, so you'll want to do something like this: PSH>$sql_var1=invoke-sql -server SQLSERVER -sql "exec stored_procedure" Then: PSH>$sql_var1|get-member You'll need to post here what the above output gives. We need to get just the string value of your total, and the above is a first step.
  22. A couple of free PowerShell related utilities are available from www.powerlocker.com: 1. PowerPad: a very basic text editor that allows you to easily write multi-line scripts and edit them in a Notepad-type interface. 2. PowerLocker: a cmdlet that can encrypt/decrypt PowerShell scripts. If you want to hide your PowerShell code, PowerLocker can help! I used PowerLocker to encrypt a almost 600 line PowerShell script (that uses PowerGadgets), and had no problems running the script after encryption. PS I'm not employed/affiliated by/with PowerLocker.com.
  23. To be able to just run it as "gpo", you will need to put the .ps1 script in a directory that is in your path (or modify your path to include your script directory). Otherwise, you will need to call it as ".\gpo" or ".\gpo.ps1".
  24. Have you checked this thread out? Not exactly what you might be looking for, but maybe you're only option... Note the "passthrough screensaver" he mentions. http://community.softwarefx.com/forums/t/9094.aspx
×
×
  • Create New...