OM2012 – Putting a Monitor in maintenance mode

Hi there,
I need to write a powershell script to put a Monitor in Maintenance mode. This is easily doable manually on the console whenever an alert comes up by putting the alert in Maintenance Mode.
So far I managed to make my script to put the class of the Monitor into maintenance, as per bellow
i.e. if the monitor is “Total CPU Utilization Percentage”, it would put  Microsoft Windows Server 2012 R2 Datacenter in maintenance mode for the computer $ComputerName.
$ComputerName = Read-Host “Enter computer name”
$MonitorName = “Total CPU Utilization Percentage”
$Monitors=Get-SCOMMonitor -ComputerName $strComputerName | where {$_.DisplayName -eq $MonitorName}
$Time = ((Get-Date).AddMinutes(6))
foreach ($Monitor in $Monitors) {
$Instance = Get-SCOMclass -name $Monitor.target.identifier.path | Get-SCOMClassInstance #| where {$_.Path -eq $ComputerName}
Start-SCOMMaintenanceMode -Instance $Instance -EndTime $Time -Comment: “Server maintenance”
I can’t figure our how to simply put “Total CPU Utilization Percentage” (or any other Monitor) in maintenance mode
Thanks for your help !

Yes, use the "Start Maintenance Mode" Activtiy of the Integration Pack for OpsMgr.
www.sc-orchestrator.eu ,
Blog sc-orchestrator.eu

Similar Messages

  • Failed to get Monitor - Start Maintenance Mode

    Hi,
    Am struggling with a problem with Orchestrator R2 apparently not recognising output from a Monitor alert step in a run book.  I have Orchestrator 2012R2 and SCOM 2012R2 configured.  Orchestrator is co-located with VMM2012R2.
    Operating system for all is Windows server 2012
    I have installed and deployed the Orchestrator R2 Integration packs which in deployment manager state version 7.2
    I have checked to ensure that both Orchestrator, SCOM and VMM are all R2 (They are)
    I am looking to create a runbook that will start services as per the link here: (Thanks to Jakob for this)
    http://blog.coretech.dk/jgs/sco-2012-scom-2012-best-practice-monitor-alert-and-restart-a-service/
    I can test the connection to the SCOM server - fine
    I create the monitor alert step and test - fine
    I create the start maintenance mode step and get the following error:
    Filed to get Monitor.  The exception was "An object of class MonitoringObject with ID 00000000-0000-0000-0000-000000000000 was not found.".
    I have used the runbook tester and the monitoringobjectfullname is present in the output for the start maintenance mode step.
    However irrespective of the variable that I attempt to use in start maintenance mode step I continue to get the same error as above.
    The monitor alert step completes with no issues, but everytime on the start maint mode step it fails.
    I have validated the SCOM connection account has all the appropriate SCOM permissions.  I have also provided it with full domain admin rights, but with no success. 
    Any ideas on how to troubleshoot this would be welcomed
    Thanks in advance

    Hi Stefan,
    A little extension of your approach as this is only usable if you want to set a Windows Server into Maintenance Mode - but not e.g. for Distributed Apps
    I just required the "Start Maintenance Mode" Activity to set a distributed app and a websphere application server instance (which is not linked with the server itself). And I did not find any documentation how to fill the field - only for Windows
    Computer.
    So I'll post my result on how to get the value which needs to be entered within the "Monitor" field:
    (PowerShell - Use "Activities > System > Run .Net Script > Type: Powershell)
    Import-Module OperationsManager
    $object= Get-SCOMMonitoringObject -displayname "<desired object displayname";
    # or use the ID instead:
    # $object = Get-SCOMMonitoringObject -ID "<ID of object>";
    $name = $object.displayname;
    $fullname = $object.fullname;
    $monitor = $name + " : " + $fullname
    Then put $monitor within "published data" and you can use it directly in the "Start Maintenance Mode" Activity.
    This only works if the runbook is running on a SCOM management server as it requires the SCOM Powershell Module. But at least it somehow shows the syntax.
    Best Regards
    Klaus
    Austria

  • How to put Mediation Server on Maintenance Mode for LYNC server 2013

    how to put the LYNC 2013 Mediation server on Maintenance mode???

    Hi,
    Did you solve the issue with the help the people above provided?
    If you mean server draining feature you can also check Topology option on Lync Server Control Panel, on Topology interface, click “Action” and there is an action called “Prevent new sessions for service”.
    Here is a similar case may help you:
    http://social.technet.microsoft.com/Forums/lync/en-US/ef3515a9-54c0-4b7a-ab48-45196764d837/how-to-use-lync-server-draining-feature?forum=ocsplanningdeployment
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • Exch2k13 - to apply spks or CU should I put the server on 'Maintenance Mode'

    Hi,
    Since we have only one server acting as CAS/MBX, should I put it on 'maintenance mode' before apply spk/cu?

    Hi,
    Maintenance mode should be used with Mailbox servers, both standalone mailbox servers and multi-role servers.
    Here is a related blog which can help for your reference.
    Exchange 2013 Maintenance mode
    http://blogs.technet.com/b/nawar/archive/2014/03/30/exchange-2013-maintenance-mode.aspx
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • ConfigMgr Backup puts SCCM Server into Maintenance Mode (SCOM)

    Hi all,
    I have a strange issue.
    We have a SCOM-Server (2012 SP1 - 7.0.9538.1068) which Monitors several servers. We also have an SCCM-Server (2012 R2 - 5.0.7958.100) for Client/Software Deployment. This SCCM-Server is also a SCOM-Gateway...
    Now we have the issue, that i get strange Events in the Operations Manager Eventlog on the SCCM-Server (SCOM-Gateway):
    Source: Health Service
    Event ID: 1217
    Level: Information
    Description: The System Center 2012 - Operations Manager Agent running on Computer "SCCM-Server HOSTNAME" is suspended for the following reason: "ConfigMgr 4.00.7958.0000 - Starting - Backup".
    There are several strange things with this message:
    1. The Version is completely wrong... should probably be 5.00.7958.0000???
    2. We have the SCCM-Backup (in Administration -> Overview -> Site Configuration -> Sites -> Site Maintenance -> Backup Site Server) NOT enabled!!!
    3. The main issue now is, that the SCCM-Server (SCOM-Gateway) everyday changes to mantenance mode (for some hours over night!), and therefore all SCOM-Agents behind the SCOM-Gateway are alerting Heartbeat failures!
    Example Times/Dates when the issue occurs:
    Do you have any clues about this message?
    Thank you for your help.
    Patrik

    Hi,
    Have you checked Smsbkup.log as Torsten said?
    You could also check the status messages for SMS_SITE_BACKUP in the Component Status node in the
    Monitoring workspace.   
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • 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.

  • Is there a PS sript to put different web applications in maintenance mode

    HI,
    I have 2007 R2 SCOM environment.Multiple Web applications is monitored. I got request to put together PS script which could put web application to maintenance mode so it wouldn't not alert while somebody working on it and puts it down. Is there possible
    way to do that.
    Thanks
    Balys

    Hi
    There are different ways to interpret "web applications" - if this is basic URL monitoring then this can be done as follows:
    http://www.scom2k7.com/schedule-a-into-url-maintenance-mode/
    http://www.scom2k7.com/schedule-a-group-of-urls-into-maintenance-mode/
    I have done similar for process monitors here:
    https://systemcentersolutions.wordpress.com/2010/04/03/scheduled-maintenance-process-monitors/
    The idea behind all of these is that you'll need to find out the target class and then put that class into maintenance mode.
    Regards
    Graham

  • Maintenance Mode For One Monitor

    Is it possible to place one monitor in maintenance mode? Not the entire computer or object, but just that one monitor? I don't want other monitors for that object to be silenced though.

    Hi,
    A Windows Schedule task,
    http://technet.microsoft.com/en-us/library/cc748993.aspx
    Please read this one:
    Management Pack for the SCOM 2012 Maintenance Mode Scheduler
    http://blog.tyang.org/2014/05/22/management-pack-scom-2012-maintenance-mode-scheduler/
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Ways to put application in Read Only mode during monthly maintenance

    Hello,
    We have a situation where during monthly maintenance phase for 2-3 days i need to put the application in Read only mode. We already have dimension level security applied to each user but even to those users who have the write access to some members on the data forms etc, the application should just be read only during that time so that no users can enter any data.
    From what I know putting the application in maintenance mode all the users will be locked out which is not what we want. The users should still be able to see the dataforms, reports etc. So, please let me know your ideas on this.
    Any ideas are appreciated.
    ~ Adella

    The same question was asked the other day - How can i make a application as read only ?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Put servers in Maintenance Mode in SCOM 2012

    Hi,
    When we put a server in maintenance mode in SCOM 2012 it asks for only the end time. How can we specify the start time for maintenance mode.
    Thanks

    You can specify the start time for maintenance mode by schedule Maintenance mode.
    For how to create schedule for maintenance mode, you can refer below link
    http://support.microsoft.com/kb/2704170/en-us
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    Mai Ali | My blog: Technical

  • Powershell script for put the particular service in to Maintenance mode

    Hi Everyone,
    I have requinquent to schedule the Maintenance mode for service. If anyone help with script to put the service into maintenance mode, then i can schedule the same through Task Scheduler. 
    Thanks in advance.
    Regards
    Karthick

    Hi,
    Please have a look on:
    http://technet.microsoft.com/en-us/library/hh918505(v=sc.20).aspx
    http://blog.coretech.dk/msk/operations-manager-2012-maintenance-mode/
    Cheers
    Christoph Maresch | My blogs: blog.cmaresch.at | XING:
    Christoph Maresch
    | Linkedin:
    Christoph Maresch

  • 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 is cancelled for no reason by the system

    Hi, very unusual and sporadic problem.
    Let's say we put a URL monitor into maintenance mode for 4 hours.
    After 2 hours we reboot the URL hosting server.
    The maintenance mode has been cancelled and the URL will alert again while we continue to work on it.
    Should this happen ? The version is SCOM 2012 SP1 UR6.
    Thanks in anticipation.

    If there is lot of data, Then add this string and userid like '%User name who silenced the URL%'
    so this will totally filter the report to only all the servers / items silenced by a specific user.
    So it will come like this
    USE OperationsManagerDW
    SELECT ManagedEntity.DisplayName, MaintenanceModeHistory.*
    FROM ManagedEntity WITH (NOLOCK) 
    INNER JOIN
    MaintenanceMode ON ManagedEntity.ManagedEntityRowId = MaintenanceMode.ManagedEntityRowId 
    INNER JOIN
    MaintenanceModeHistory ON MaintenanceMode.MaintenanceModeRowId = MaintenanceModeHistory.MaintenanceModeRowId
    where DisplayName Like '%%' and userid like '%User name who silenced the URL%'
    Gautam.75801

  • 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.

  • Getting 34208 Events in IIS server after come out from Maintenance mode

    Hi Experts,
    We are monitoring .Net application(APM) in our environment(SCOM 2012 SP1).  We are putting all the servers in Maintenance mode on every sunday(Weekly Maintenance), after come out from MMode  getting 34208 events in OPSMGR Logs, particularly from
    IIS servers(APM). 
    Do we have any fix for that like cumulative update?
    Can we put IIS server into Maintenance mode? If we put in MMode, Will it affect monitoring??
    Expecting your reply.. Thanks in advance!!!
    Regards
    Karthick

    Thanks for reply Agrawal!
    I know that we won't get alerts if the servers are in Maintenance mode.  But we are getting 34208 events particularly from IIS servers(.Net Application Performance Monitoring - APM) as the result we are receiving warning alerts in SCOM console stating
    that " Restart IIS service" which will affect other monitoring in the servers.
    Is anyone getting this issue in your environment?  Generally we will get 34208 events while we adding new application in to IIS server.  But here we are getting this events after the server come out from MMode.
    Kindly provide your valuable suggestions.  Thanks!
    Regards
    Karthick

Maybe you are looking for

  • Part1 is not generating for Vendor Subsequent delivey

    Hi ASAP I hope you must be doing great; steps are as follow which Iu2019m following for vendor return and subsequent delivery for Raw / Capital goods. 1. PO -> MIGO (101) -> Excise capture & Posting using J1IEX -> MIRO. For excise, part1 & 2 to relev

  • ERROR: An event session cannot be started without any providers?

    I was trying to get the storport provider that Yong posted and I get the above error despite checking to ensure the log mode is FILE.   Not sure if the provider names are case sensitive, changing the provider name from Microsoft-Windows-Storport to M

  • Conversion of an excel file into a CSV 2.0 file for uploading in CCM 2.0

    Hi guys, We are downloading content from SAP R/3 into an excel spread sheet. We are uploading this content in a CSV file 2.0 into CCM 2.0 the csv file we use today we are arming manualy because of the difference in structure between excel and CSV 2.0

  • RAW or JPEG  What id best for creating an iBook?

    I have photos in both RAW and JPEG format.  I know that when a RAW file is edited it is saved as a JPEG.  I noticed that the size of the edited RAW file is often smaller than the same JPEG photo. (Sometimes it's up to 2MB or more difference.)  Believ

  • Trial to licensed (CS4)

    I am currently running the PS CS4 trial version and have the upgrade on order (shipped from so no key until arrival) Can you simply use the trial, as I assume its essentially the software, and enter the key on arival and activate etc (less hassle) or