FontWeight & FontSize aren't respected when using -AsJob

Jul 8, 2011 at 2:45 PM

I was trying Doug's example at and wanted to run it as a job by replacing -Show with -AsJob. However, by doing so, the details around Font Weight and Font Size are lost. The numbers start looking tiny. I have not tried a generic example yet.

Jul 8, 2011 at 11:56 PM

Thanks Ravi, yup it causes the same problem for me.

Jul 9, 2011 at 4:24 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jul 10, 2011 at 12:53 AM

There is a work around, I pulled those parameters out of the hash table, did not splat them and specified them explicitly on the Label.

It works in ISE and fails at the command line.


Jul 14, 2011 at 1:14 AM
Edited Jul 14, 2011 at 1:15 AM

James Brundage has a video at where he says that ShowUI 1.1 creates an automatic variable for everything in $PSBoundParameters.

In Doug's example, if you replace:

$labelAttributes = @{


$PSBoundParameters['labelAttributes'] = @{

It will work when using -AsJob.
Jul 14, 2011 at 3:02 AM

That's right. I also posted an update to the clock based on that video.

Here is the post and the code.