Jump to content
Software FX Community
TRasmussen

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

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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Thanks for trying that out.  Yes, Windows 7 is bundled with PowerShell v2, and that can't be changed on that platform.

So it is possible that PowerShell v2 introduced this problem...

Sorry, I wish I had more free time to try to help...

Share this post


Link to post
Share on other sites

hey todd, the problem (I am pretty sure) is that the release version of PowerGadgets doesn't properly support PowerShell V2. Certain elements work but others do not, eg size, drill down etc.  You will need to be on 1.0.3588.x or later for it to work. Post this on the ConnectSMART forum for more info

Share this post


Link to post
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.

Share this post


Link to post
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.

Loading...

×
×
  • Create New...