Jump to content
Software FX Community

out-gauge -Appearance_Size no longer accepts {$_.Size} in Windows 7


TRasmussen

Recommended Posts

Aloha,

It's me again. I'm back because I never received any replies for my last post. So, I thought I'd try again with a slightly different (easier) problem. Again this is related to our recent migration from Windows XP to Windows 7. I have several PowerGadget Digital Gauges that receive parameters from import-csv. I used to be able to control the size of the digits that are displayed by using the {$_.size} object item in conjunction with the out-gauge -Appearance_Size parameter.

The CSV I import from looks something like this (read between the single quotes):

'

#TYPE System.Object

"Count","Size"

"125",".66"

'

The powershell script that works properly in Windows XP looks like this (read between the single quotes):

'

import-csv

Link to comment
Share on other sites

Please open the PowerGadgets Creator, go to Help, then About PowerGadgets.  Please check the version you are currently running, and compare that against the version you had running on XP (if you can).

This feature is known as scriptblocks.  Not all parameters accept scriptblocks and I believe that support for it improved with later releases as more and more parameters provided support for it.

Link to comment
Share on other sites

My PowerGadgets is version 1.0.2760.16652 on my XP box and version 1.0.3049.17915 on the Windows 7 box. It seems like this would be a pretty major change for a minor revision from 1.0.2 to 1.0.3. Is there any documentation on these so-called improvements? Is it simply a matter of syntax or punctuation?

 If I can solve this, it will probably resolve our  other issue as well as we were using script blocks in our conditional attributes for out-chart as well.

Link to comment
Share on other sites

It doesn't appear to be an issue with PowerGadgets versioning. I loaded the exact same version of PowerGadgets (the older v1.0.2760.16652) on another Windows 7 machine and I am getting the same error. If anything, I suppose it could be a PowerShell versioning problem. But Windows 7 comes with PowerShell, so I don't know what I can do about the version of PowerShell that I run from Windows 7.

Can anyone else provide me with some clues as to what we can do about these scipt blocks in Windows 7.

For my next test, I'm going to load this stuff on a Vista machine to see how it works in Vista.

Link to comment
Share on other sites

Thanks Dan for the response. I'll go ahead and post it over on the ConnectSMART forum as well. I'm pretty sure that our drilldowns are working OK in the Windows 7 environment with PowerShell v2.0, I'm only seeing this with respect to the Script Blocks. The {$_.Size} as well as a Script Block we've been using for conditional attributes are the only two issues that have come up that I've discovered so far. I'm going to be spending some time to see if there is anyway to work around this problem and in the meantime, I'll try to get a hold of the latest version to test also.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...