Jump to content
Software FX Community

marco.shaw

Members
  • Posts

    249
  • Joined

  • Last visited

Posts 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. Sorry, I didnt make that clear.

    I dont need an automated installation as the number of machines is very limited.(around 10-15, how many managers we could have :)).

    The problem is how to distribute the gadgets I create, not the powergadgets installer, in a way easy to understand and use by the users.

    So I was thinking of running the scripts from a shared folder.

    Cosmin.

    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.)

  3. 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.

  4. 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.

  5. $command = "out-chart "

    foreach company in $WSResponseDS 

      add conditional attrs to $command

    $WSResponseDS | & $command

    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.

    post-4822-13922403363622_thumb.jpg

  6. 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.

  7. Just downloaded the Trial version (1.0.2588.21909), auto-refresh does not works. Using in XP.

    We have only 60 days to try the PowerGadgets, can we have a version with auto-refresh ?

    Thanks

    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?

  8. 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

  9. 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?

  10. 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!

  11. 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.

     

  12. 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.

×
×
  • Create New...