PowershellGrid Widget questions in Dashboards

Question about SelectedRows / $globalselecteditems for Powershellgridwidget
I have a dashboard which has 4 grids.
1. The top grid shows the health of our servers
    This grid is based on a Visualization!Microsoft.SystemCenter.Visualization.StateWidget
2. The second grid displays the relevant databases for the server/s chosen in the top grid - note more than 1 row can be chosen
    This grid is a powershellgrid widget 
3. The third grid shows custom alarms for the database/s chosen in the second grid
    This grid is also a powershellgrid widget
4. At the bottom, we have a generic details pane which at the moment only displays the details for the top grid which is Server Health.
   This grid is a Microsoft.SystemCenter.Visualization.GenericDetailsWidget 
My questions are:
1. Given that the powershellgrid widgets use $globalSelectedItems to pass context between widgets, how do you stop the second grid from deleting all rows if you chose a row in the third grid.  It works fine if you have chosen an item from the first grid,
then the second and so on - chosing an item in the third grid will blank out my second grid
This is what I have tried - In my third grid which displays alarms, I have prefixed the "id" of the dataobject to include a nominal identifier so that I know  what widget has sent the "id" with something like this.   
           $dataObject["Id"] = "Alarms" + $($i).ToString("00000") 
So in my second grid I thought I'd be able to exit without losing the contents of the grid with something like the following.
========
Param($globalSelectedItems)
#Test what the item is so we don't lose our rows if item not related
# exit if it is not related
$anItem= $globalSelectedItems | Select -First 1
if ($anItem["Id"].Contains("Alarms"))
 exit 
=====
2. How do you pass a "SelectedRow/s" to a Generic Details widget from a Powershellgrid widget?  Has anybody done this yet?  I would like to display the selected row from whichever grid has focus.  Also, unlike the Datagrid, the Powershellgrid
widget does not have a selectedrow/s properties so can it be done via another mechanism?
Many Thanks,
Paul
    

Hi Paul,
Hope the below articles can be helpful for you:
Operations Manager 2012 R2 UR2 Powershell Grid Widget Effective Monitoring Configuration Dashboard
http://blogs.msdn.com/b/tysonpaul/archive/2014/07/24/operations-manager-2012-r2-ur2-powershell-grid-widget-effective-monitoring-configuration-dashboard.aspx
New PowerShell Grid Widget Walkthrough
http://blogs.technet.com/b/stefan_stranger/archive/2014/04/28/new-powershell-grid-widget-walkthrough.aspx
Regards,
Yan Li
Regards, Yan Li

Similar Messages

  • How do you reference assembly resources from MP in PowershellGrid Widget script

    Instead of shipping my custom assemblies to a known location on the system center 2012 server in separate files, I'm trying to use assembly resources to do this.  The issue I am having is referencing these assemblies in the script for the PowershellGrid
    widget I am using.
    As suggested in technet answer -
    https://social.technet.microsoft.com/Forums/systemcenter/en-US/e752fb63-0d5f-43e3-a2be-7db54934e29a/how-to-use-attached-to-bundle-dll-resource-in-powershell-module?forum=operationsmanagerauthoring
    I am using this convention -
    $FileResource[Name=”MyResource”]/Path$
    To illustrate what I am using, I've put in an exception to try and return the assembly path -
    throw "Test that the Assembly Path is returned:" + "$FileResource[Name='PaulsMP!DSUtilsTest']/Path$"
    Part of the exception is the following where you can see the Path$ has not been translated -
      [Microsoft.SystemCenter.Visualization.Component.Library.DataProviders.PowershellProvider,
    Microsoft.SystemCenter.Visualization.Component.Library.DataProviders, Version=7.0.5000.0, Culture=neutral,
    PublicKeyToken=31bf3856ad364e35].Test that the Assembly Path is returned:[Name='PaulsMP!DSUtilsTest']/Path$ ---> 
    So the questions are - can these assembly resources be referenced in Powershell grid widget scripts and if so, what is the syntax?
    BTW, my MP resources fragment looks like this - 
    <Resources>
    <Assembly ID="DSUtilsTest" QualifiedName="DSUtilsTest1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" FileName="DSUtilities.dll" Accessibility="Public" HasNullStream="false"
    />
    </Resources>
    Many Thanks,
    Paul  

    Paul,
    I was unable to find info specific to the issue you are hitting, however I've found the following links that I believe can help you:
    http://www.systemcentercentral.com/scom-2012-create-an-mpb-to-deploy-files-using-vsae/
    http://overcast.fehse.ca/2014/08/scom-management-pack-bundles-and-vsae
    hth,
    Jose

  • Question regarding Dashboard and column prompt

    My question regarding Dashboard and column prompt:
    1) Dashboard prompt usually work with only for columns which are in subject area. In my report I've created some of the columns which are based on other columns. Like I've daysNumber column that is based on two other columns, as it calculates the difference of two dates. When I create dashboard prompt I can't find this column there. I need to make a prompt on this column.
    2)For one of the column I've only two values 1 and 0. When I create prompt for this column, is it possible that in drop down list It shows 'Yes' for 1 and 'No' for 0 and still filter the request??

    Hi Toony,...
    I think there was another way of doing this...
    In the dashboard prompt go to Show option > select SQL Results from dropdown.
    There you need to write your Logical SQL like...
    SELECT CASE WHEN 1=0 THEN PERIODS.YEAR ELSE difference of date functionality END FROM SubjectAreaName
    Here.. Periods.Year is the column which is already exists in repository's presentation layer..
    and difference of date functionality is the code or formula of column which you want to show in drop-down...
    Also write the CASE WHEN 1=0 THEN PERIODS.YEAR ELSE difference of date functionality END code in fx of that prompt.
    I think it helps you in doing this..
    Just check and inform me if it works...
    Thanks & Regards
    Kishore Guggilla
    Edited by: Kishore Guggilla on Oct 31, 2008 9:35 AM

  • How do I add a photo (widget) to my Dashboard?

    How do I add a photo (widget) to my Dashboard?

    What widget are your referring to? If you simply Google "Add Widget to Dashboard" you will find lots of instruction sites.

  • How do I install widgets from the dashboard onto the desktop?

    I would like to be able to add a few widgets from the Dashboard to my desktop, but I cant do it. I have gone to the terminal, antered the command
    sudo defaults write com.apple.dashboard devmode YES
    then
    killall Dock
    clicked on a widget clicked on F12 and the sound icon appears on the screen and it alarms and it wont move the widget to the desktop
    How can I get it to work
    thanks

    ok, my apologies......one I completely forgot about this, as it took so long to be answered.......2, I got no notification via e-mail that a response had been posted......3, I 'found an app for that' which was another reason I forgot about this thread......1st two reasons not exactly my fault for not responding.....this whole thread hasnt exactly helped....
    But I can help now, as I said there 'is an app for that' and its found here.....and by the way, he has updated it and has made it free and open source, and it works a dream......
    http://www.mesadynamics.com/
    hope that helps
    p.s. please dont be so arsey, especially when a thread like this is not really much help at all, it really doesnt help

  • Widgets in my dashboard (created by Safari) are randomly becoming blank.

    Widgets in my dashboard are randomly becoming blank. These widgets were added through Safari (using file>add to dashboard option). I see the content of the widget briefly while it is flipping over if I select the mode but otherwise it shows as blank window. For example, I have set up multiple dashboard widgets (created by Safari) showing different traffic camera views. 1/3 of them work and the other 2/3's are blank.
    Any suggestions?

    These widgets work best when you have a strong internet connection. You could try reloading the widgets by pressing Command-r.

  • Problem with widget download on Dashboard

    I can't download widgets on my Dashboard. My security preferences don't permit widget downloads. What can I do?

    One work-around would be to unlock the window, change the setting to "Anywhere" then install your widgets, then put the setting back to where it was. (The fact that the window re-locks itself is normal.) 
    But, you should be able to authorize the opening of the widgets on a case by case basis using the open command in the menu which appears when you control click on the widget.  I just tried it to be sure. I downloaded a widget, I control-clicked it, then I selected "Open". I then got this (without the red oval):
    This doesn't happen for you?

  • My widgets on my dashboard aren't working. I've tried restarting my computer, and they're still unresponsive.

    My widgets on my dashboard aren't working. I've tried restarting my computer, and they're still unresponsive. Any solutions?

    Sign out of iMessage
    Reset your phone -  no data loss is involved Restart or reset your iPhone, iPad, or iPod touch - Apple Support
    Then sign back into iMessage
    Also open a video in YouTube (playing a video in Safari in YouTube will do if you do not have the app) - check the ringer to see the volume level
    Make sure Do not Disturb is not turned on, on your phone

  • I could not see my widgets on my dashboard

    i installed a couple of widgets on my dashboard, a couple of defaults and some i downloaded from the apple widget page, they were fine (i could see them) the first time i installed them and then I put my iMac to sleep...when I went back to do some more work...my widgets that i just installed and kept would not appear anymore. i used the mighty mouse and the dashboard icon on the dock to access my widgets but they would not appear at all. I restarted the iMac thinking it would come back but it didnt. When I tried adding more widgets just to test it, by dragging the widgets to the dashboard, it would not add. I could not find an article that could help me, maybe there is someone out there who can. thanks...

    I found some additional information from apple and other users. Appears that this is a bug with Leopard. Until a fix is available, what you need to do is disable "fast switching" between users. Then disable any parental controls on an account. Then you can go back and activate parental controls.
    Seemed to work for me.
    Good luck

  • Locking Widget Positions in Dashboard

    Hi,
    Is there a way for me to lock the positions of my widgets in the dashboard? I've arranged them in a particular manner and I don't want to accidentally move them. For instance, when clicking a post-it so that I may type on it, often times I'll accidentally move it. So I want to be able to lock them in place, so that they cannot be moved unless unlocked.
    There was another post about this... but it was quickly side-tracked and never really discussed the issue.

    I use two weather widgets. They kept moving down so this is what i did to fix it.
    1. Open terminal app
    2. type cd /Library/Widgets/Weather.wdgt and then hit enter
    3. type sudo vi Weather.js and hit enter
    4. type :set nu and enter. This will show the line numbers.
    5. type 484G and no enter. This will move the cursor to line 484 which is
                   var y = (window.screenY + lastTopOffset) - (isReloadedWidget ? 0 : topOffset);
    6. hit i to start typing as currently it wont be typing and change the above line to
                   var y = (window.screenY + lastTopOffset) - (isReloadedWidget ? topOffset : topOffset);
         that is change 0 to topOffset.
    7. type :wq and enter.

  • How do I moves the widgets from the dashboard to the desktop?

    How do I move my widgets from the dashboard to the desktop?

    Yes, you can. All you need to do is do a Spotlight search for Terminal and open the application Terminal. After launching Terminal, type the following:
    defaults write com.apple.dashboard devmode YES
    Then hit return. Nothing will happen. The next step is to type the following command into Terminal:
    killall dock
    Then press return. Your dock will disappear momentarily.
    Once your dock reappears, press F12 (the keyboard command to bring up Dashboard). Then begin dragging the widget that you would like to have on your desktop. Continue dragging it—don't let to—and press F12 again. Voila! It's on your desktop. You can get it off by dragging it and pressing F12, just like you do to get it on.
    Hope that helps! :)

  • Where should i direct this question about dashboard and widgets?

    i have a question about the dashboard and widgets, but i have no clue where to ask?
    thanks.

    Hi,
    I advise you to use http://discussions.apple.com/forum.jspa?forumID=751 which is the area for dashboard
    volker

  • Widgets frozen in Dashboard

    hello all,
    Tiger has been running perfect on my iBook until the other day.. when for no apparent reason (I woke the comp. up from sleep, and it worked before setting it to sleep) Dashboard had stopped working properly.
    Basically, all the widgest had frozen, in the sense that I couldn't move them, and they didn't load up. After much trying, I finally managed to remove all the widgets and then reinstate them again, but the "manage Widget" widget that pops up in the middle of the screen is stuck, not only that but there is two of them stuck.
    Does anyone have any idea what I can do about this??
    any help, much appreciated

    is this the forbidden subject or something. I ask because I have noticed quite a few other posts asking similar questions and they never seem to get any replies. As that just because no one knows how to solve the problem or what?

  • Webpage not continually updating in widget on mac dashboard.

    Hi,
    I used the 'File -> Open in Dashboard ...' feature in Safari to add a webpage to the dashboard so that I can keep my dashboard open on the server and monitor the webpage along with a few other items.
    However the webpage is always being updated and I noticed that after awhile the webpage stops changing, and it's almost as if the widget goes to sleep. If I reconnect to the server and move my mouse, it seems to wake the webpage up again, however I don't want to have to keep 'waking' up the dashboard every few minutes during the day.
    Is there anyway to keep the dashboard webpage widget from going to sleep? Are there any settings that will keep the widget active even if there has been no activity on the server for hours? Or does anyone have any recommendations for a different widget that doesn't exhibit this behavior?
    Thanks

    Open in Dashboard has always been a little iffy, IMHO.  An alternative workaround to the one you described is to click on the widget window and hit command-r.
    charlie

  • Unable to add a performance widget to a dashboard in SCOM 2012

    When trying to select a group or object when attempting to configure a new performance widget within a SCOM 2012 dashboard, I get the following error. Anybody any ideas what is causing this issue in my instance of SCOM 2012?
    This is part of a custom built Management Pack and a Distributed Application linking just three computers together.
    Any help would be welcomed.
    Please provide the following information to the support engineer if you have to contact Microsoft Help and Support :
    Microsoft.EnterpriseManagement.Presentation.DataAccess.DataAccessDataNotFoundException: Exception reading objects ---> Microsoft.EnterpriseManagement.Common.UnknownDatabaseException: The query processor ran out of internal resources and could not produce
    a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support
    Services for more information.
       at Microsoft.EnterpriseManagement.Common.Internal.ServiceProxy.HandleFault(String methodName, Message message)
       at Microsoft.EnterpriseManagement.Common.Internal.EntityObjectsServiceProxy.GetManagedEntitiesByManagedEntityTypesAndCriteriaWithInstanceQueryOptions(IList`1 managedEntityTypeIds, IList`1 managedEntityBaseTypeIds, IList`1 criterias, String languageCode,
    InstanceQueryOptions instanceQueryOptions)
       at Microsoft.EnterpriseManagement.InstancesManagement.GetObjectsReaderInternal[T](ICollection`1 criteriaCollection, ObjectQueryOptions queryOptions)
       at Microsoft.EnterpriseManagement.Management.DataProviders.ManagedEntityProvider.GetManagedEntitiesByClass(ICollection`1 baseTypeNames, String criteriaString, List`1 valueDefinitions, List`1 sortValueDefinitions, Int32 maxEntities, String typePropertyName,
    String typeWithIconPropertyName, Boolean propertyCollectionRequested)
       --- End of inner exception stack trace ---
       at Microsoft.EnterpriseManagement.Presentation.DataAccess.DataProviderCommandMethodInvoker.Invoke()
       at Microsoft.EnterpriseManagement.Monitoring.DataProviders.RetryCommandExecutionStrategy.Invoke(IDataProviderCommandMethodInvoker invoker)
       at Microsoft.EnterpriseManagement.Presentation.DataAccess.DataProviderCommandMethod.Invoke(CoreDataGateway gateWay, DataCommand command)
       at Microsoft.EnterpriseManagement.Presentation.DataAccess.CoreDataGateway.ExecuteInternal[TResult](DataCommand command)
       at Microsoft.EnterpriseManagement.Presentation.DataAccess.CoreDataGateway.<ExecuteAsync>b__0[TResult](<>f__AnonymousType0`1 data)

    What is your SCOM version and patch level?
    For SCOM 2012 SP1, there is known issue that:
    When you select objects on the dashboard, you receive the following error message:
    Microsoft.EnterpriseManagement.Presentation.DataAccess.DataAccessDataNotFoundException: Exception reading objects ---> Microsoft.EnterpriseManagement.Common.UnknownDatabaseException: The query processor ran out of internal resources and could not produce
    a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions.
    This can be resolved by apply UR4
    https://support.microsoft.com/en-us/kb/2879276/
    Roger

Maybe you are looking for