Jump to content
Software FX Community
jeffg

refresh not working

Recommended Posts

jeffg    0

I cannot get my refresh to work properly in the script below. I pull the data ok but it never refreshes. I have tried putting the refresh a couple places with no luck. anythoughts? 

$computer = "."

$namespace

= "root\CIMV2"

$val1

=Get-WmiObject win32_Processor -computername $computer|%{$_.loadpercentage}$val2=Get-WmiObject -class Win32_PerfFormattedData_Tcpip_NetworkInterface -computername $computer -namespace $namespace -filter "name='Broadcom NetXtreme 57xx Gigabit Controller'" |%{$_.BytesTotalPersec /125000}

out-gauge

Share this post


Link to post
Share on other sites
marco.shaw    0

Check out my blog postings to see how you need to implement a script to get a refresh value:

http://community.softwarefx.com/blogs/powergadgets_guest_blog/archive/tags/guest+blogger/default.aspx

Now, you're looking at trying to read 2 values into out-gauge, so you'll actually need to create a more complicated object with your .ps1 script.

Let me know if you're still interested.  Sorry for the delay in replying...

Marco 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×