Dynamic Group containing maintenance mode devices

Hi,
I am using a scheduled script to put a large number of items in maintenance mode for periods of time where we do not which to receive alerts or cause DA state changes. For these objects, the time is overnight or weekends.
The script adds all objects in a dynamic group into maintenance mode. This includes both windows and network devices.
My issue is that when an engineer manually puts an item into maintenance mode for genuine maintenance purposes, it may be overridden. 
So my idea is to have another dynamic group containing all objects in maintenance mode, and make it an exclusion in the original group. Is this possible or is there a better way?
FYI The script I am using for the bulk maintenance mode is based from here:
http://www.systemcentercentral.com/opsmgr-2012-group-maintenance-mode-via-powershell-the-way-it-should-be/

Hi,
We can use below command to get all members in a group:
$Groups = Get-MonitoringObjectGroup  
$Group = $Groups | where {$_.DisplayName -eq "Group Name"}   
$Members = $Group.GetRelatedMonitoringObjects()   
And with below command we could get all members that in maintenance mode:
$Members | where{$_.inmaintenancemode -eq $true}
With set-SCOMMaintenanceMode command we can update active maintenance mode entries.
http://technet.microsoft.com/en-us/library/hh920197(v=sc.20).aspx
Regards, Yan Li

Similar Messages

  • SCCM 2012 Software Update Management for Windows Servers and how to automatic set SCOM maintenance mode?

    Hi,
    We planning to go one level higher to automat and have more dynamic Software Update Management for Windows Servers. We have SCCM 2012 R2, SCOM 2012 R2 and SCO 2012 R2.
    Our plan is to pur server in an AD-Group to get Update Schedule, from the servers will be importet to an Collection for Automatic Update and reboot. If I understand Everything right SCOM can't read AD-Group and put then in an Schedule maintenance mode. SCOM
    can read reg value as exempel.
    IS there any smar way to make the SCOM Maintenance Mode Schedule dynamic?
    I found this
    http://www.scom2k7.com/scom-2012-maintenance-mode-scheduler/?
    /SaiTech

    You could use Orchestrator to put the servers from a specific collection, or AD group, in maintenance mode in SCOM. For an example see:
    http://www.systemcentercentral.com/orchestrator-how-to-scom-maintenance-mode-for-windows-computers-in-an-sccm-collection/
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • SCOM 2012 Maintenance Mode PowerShell Script Problems

    I've seen other questions about this topic before, but none of them seem to address my specific problem, so I am starting a new thread.
    I am writing a script to put a single server (not a group) into maintenance mode.   Here is the command that it ultimately tries to call:
     Start-SCOMMaintenanceMode-Instance$Instance-EndTime$EndTime-Reason$Reason-Comment$Comment     
    So an exmaple would look like this:
    Start-SCOMMaintenanceMode -Instance "$Instance -EndTime "02/03/2014 15:26:00" -Reason "PlannedOther" -Comment "Testing Maintenance Mode"
    When my script tries to run this command, this is the error message that I get:
    Start-SCOMMaintenanceMode : Start time must be before end time for maintenance mode.
    Parameter name: startTime
    At C:\users\x036036\Desktop\Start-SCOMMaintenanceModeForServer.ps1:143 char:21
    +                     Start-SCOMMaintenanceMode -Instance $Instance -EndTime $EndT ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (Microsoft.Syste...anceModeCommand:StartSCMaintenanceModeCommand) [Start-SCOMMaintenance
       Mode], ArgumentOutOfRangeException
        + FullyQualifiedErrorId : ExecutionError,Microsoft.SystemCenter.OperationsManagerV10.Commands.StartSCMaintenanceModeCommand
    I've tried to look at Start-SCOMMaintenanceMode help online, but I don't see that "startTime" is a parameter.  So what is this error message talking about?  What am I missing?  

    Thanks for your help.   I didn't see your response until just now, but I have been playing around with this all since my last response.   I got it to work.  I wish I could pinpoint what exactly I changed to get it to work, but I
    feel like I've been changing so much stuff that I'm not sure any more.
    Just in case anyone finds it useful, here is the code.
    [CmdletBinding(SupportsShouldProcess=$true)]
    param
    [Parameter(Mandatory=$True,
    ValueFromPipeline=$True,
    ValueFromPipelineByPropertyName=$True,
    HelpMessage='What is the server you want to put in Maintenance Mode?')]
    [Alias("Server")]
    [string[]]$ServerName,
    [Parameter(Mandatory=$True,
    ValueFromPipeline=$false,
    ValueFromPipelineByPropertyName=$True,
    HelpMessage='Specifies the time the maintenance will end. The minimum amount of time a resource can be in maintenance mode is 5 minutes. This is a required parameter. Format is 1/29/2014 8:59:26 AM')]
    [Datetime]$end,
    [Parameter(Mandatory=$False,
    ValueFromPipeline=$True,
    ValueFromPipelineByPropertyName=$True,
    HelpMessage='PlannedOther, UnplannedOther, PlannedHardwareMaintenance, UnplannedHardwareMaintenance, PlannedHardwareInstallation, UnplannedHardwareInstallation, PlannedOperatingSystemReconfiguration, UnplannedOperatingSystemReconfiguration, PlannedApplicationMaintenance, ApplicationInstallation, ApplicationUnresponsive, ApplicationUnstable, SecurityIssue, LossOfNetworkConnectivity')]
    [string]$Reason,
    [Parameter(Mandatory=$False,
    ValueFromPipeline=$True,
    ValueFromPipelineByPropertyName=$True,
    HelpMessage='Allows you to type a comment about the maintenance activity.')]
    [string]$Comment,
    [switch]$EventLog
    set-strictmode -version latest
    #$start=Get-Date
    #$currentlog = $start.ToString()
    Write-Verbose "Starting $($myinvocation.mycommand)"
    Write-Verbose "Ready to put ServerName $ServerName in Maintenance Mode"
    Function Start-SCOMMaintenanceModeForServer
    [CmdletBinding(SupportsShouldProcess=$true)]
    param
    [Parameter(Mandatory=$True,
    ValueFromPipeline=$True,
    ValueFromPipelineByPropertyName=$True,
    HelpMessage='What is the server you want to put in Maintenance Mode?')]
    [Alias("Server")]
    [string[]]$ServerName,
    [Parameter(Mandatory=$True,
    ValueFromPipeline=$false,
    ValueFromPipelineByPropertyName=$True,
    HelpMessage='Specifies the time the maintenance will end. The minimum amount of time a resource can be in maintenance mode is 5 minutes. This is a required parameter. Format is 1/29/2014 8:59:26 AM')]
    [Datetime]$end,
    [Parameter(Mandatory=$False,
    ValueFromPipeline=$True,
    ValueFromPipelineByPropertyName=$True,
    HelpMessage='PlannedOther, UnplannedOther, PlannedHardwareMaintenance, UnplannedHardwareMaintenance, PlannedHardwareInstallation, UnplannedHardwareInstallation, PlannedOperatingSystemReconfiguration, UnplannedOperatingSystemReconfiguration, PlannedApplicationMaintenance, ApplicationInstallation, ApplicationUnresponsive, ApplicationUnstable, SecurityIssue, LossOfNetworkConnectivity')]
    [string]$Reason,
    [Parameter(Mandatory=$False,
    ValueFromPipeline=$True,
    ValueFromPipelineByPropertyName=$True,
    HelpMessage='Allows you to type a comment about the maintenance activity.')]
    [string]$Comment,
    [switch]$EventLog
    Begin
    Write-Verbose "Starting Function Start-SCOMMaintenanceModeForServer"
    #Check for minumum Maintenance mode period of 5 mins.
    $start = Get-Date
    $5MinFromNowTime = $start.AddMinutes(5)
    #$end = [datetime]$end
    $end = $end.AddSeconds(5)
    if($end -lt $5MinFromNowTime)
    Write-Error "The time span for the maintenance mode should be at least 5 minutes." -ErrorAction Stop
    Write-Verbose "Following server will be put in Maintenance Mode: $ServerName"
    $MSs = Get-SCOMManagementServer
    } #End Begin
    Process
    Write-Verbose "Checking if server $ServerName is a Management Server"
    #Write-Verbose ($MSs | Select DisplayName)
    if(($MSs | Select DisplayName) -eq $ServerName)
    Write-Verbose "We don't want to put a Management Server in Maintenance Mode. Skipping"
    else
    Write-Verbose "Let's put server $ServerName in Maintenance Mode"
    $Instance = Get-SCOMClassInstance -Name $ServerName
    if ($PSCmdlet.ShouldProcess("Putting $ServerName in Maintenance Mode until $($end).") )
    Write-Verbose ("Start-SCOMMaintenanceMode -Instance " + $Instance + " -EndTime " + $end + " -Reason " + $Reason + " -Comment " + $Comment)
    Start-SCOMMaintenanceMode -Instance $Instance -end $end -Reason $Reason -Comment $Comment
    }#End of whatif
    }#End of else
    if ($PSBoundParameters['EventLog'])
    write-eventlog -LogName "Operations Manager" -Source "OpsMgr SDK Service" -EventID 999 -message "The following Objects are put into in Maintenance Mode until $($end) : $($ServerName)"
    }#End if
    } #End Process
    End
    Write-Verbose "Finished Function Start-SCOMMaintenanceModeForServer Function"
    #Main
    try
    if ($PSBoundParameters['EventLog'])
    write-eventlog -LogName "Operations Manager" -Source "OpsMgr SDK Service" -EventID 998 -message "The $($myinvocation.mycommand) is used to put Objects in Maintenance Mode"
    Write-Verbose "Checking if OperationsManager Module is loaded"
    #Check if OperationsManager Module is loaded.
    if(!(Get-Module OperationsManager))
    Write-Verbose "Importing OperationsManager Module"
    Import-Module OperationsManager -ErrorAction Stop
    Write-Verbose "Checking for OM2012 environment"
    #Check if OM2012 is being used.
    if(!(Get-Module OperationsManager).Description -eq "Operations Manager OperationsManagerV10 Module")
    Write-Error "This script is only for OM2012"
    #Call Function
    if ($PSBoundParameters['EventLog'])
    Start-SCOMMaintenanceModeForServer -ServerName $ServerName -end $end -Reason $Reason -Comment $Comment -EventLog
    else
    Start-SCOMMaintenanceModeForServer -ServerName $ServerName -end $end -Reason $Reason -Comment $Comment
    } #End Try
    catch [System.IO.FileNotFoundException]
    "OperationsManager Module not found"
    $_.Exception.Message
    catch
    Write-Warning "Oops something went wrong"
    $_.Exception.Message
    $end=Get-Date
    Write-Debug ("Total processing time {0}" -f ($end-$start).ToString())
    Write-Verbose "Ending $($myinvocation.mycommand)"
    There is one remaining problem with this script.   It does not correctly check to see if something is a management server. We have two management servers. These are the applicable lines, which I still haven't gotten to work yet. First, this retrieves
    the list of my Management servers:
    $MSs=Get-SCOMManagementServer     
    Next, these lines are supposed to check if the server I specified is a management server:
    if(($MSs | Select DisplayName) -eq $ServerName)
    Write-Verbose "We don't want to put a Management Server in Maintenance Mode. Skipping"
    Thanks to the Intellisense pop-up deal, I can see that $MSs does get my two management servers. And I can clearly see that there is a DisplayName column. And I can also see that the $ServerName does match what I put in my command line.   But it doesn't
    seem to catch them if they are actually equal to each other. I don't know if it's because there's two Management Servers, and it doesn't know how to compare like that? Any idea? Is there some sort of loop I need to write so that it compares is to the DisplayName
    for EACH Management Server it finds? Any help would be greatly appreciated.

  • SCOM 2012 - Use Powershell to put specific server and contained objects into Maintenance Mode

    I am still trying to develop what I thought was going to be an easy script, to put a specific server and all it's contained objects into maintenance mode in SCOM 2012.   Not a group, but just one specific server and all it's stuff.
    My script to START maintenance mode has two parameters:
    1.  The FQDN.  So for example: server1.contoso.com
    2.  The amount of minutes to put into maintenance mode
    Then it does the following to START maintenance mode:
    Import-Module OperationsManager
    $Instance = Get-SCOMClassInstance -Name $FQDN
    If ($Instance)
    $newEnd = ((Get-Date).AddMinutes($minutes))
    Start-SCOMMaintenanceMode -Instance $Instance -end $newEnd -Reason "PlannedOther" -Comment "Comments here"
    This seems to work from what I can tell.  I know that when you schedule maintenance mode manually in SCOM, there is an option to apply to "Selected objects and all their contained objects".  I do not know if that is occurring based on
    my code above.   But I think that is what I want to happen.   I just want all monitoring and alerting for the specified server to stop.   So if you think I need to change the above code so that it gets all the "contained
    objects" please let me know.
    The second part, which I know for a fact isn't fully working, is intended to stop maintenance mode for a server.
    My script to STOP maintenance mode has only one parameter:
    1.  The FQDN.  So for example: server1.contoso.com
    Then it does the following to STOP maintenance mode:
    Import-Module OperationsManager
    $Instance = Get-SCOMClassInstance -Name $FQDN
    If ($Instance)
    $MMEntry = Get-SCOMMaintenanceMode -Instance $Instance
    If ($MMentry)
    #basically sends an end time of 1 minute from when the script is run
    $newEnd = ((Get-Date).AddMinutes(1))
    Set-SCOMMaintenanceMode -MaintenanceModeEntry $MMEntry -EndTime $NewEnd -Comment "Removing from Maintenance Mode"
    This part does seem to work partially.   It does remove the server from maintenance mode.  However, I suspect that it's not removing all the "contained objects" from maintenance mode because when I run the script to stop maintenance
    mode on a server, the little maintenance mode icon in SCOM does go away but the overall light for the server stays set to "Not Monitored".   It never turns back to the green checkbox and says "Healthy".   When I start
    and stop maintenance mode manually I can see that the green Healthy checkbox comes back.  But when I try to run my above code to do it via script, it stays at "Not Monitored" instead.
    Can someone help me out here?  Looking for answers to two questions:
    1.  Does my Start maintenance mode code look ok? Will that put a server and all it's contained objects into maintenance mode?
    2.  What do I need to hadd to my Stop maintenance mode code, so that it correctly stops maintenance mode on the server and all its objects and everything starts to be monitored again?
    Thanks in advance!  Please let me know if you need any more information in order to be able to help me!

    Hello, thanks for your response.  Unfortunately, it does not appear that the link you provided works.
    As far as not including "selected objects and all their contained objects" I am wondering if there is a way for me to tell for sure. One thing I found was that if I run this script and put the server into maintenance mode, then I go into
    SCOM and click on Edit Maintenance Mode for that server, it shows me the details.   It has some comment, and my selected reason, based on the code I posted above.   It also DOES have "selected objects and all their contained objects"
    selected at top.  So it seems to me like it is working correctly, and does contain all the objects.   If you think that 'Edit' screen would be inaccurate for some reason, please let me know.  Or if you know of a way for me to check and
    confirm, please let me know that as well.
    As for REMOVING it from maintenance mode, I did eventually find a line of code that I think works.  Here's what my code looks like now:
    Import-Module OperationsManager
    $Instance = Get-SCOMClassInstance -Name $FQDN
    If ($Instance)
    $MMEntry = Get-SCOMMaintenanceMode -Instance $Instance If ($MMentry)
    $Instance.StopMaintenanceMode([DateTime]::Now.ToUniversalTime(),[Microsoft.EnterpriseManagement.Common.TraversalDepth]::Recursive);
    When I use the above code to STOP maintenance mode, the green checkmark does reappear for the server, and everything seems to be being monitored again.   Unlike before, where the maintenance mode icon would go away, but it would never change back
    to saying 'Monitored' again.  So I think that changing that one line to stop maintenance mode seems to have done the trick.
    So I guess my last concern now is just putting in maintenance mode initially, as I was talking about above.  If you still think the 'Edit Maintenance Mode' screen is not a good indicator of what my code does, please let me know.

  • LMS 2.6 dynamic groups with wildcards

    Is is possible to build dynamic groups in RME using wildcards or regular expresions? The rules that I want to define would look similar to the following:
    Device.System.Name StartsWith "SW" AND (
    Device.System.Name contains "........X" OR
    Device.System.Name contains "........Y" OR
    Device.System.Name contains "........E" OR
    Device.System.Name contains "........Z")
    Where the device name begins with SW and there is either an X, Y, E or Z in the 8th position of the device name.

    This is not possible. The ruleset matching is based only on the operators available for the given property.
    The best workaround I can give you is to apply your first rule, then manually adjust the membership list based on the other rules. The downside of this is that the membership list would require modification when you add new devices.

  • FWSM maintenance mode - vlan 1

    Hi,
    A client has had their FWSM fail, when you try to start the module the switch eventually disables the power to that slot (%C6KPWR-SP-4-DISABLED: power to module in slot 4 set off (Module  Failed SCP dnld)). I have turned off diagnostics with 'no diagnostic boot level' and then use 'boot device module 4 cf:1' to bring the FWSM up into maintenance mode. I can then session up from the switch and log in to the FWSM as root.
    After inputting all the necessary IP info I can't ping anything on vlan 1 as I would expect, I have set the FWSM as 192.168.1.2 and a FTP/TFTP server as 192.168.1.1
    I have removed the firewall vlan groups and tried to put them back with just vlan 1 but this isn't accepted (the reasons are covered in other posts on the forum). What am I doing wrong as the instruction say that vlan 1 is the only vlan that is accessable whilst the FWSM is in maintenance mode.
    I can create an int vlan 1 in the switch and ping my ftp server so know that the switchport is set up correctly, I can also see that Po308 is formed and when the module boots I can see the Gi4/xx interfaces come up (FWSM is in slot 4).
    Any ideas of what to try next?
    ............and they aren't covered by maintenance agreements
    FWSM
    Maintenance image version: 2.1(4)
    [email protected]#show images
    Device name             Partition#              Image name
    Compact flash(cf)       4                       c6svc-fwm-k9.3-1-4-0.bin
    Switch
    SWITCH# sh ver
    Cisco IOS Software, s72033_rp Software (s72033_rp-ADVIPSERVICESK9_WAN-M), Version 12.2(33)SXI7, RELEASE SOFTWARE (fc1)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2011 by Cisco Systems, Inc.
    Compiled Mon 18-Jul-11 05:49 by prod_rel_team
    ROM: System Bootstrap, Version 12.2(17r)SX7, RELEASE SOFTWARE (fc1)
    Regards
    Mel

    Recently i met the same problem.
    When installing FWSM board on the Catalyst 6509 there is not communication access via vlan1 in the maintenance partition.
    Moreover, the FWSM works properly in the aplication partition(cf:4).
    Cisco IOS Software, s72033_rp Software (s72033_rp-ADVENTERPRISEK9_WAN-M), Version 12.2(33)SXH8, RELEASE SOFTWARE (fc1)
    System Bootstrap, Version 12.2(17r)SX5, RELEASE SOFTWARE (fc1)
    Mod Ports Card Type                              Model             
      1   48  48-port 10/100/1000 RJ45 EtherModule   WS-X6148A-GE-TX   
      4    6  Firewall Module                        WS-SVC-FWM-1      
      5    2  Supervisor Engine 720 (Active)         WS-SUP720-3BXL    
      8    5  Communication Media Module             WS-SVC-CMM        
    Mod MAC addresses                       Hw    Fw           Sw           Status
      1  001b.d41a.8360 to 001b.d41a.838f   1.5   8.4(1)       8.7(0.22)BUB Ok
      4  0003.fead.962e to 0003.fead.9635   3.0   7.2(1)       4.1(14)      Ok
      5  0017.9444.c3ec to 0017.9444.c3ef   5.4   8.5(2)       12.2(33)SXH8 Ok
      8  0017.0ee2.13cc to 0017.0ee2.13d5   2.8   12.4(25c),   12.4(25c),   Ok
    FWSM versions
    FWSM Firewall Version 3.2(20)
    Device Manager Version 5.0(3)F
    Not possible to verify the switch is in the service.
    I guess the reason is likely next.
    FWSM supports only untagged packets on the vlan1. By default catalyst 6500 not tagged native vlan1.
    In my case globally enabled tagging  in the native vlan.
    #sh vlan dot1q tag native
    dot1q native vlan tagging is enabled globally
    sh vlan dot1q tag native
    dot1q native vlan tagging is enabled globally
    Per Port Native Vlan Tagging State:
    Port    Operational          Native VLAN
               Mode               Tagging State
    Gi1/2   trunk                 enabled
    Gi1/8   trunk                 enabled
    Gi1/13  trunk                 enabled
    Gi1/14  trunk                 enabled
    Gi1/17  trunk                 enabled
    Gi1/18  trunk                 enabled
    Gi1/21  trunk                 enabled
    Gi1/27  trunk                 enabled
    Gi1/30  trunk                 enabled
    Gi1/32  trunk                 enabled
    Gi1/38  trunk                 enabled
    Gi1/42  trunk                 enabled
    Gi1/43  trunk                 enabled
    Gi1/44  trunk                 enabled
    Gi1/46  trunk                 enabled
    Gi5/2   trunk                 enabled
    Po2     trunk                 enabled
    Po308   trunk                 enabled

  • Need to place the SCOM agents in Maintenance Mode automatically during Patching activity

    Hi,
    I have a requirement to place the SCOM agent servers in MM automatically during shceduled patching every month. I have gone through few blogs but could not find an apt solution for SCOM 2012 R2 environment.
    I think the process should be..
     1. Create a management pack to monitor all servers for event 1074 (or/and 22), which gets triggere during the patching
     2. Write some powershell to put a machine into maintenance mode.
     3. Trigger the powershell script to run when needed.
    Any suggestions please?
    Thanks

    Where doing this in our environment. We have a SCOM monitor looking for Reboot events (ID 1074) where the event contains Shutdown Type: Reboot. the monitor creates an Informational alert which Orchestrator picks up and then sets the machine in MM for 30
    minutes. So its any time the machine is intentionally rebooted. You can have it look for CcmExec in the Event description (assuming you're using SCCM) if you only want it to work when being patched. 
    - Slow is smooth and smooth is fast.

  • Maintenance Mode never ends

    I want to put a scom gruop into Maintenance. The Management Server is not member of it.
    When I use the following Powershell Script with SCOM 2012....
    Import-Module OperationsManager
    $Instance = Get-SCOMGroup -displayname "<Group>"
    $Time = ((Get-Date).AddMinutes(90))
    Start-SCOMMaintenanceMode -Instance $Instance -EndTime $Time -Comment "Automatic WSUS Updates" -Reason "PlannedOperatingSystemReconfiguration"
    ....the Maintenance mode never ends. I have to stop the mode manually. When I use the SCOM Console everything is fine.

    In my environment, it works but may be in some delay. Moreover, you can use get-scommaintenancemode to watch whether the maintenace mode and schedule end time is correct.
    You may be refer to Pete Zerge blog "r OpsMgr 2012: Group Maintenance Mode via PowerShell"
    http://www.systemcentercentral.com/opsmgr-2012-group-maintenance-mode-via-powershell-the-way-it-should-be/
    Roger

  • Dynamic Group Resolution Limit?

    We recently created a few dynamic groups to assign certain roles and access automatically. I have it set up to resolve these groups via a script that runs at the end of a maintenance job.
    The issue we encountered upon our initial load was that it would only add 1000 users at a time via the script. Is there a setting somewhere in the console that puts this limit in place?
    Alternatively, I tried to resolve the group from the group properties themselves. This also failed as it gave me a time out message; however it would not allow me to retry because a process to resolve the group was already running! Has anyone encountered this and found a way to terminate that process?
    I was just wondering if anyone else had encountered these issues and how they resolved them.
    Thanks,
    Jared

    Yes, on the initial load, they will only load 1000 at a time. We ran into this problem too (had one group of 12,000 people) but just ran it 13 times using Right Click -> Recalculate.
    When they crash or deadlock, they will claim to still be running for a long time. This is because of the way they do locking:
    1) When the recalculation starts, it chcecks the ModifyTime column on the attribute "MX_DG_AUTORESOLVE_INTERVAL" for that Dynamic Group. If it is in the past, it continues to step two, otherwise it aborts with the error saying it is already running.
    2) It sets the ModifyTime on that attribute to a future date (I forget how long exactly, but we're talking about DAYS in the future).
    3) It does the calculations.
    4) It sets the ModifyTime to the time it finished.
    So, you see the problem -- when it crashes, the time remains far in the future.
    You mentioned you run the update from a script, and that is what we do too. There is supposed to be a way to trigger the calculation based on an Attribute Change, but the feature does not work as documented in the manual. Frustrating...
    Anyway, this is how I get around the issue in our script:
    function recalcInternetGroups(Par){
         uSleep(10000); //Give any previous attempts at least 10 seconds to finish resolving
         importPackage(Packages.com.valero.idm);
         var sqlClass = new SQLServerConnection();
         var SQL = "Select MSKEY FROM dbo.MXIV_SENTRIES WHERE searchvalue LIKE 'INTERNET_LEVEL_%' AND attrname = 'MSKEYVALUE'"
         groups = uSelect(SQL);
         var result = groups.split('!!');  //We have 9 INTERNET_LEVEL groups, refresh them all
         for (var i=0; i<result.length; i++) {
              dynamic_group = result<i>;
              // Manually set the date into the past (picked the date I wrote this script, as it doesn't matter how far in the past)
              var sql2 = "update MXI_VALUES set Modifytime = '2010-10-15 00:00:00.000' where MSKEY = " + dynamic_group + " and Attr_ID = 33";
              var resultUpdate = '' + sqlClass.uUpdate(sql2);
              recalc = uIS_ResolveDynamicGroup(dynamic_group);
              if (recalc.indexOf("ERROR")>0) {
                   uError("Recalculating " + uIS_GetValue(dynamic_group, uGetIDStore(), "MSKEYVALUE"));
                   uError(recalc);
              } else {
                   uWarning("Recalculating " + uIS_GetValue(dynamic_group, uGetIDStore(), "MSKEYVALUE") + ' ' + recalc);
    You'll note we have our own function to allow us to run database updates in Javascript, which is required for this to work, since uSelect() won't perform updates. Anyway, doing that solves the problem. I guess you could do the same thing if you just made a To Database pass that runs before this and does these changes.
    If you pick up any other tips or tricks on dealing with Dynamic Groups, let me know, as we use them fairly extensively and still find them somewhat frustrating at times.

  • Another SCOM Maintenance Mode query/advice...

    Hi,
    Just looking some advice on setting SCOM Maintenance Mode (using SCOM/SCO 2012R2)...
    I want to be able to set a server entirely into MaintMode, ie similar to choosing "Selected object AND ALL their contained objects" from SCOM console.
    I had asked similar question back in SCOM 2007/Opalis days, but the solution then (placing server and health server watchers separately into maintenance as per Anders blog http://contoso.se/blog/?p=2164 I'm not sure is appropriate now as I believe MaintMode
    is handled differently in 2012.
    I have seen some pretty complex solutions where using custom built DBs to hold MaintMode status etc.  Was hoping theres a neater/simpler soultion using the Orchestrator Activities these days.
    If not possible using Native Orchestrator then the fallback would be to try use powershell commandlet.  Looking at the Commandlet Examples if I used the following example solution, will that effectively put the server object (and all contained objects
    into maintenance which is what I'm trying to achieve.
    Windows PowerShell
    PS C:\> $Instance = Get-SCOMClassInstance -Name "Server01.Contoso.com"
    PS C:\> $Time = ((Get-Date).AddMinutes(10))
    PS C:\> Start-SCOMMaintenanceMode -Instance $Instance -EndTime $Time -Comment "Applyin
    Any advice to this recurring pain point of SCOM much appreciated.
    PS. Not sure if this post is better placed here or in SCOM/Powershell forum so can move if necessary...

    Hi Michael,
    thanks for your reply confirming the powershell command will work.
    I have actually just tried using the native Start Maintenance Mode Activity which actually seems to do as required - if the monitor selected is the relevant <servername> : Microsoft.Windows.Computer: <servername> object then it seems to put the
    entire server into maintenance.  I tested against a server which happened to also host SQL role, so when I placed in Maint via the runbook  I then stopped the SQL service and no alerts generated from SQL MP and I could see the spanner Icon against
    the server in relevant SQL node views aswell.
    I had though maybe that only windows MP stuff might be supressed - so again when I came across all the very complex solutions to apply Maint mode properly I wasnt sure if it was still relevant in 2012 (even though some of those solutions indicated for use
    on SCOM/SCO 2012?)
    Anyway if the simple solution work - as it appears to do so, then I'll run with that - unless someone can tell me why not?...
    Cheers

  • Requesting System Maintenance Mode

    I just installed Solaris 10 on a SunFire v100 and patched the os. I added a second drive and mirrored it. Now I get this message 2 out of 3 times when I reboot the server.....
    LOM event: +36d+22h57m55s host reset
    Sun Fire V100 (UltraSPARC-IIe 548MHz), No Keyboard
    OpenBoot 4.0, 1024 MB memory installed, Serial #57166297.
    Ethernet address 0:3:ba:68:49:d9, Host ID: 836849d9.
    Executing last command: boot
    Boot device: rootdisk File and args:
    SunOS Release 5.10 Version Generic_118822-27 64-bit
    Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved.
    Use is subject to license terms.
    Hostname: gandalf
    Jan 31 17:41:02 svc.startd&#91;7&#93;: svc:/system/boot-archive:default: Method "/lib/sv<br />
    c/method/boot-archive" failed with exit status 1.
    Jan 31 17:41:02 svc.startd&#91;7&#93;: svc:/system/boot-archive:default: Method "/lib/sv<br />
    c/method/boot-archive" failed with exit status 1.
    Jan 31 17:41:02 svc.startd&#91;7&#93;: svc:/system/boot-archive:default: Method "/lib/sv<br />
    c/method/boot-archive" failed with exit status 1.
    &#91; system/boot-archive:default failed (see 'svcs -x' for details) &#93;
    Requesting System Maintenance Mode
    (See /lib/svc/share/README for more information.)
    Console login service(s) cannot run
    Root password for system maintenance (control-d to bypass):
    Any clue on what I should do?
    Thanks!
    Chris Edwards

    Hi,
    Can you please check the below note
    Solaris11 cannot boot and goes into maintenance ( svc:/system/early-manifest-import:default exited with status 1 ) (Doc ID 1526559.1)
    It has the solution workaround. Kindly let us know in case issue is not fixed
    Thanks,
    Krishna

  • ZCM 11.2.3a dynamic groups summery incorrect

    Hi there
    When creating a dynamic group for Agent version = 10.3.1.34138 (example)
    I click the preview and it shows me 20 members.
    Going to each of those devices in the preview list shows me the correct agent version as per the filter. (10.3.1.34138)
    However after applying and looking at the "members displayed in the Summary" tab, it shows 5000 odd members.
    I have tried this with a few dynamic groups and changed the agent version.
    I know it will only show the first 200 in the preview tab, but even when there are a few (50 members),
    after applying or resetting and looking at the Summary, a completely different no is displayed.
    Any ideas. - Don't recall having this with ZCM 11.2 We are on 11.2.3a at the moment.
    Thanks
    Mark

    Originally Posted by markvh
    Hi there
    When creating a dynamic group for Agent version = 10.3.1.34138 (example)
    I click the preview and it shows me 20 members.
    Going to each of those devices in the preview list shows me the correct agent version as per the filter. (10.3.1.34138)
    However after applying and looking at the "members displayed in the Summary" tab, it shows 5000 odd members.
    I have tried this with a few dynamic groups and changed the agent version.
    I know it will only show the first 200 in the preview tab, but even when there are a few (50 members),
    after applying or resetting and looking at the Summary, a completely different no is displayed.
    Any ideas. - Don't recall having this with ZCM 11.2 We are on 11.2.3a at the moment.
    Thanks
    Mark
    I don't believe the display results are always in order, it's kinda like LDAP where it returns the first X that it finds, so the results may be different every time. (the preview portion).
    At least that's what it does here (the group total is correct, but the preview/display is not in order alphabetically or anything and randomly changes)

  • Creating dynamic tranparent container

    Hi,
    I have to create a dynamic tranparent container, i have added the following code , but it gives dump.
    Error : The following error text was processed in the system SCC : The ASSERT condition was violated in Screen.
    Kindly help.
    Code:
    *Create container
      DATA: lr_container1            TYPE REF TO cl_wd_uielement_container,
            lr_tranparent_container  TYPE REF TO cl_wd_transparent_container,
            lr_flow_data_tc          TYPE REF TO cl_wd_flow_data.
      lr_tranparent_container = cl_wd_transparent_container=>new_transparent_container(
           height                   = '10'
           width                    = '20'
           id                       = 'TEST'
      lr_flow_data_tc  =  cl_wd_flow_data=>new_flow_data( element = lr_tranparent_container  ).
      lr_container1 ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
      lr_container1->add_child( lr_tranparent_container ).

    Hi,
    I guess that you are getting the dump coz you have missed out on specifying 1 of the layout properties. If the UI element that you are adding on to your layout is a normal element then you need to just fill its LayoutData property. But however if the UI element is a container element (like a Group, TransparentContainer, Tray...) then you need to specify 2 properties:
    Layout & LayoutData
    The property which you specify for the Layout would be inherited by all UI elements that you would embed within your container element.
    Check the code fragment below in which I am dynamically creating a TransparentContainer & embedding a Caption within it. You can try paste it inside your WDDOMODIFYVIEW method & check the results.
    METHOD wddomodifyview .
      DATA: lr_root_container TYPE REF TO cl_wd_transparent_container,
            lr_trans_container TYPE REF TO cl_wd_transparent_container,
            lr_caption TYPE REF TO cl_wd_caption.
      lr_root_container ?= view->get_root_element( ).
      lr_trans_container ?= cl_wd_transparent_container=>new_transparent_container( ).
    "*** Since you are creating an element of type container. You need to specify 2 layout properties:
    "*** Layout & LayoutData. Layout specifies as to how the layout property which would be inherited by
    "*** any elements that are embedded within this container. Whereas LayoutData controls whether the element
    "*** should appear in the same line or next line. This is useful in layouts like Matrix layout.
      cl_wd_flow_layout=>new_flow_layout( container = lr_trans_container ).
      cl_wd_flow_data=>new_flow_data( element = lr_trans_container ).
      lr_caption ?= cl_wd_caption=>new_caption( text = 'This is my caption!' ).
      cl_wd_flow_data=>new_flow_data( element = lr_caption ).
    "*** Embed the created caption within our TransparentContainer
      lr_trans_container->add_child( the_child = lr_caption ).
    "*** Add the created TransparentContainer as a child of ROOTUIELEMENTCONTAINER
      lr_root_container->add_child( the_child = lr_trans_container ).
    ENDMETHOD.

  • Dynamic Group not updating Workstations

    Hello NG
    In our environment i created a simple dynamic workstation group.
    Unfortunatelly the group will not be updated with the machines that are in
    the device list. Only if I touch the rule the machines are imported. I have
    to change nothing! Only cklick apply and then the policies are associated to
    this dynamic group.
    Why this? What could be cause of this issue?
    Thanks in advance for your help
    Ramon

    Dynamic Groups are normally updated once daily, during the overnight hours.
    On 4/27/2011 11:21 AM, Ramon Lustrati wrote:
    > Hello NG
    >
    > In our environment i created a simple dynamic workstation group.
    > Unfortunatelly the group will not be updated with the machines that are
    > in the device list. Only if I touch the rule the machines are imported.
    > I have to change nothing! Only cklick apply and then the policies are
    > associated to this dynamic group.
    >
    > Why this? What could be cause of this issue?
    >
    > Thanks in advance for your help
    >
    > Ramon
    Craig Wilson - MCNE, MCSE, CCNA
    Novell Knowledge Partner
    Novell does not officially monitor these forums.
    Suggestions/Opinions/Statements made by me are solely my own.
    These thoughts may not be shared by either Novell or any rational human.

  • Dynamic group of DHCP 2012 windows server objects

    Dear All,
    We need to create a SCOM dynamic group to have Windows server object of DHCP 2012 installed servers.
    Went through
    this post and tried to edit the mp xml file by inserting below mentioned lines. But, i couldn't import the MP back.
                 <Contains>
                              <MonitoringClass>$MPElement[Name="DHCP!Microsoft.Windows.DHCPServer.2012.Server"]$</MonitoringClass>
                 </Contains>
    Could you help me with this?
    Thanks
    Santhosh

    I suggest you use mpverify to verify the mp first.
    Juke Chou
    TechNet Community Support

Maybe you are looking for

  • Glitch?  track creating a new track...

    ok, so lets say I have 3 tracks... and in my window, you can see both "tracks"' and "mixer"(with volume/pan/level) when I push the big "+" to add a new track, it "collapses my tracks" ( as if I am pushcin the little arrow at the top right by "tracks"

  • Problems while using ORDER BY in declaring a PL/SQL cursor

    Hi, everybody I hope you can help me. We are programming a very simple PL/SQL Procedure where we are declaring the following Cursor:Declare Cursor CUnidadP is Select UNOR_CO_UNID_ORGID,UNOR_CO_PADREID,UNOR_NU_NIVEL from Unidad_Organizativa where Unor

  • QosmioPlayer needed for Qosmio G30-177

    I've just bought a Qosmio G30-177 from a friend, but it's not a brandnew laptop and this is my problem. My Lappy cannot using QosmioPlayer , when my lappy turn off i press one of the 11 AV button but my lappy doesn't start QosmioPlayer , instead of t

  • Need help finding wired access point or range extender?

    I currently have a EA6500 in a rather large home.  (4500 sq ft)   The router is on one side of the house and my office is on the other side of the house where wireless does not work well.   I am trying to use Samsung Tablet but the connection keeps d

  • CS6 Dreamweaver fails to open

    I have been using CS6 Dreamweaver on my laptop running Windows 8 for a about a month or so. Just recently, when I try to open up Dreamweaver, it failts to load. Once I click on the Dreamweaver to open, it begins to load and fails right when it gets t