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.

Similar Messages

  • Is it possible to deploy 2 SCOM 2012 R2 reporting in a SQL server which already has SCOM reporting of a different management group but with 2 different reporting instance.

    Hi Experts,
    I have a typical situation in the LAB environment. Hope some one helps. I have Installed a SCOM 2012 R2 with SQL 2012 SP1 in a single server (Management group 1). I have installed another management group on another server using this SQL server for its database
    so i have everything going fine.
    The first management group has its reporting installed in the SQL server. For the second i created a new named instance for that. But i cannot run the SCOM setup in the SQL server (Also holding the Management group 1 MS) as 1 st reporting is already there.
    When i run the setup it is asking me to repair it. I don't get the install option so i can install the reporting for management group 2 in the named instance.
    Default instance is being used by the 1st management group.
    Can any one figure a possibility for installing 2 SCOM reporting services for different management groups in a same SQL 2012 server please.
    Gautam.75801

    Hi Yan Li,
    Thank you for the reply. So as you are aware If i need to instal reporting, i need to run the SCOM 2012 R2 setup in the SQL server and select reporting and select the
    instance and then mention the management server there right. I am not getting that option there it is asking me to remove or repair the existing installation as there is already a SCOM entire setup including reporting there. As it is a lab there is no problem
    in testing. I have 2 reporting instances. Any suggestions for me on how to overcome this issue and deploy the second reporting in the new named instance ?
    Below is the screenshot of the error what i am talking about when i run SCOM 2012 R2 setup to install reporting in the SQL server
    When i click on add feature reporting is greyed out (As already 1st management groups reporting is installed)
    When i click on remove or repair it
    uninstalls the existing one. But i want both SCOM 2012 r2 reporting to be there(For both Management group). Is it possible ? If yes What is the trick to run the setup ?
    Gautam.75801

  • Install Windows server 2012 using powershell

    Hi Folks,
    How to Install Windows server 2012 using powershell.
    Thanks,

    Hi,
    According to your post, my understanding is that you want to install Windows server 2012 via PowerShell.
    Per the previous thread, we could not install Windows server 2012 directly via PowerShell.
    https://social.technet.microsoft.com/Forums/en-US/53f82989-4b9c-4197-9ff1-03e96c852eb7/how-to-install-windows-server-2012-directly-in-vhd-file-using-powershell?forum=winserver8setup
    As this is the forum for SharePoint server on-premise, I’m not familiar with the Windows server, for this issue, I recommend you can post a new question in the forum for Windows server.
    https://social.technet.microsoft.com/Forums/en-US/home?forum=winserver8setup
    More experts will assist you, then you will get more information relation to Windows server.
    Thank you for your understanding and support.
    More reference:
    http://vegibit.com/install-and-configure-windows-server-2012-with-windows-powershell/
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Download Reports from SCCM 2012 Using PowerShell

    Hi,
    I Wants to Download reports from SCCM 2012 using powershell but couldn't find a way.
    I used Invoke-Cmreport but it says no reporting Service point on site code XYZ and server ABC
    But Reporting Service is enabled and works fine as i can check/download report manually
    Thanks 

    Hi,
    You could have a look at the script in the blog below.
    How to Download All Your SSRS Report Definitions(RDL files) Using PowerShell.
    http://www.sqlmusings.com/2011/03/28/how-to-download-all-your-ssrs-report-definitions-rdl-files-using-powershell/
    Note: Microsoft provides third-party contact information
    to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
    Best Regards,
    Joyce

  • SCOM 2012 - Getting List of Objects in Maintenance Mode

    Hi,
    I want to create a group of all the objects that are in Maintenance / Unmonitored Mode at that particular moment. Whether it is possible to have it?
    Regards,
    Sajid

    Hi,
    Creating Groups in SCOM 2012 with PowerShell
    http://blogs.msdn.com/b/rslaten/archive/2013/06/06/creating-groups-in-scom-2012-with-powershell.aspx
    Modifying Explicit Group Membership in SCOM 2012 with PowerShell
    http://blogs.msdn.com/b/rslaten/archive/2013/06/27/modifying-explicit-group-membership-in-scom-2012-with-powershell.aspx
    With the second link, we use instancestoadd parameter to specify those objects that are in maintenancemode:
    InstancesToAdd
    Optional: GUIDs of the instances you want to add to the group. You can pass multiple by separating each with a  comma
    Regards,
    Yan Li
    Regards, Yan Li

  • I want to use Firefox for a specific webpage and my Safari for the rest of my browsing. I have an Apple macbook and am very new to Firefox

    I want to use Firefox for a specific webpage and Safari for the rest of my browsing. I have an Apple macbook and am very new to Firefox

    I thought my response was clear, but to reiterate:
    1.  10.5.1.42
    2.  None, nada, zero, zilch.  I have no iPhone account with any carrier.  There is a deactivated ATT sim card in the3 phone.  Someone gave it to me.  I only want to use it as an iPod Touch.
    3.  PC with Windows 7 (I can offer more detailed info, but I am not sure how that would help.
    I had already read that link.  Reset did not resolve (both hard and soft)

  • 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

  • Error while install sql server 2012 using powershell

    hello all,
    I am using below function to install sql server and its not working  can some one help me please 
    Function Install-Sql2012
    param
    [Parameter()][string]  $Path ,#= (read-host "Enter Installation Binary Path"),
            [Parameter()][string]  $AddSSIS= (read-host "Do u need SSIS Enter 1 for yes o for no") ,
            [Parameter()][string]  $AddSSRS= (read-host "Do u need SSRS Enter 1 for yes o for no") ,
    [Parameter()][string]  $InstanceName = (read-host "Enter Instance name"),
    [Parameter()][string]  $ServiceAccount= (read-host "Enter Service Account"),
    [Parameter()][string]  $ServicePassword= (read-host -assecurestring "Enter Service Account Password") ,
    [Parameter()][string]  $AgentAccount=(read-host "Enter Agent Account"),
    [Parameter()][string]  $AgentPassword=(read-host "Enter Agent pasword"),
            [Parameter()][string]  $Backuppath= (read-host "Enter Backuppath"),
    [Parameter()][string]  $SaPassword= (read-host -assecurestring "Enter SA Account Passowrd"),
            [Parameter()][string]  $SQLTEMPDBDIR= (read-host  "Enter TempDir"),
            [Parameter()][string]  $SQLUSERDBDIR= (read-host  "Enter User Data Directory"),
            [Parameter()][string]  $SQLUSERDBLOGDIR= (read-host  "Enter User Log Directory"),
    #[Parameter(Position=5,Mandatory=$false)][string] $LicenseKey,
    [Parameter()][string]  $SqlCollation = "SQL_Latin1_General_CP1_CI_AS",
    [Parameter()][switch]  $NoTcp,
    [Parameter()][switch]  $NoNamedPipes
    #Build the setup command using the install mode
    if ($Path -eq $null -or $Path -eq "")
    #No path means that the setup is in the same folder
    $command = '.\setup.exe /Action="Install"'
    else
    #Ensure that the path ends with a backslash
    if(!$Path.EndsWith("\"))
    $Path += "\"
    $command = $path + 'setup.exe /Action="Install"'
    #Accept the license agreement - required for command line installs
    $command += ' /IACCEPTSQLSERVERLICENSETERMS'
    #Use the QuietSimple mode (progress bar, but not interactive)
    $command += ' /QS'
    #Set the features to be installed
    #$command += ' /FEATURES=SQLENGINE,CONN,BC,SSMS,ADV_SSMS'
        If ($AddSSIS -ne '0' -and $AddSSIS -ne '1') {
            throw 'Invalid input. Enter a valid value for SSIS.'
        If ($AddSSRS -ne '0' -and $AddSSRS -ne '1') {
            throw 'Invalid input. Enter a valid value for SSRS.'
       if ($AddSSIS -eq 1 -and $AddSSRS -eq 1)
           $command += ' /FEATURES=SQLENGINE,CONN,BC,SSMS,ADV_SSMS,SSIS,SSRS'
       if ($AddSSIS -eq 1 -and $AddSSRS -eq 0)
       $command += ' /FEATURES=SQLENGINE,CONN,BC,SSMS,ADV_SSMS,SSIS'
       if ($AddSSIS -eq 0 -and $AddSSRS -eq 1)
       $command += ' /FEATURES=SQLENGINE,CONN,BC,SSMS,ADV_SSMS,SSRS'
       if  ($AddSSIS -eq 0 -and $AddSSRS -eq 0)
       $command += ' /FEATURES=SQLENGINE,CONN,BC,SSMS,ADV_SSMS'
    #Set the Instance Name
    $command += (' /INSTANCENAME="{0}"' -f $InstanceName)
    #remove Set the License Key only if a value was provided, otherwise install Evaluation edition
    #if ($LicenseKey -ne $null -and $LicenseKey -ne "")
    # $command += (' /PID="{0}"' -f $LicenseKey)
        #set reporting to off
        $command += ('/SQMREPORTING="0"')
        #Add Browser Account 
        $command +=('/BROWSERSVCSTARTUPTYPE="Disabled"')
        #Add Backup path 
        $command +=('/SQLBACKUPDIR="{0}"' -f $backuppath)
    #Check to see if a service account was specified
    if ($ServiceAccount -ne $null -and $ServiceAccount -ne "")
    #Set the database engine service account
    $command += (' /SQLSVCACCOUNT="{0}" /SQLSVCPASSWORD="{1}" /SQLSVCSTARTUPTYPE="Automatic"' -f $ServiceAccount, $ServicePassword)
    #Set the SQL Agent service account
    $command += (' /AGTSVCACCOUNT="{0}" /AGTSVCPASSWORD="{1}" /AGTSVCSTARTUPTYPE="Automatic"' -f $AgentAccount, $AgentPassword)
    else
    #Set the database engine service account to Local System
    $command += ' /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM" /SQLSVCSTARTUPTYPE="Automatic"'
    #Set the SQL Agent service account to Local System
    $command += ' /AGTSVCACCOUNT="NT AUTHORITY\SYSTEM" /AGTSVCSTARTUPTYPE="Automatic"'
    #Set the server in SQL authentication mode if an SA password was provided
    if ($SaPassword -ne $null -and $SaPassword -ne "")
    $command += (' /SECURITYMODE="SQL" /SAPWD="{0}"' -f $SaPassword)
    #Add current user as SysAdmin
    $command += (' /SQLSYSADMINACCOUNTS="test\ADMIN"')
        #Add Tempdbdata path
    $command += (' /SQLTEMPDBDIR="{0}"' -f $SQLTEMPDBDIR)
        #Add Tempdblog path
        $command += (' /SQLTEMPDBLOGDIR="{0}"' -f $SQLTEMPDBDIR)
         #Add UserDBdata path
        $command += (' /SQLUSERDBDIR="{0}"' -f $SQLUSERDBDIR)
         #Add UserDBlog path
        $command += (' /SQLUSERDBLOGDIR="{0}"' -f $SQLUSERDBLOGDIR)
    #Set the database collation
    $command += (' /SQLCOLLATION="{0}"' -f $SqlCollation)
    #Enable/Disable the TCP Protocol
    if ($NoTcp)
    $command += ' /TCPENABLED="0"'
    else
    $command += ' /TCPENABLED="1"'
    #Enable/Disable the Named Pipes Protocol
    if ($NoNamedPipes)
    $command += ' /NPENABLED="0"'
    else
    $command += ' /NPENABLED="1"'
    if ($PSBoundParameters['Debug']) 
    Write-Output $command
    else
    Invoke-Expression $command
    Install-Sql2012
    Below is the error i am getting 
    PS C:\temp\in> .\Install-Sql2012.ps1
    Do u need SSIS Enter 1 for yes o for no: 0
    Do u need SSRS Enter 1 for yes o for no: 0
    Enter Instance name: MSSQLSERVER
    Enter Service Account:
    Enter Service Account Password:
    Enter Agent Account:
    Enter Agent pasword:
    Enter Backuppath: "C:\Temp\IN\bck"
    Enter SA Account Passowrd: **********
    Enter TempDir: "C:\Temp\IN\bck"
    Enter User Data Directory: "C:\Temp\IN\bck"
    Enter User Log Directory: "C:\Temp\IN\bck"
    Microsoft (R) SQL Server 2012 11.00.2100.60
    Copyright (c) Microsoft Corporation.  All rights reserved.
    The following error occurred:
    Instance name is limited to 16 characters. Yours 'MSSQLSERVER/SQMREPORTING=0/BROWSERSVCSTARTUPTYPE=DISABLED/SQLBACKUPDIR=C:\TEMP\IN\BCK' is 85.
    Error result: -2054422513
    Result facility code: 1420
    Result error code: 15
    Please review the summary.txt log for further details
    Thanks,
    Ashwin.
        

    Line 94, 97 and 100 appear to not have spaces at the beginning of each string, which could cause some issues:
    #set reporting to off
    $command += ('/SQMREPORTING="0"')
    #Add Browser Account
    $command +=('/BROWSERSVCSTARTUPTYPE="Disabled"')
    #Add Backup path
    $command +=('/SQLBACKUPDIR="{0}"' -f $backuppath)
    Probably should be this:
    #set reporting to off
    $command += (' /SQMREPORTING="0"')
    #Add Browser Account
    $command +=(' /BROWSERSVCSTARTUPTYPE="Disabled"')
    #Add Backup path
    $command +=(' /SQLBACKUPDIR="{0}"' -f $backuppath)
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • SCOM 2012 SP1 - PowerShell Script failed to run - 3 alerts appear after every reboot of the SCOM Server

    Brand new SCOM 2012 SP1 install with Update Rollup 1 applied
    Single server, local SQL install, SQL Server 2012 SP1
    Hyper-V VM running on Server 2012.  VM has 8GB Ram, single vCPU
    Going through initial management pack importing and configuration, at this point I have the Windows Server 2012 and SQL 2012 MP's installed.
    See screenshot
    http://i.imgur.com/l0Molh1.png
    I am getting the following alerts in my SCOM console and cannot find a resolution to fix the issue.  I don't want to set an override, as an override will prevent the PowerShell alert in other instances, where I might want to receive an alert.
    Looking at the alert description, it states "The Data Access service is either not running or not yet initialized"
    The SCOM Console launches and responds fine, and I get no other errors.  I check the Data Access service and it is online.  I have left the system alone for a couple of hours and no other errors.  I then closed those alerts and restarted the
    server, and they came right back in, so I know that this is something that is happening at either server startup of during the start of the SCOM services.
    Is it possible that SCOM is trying to execute these scripts and the Data Access service has not come online yet?
    Has anyone else come across this before?

    Please try the method in the following thread:
    Note: As there is operations related to Registry, please perform a backup before doing this.
    OpsMgr 2012 - Power Shell Script failed to run 
    http://social.technet.microsoft.com/Forums/de-DE/systemcenterde/thread/4be37f8d-1e7b-450c-8cb9-f1e95f3b2bd0/
    Thanks.
    Nicholas Li
    TechNet Community Support

  • How to use SCOM 2012 R2 Monitoring the standalone Windows Server

    Greetings,
    I want to use SCOM 2012 R2 to monitoring the standalone Windows Server that does not joined the domain. would you please guide me how to configure it.
    Thanks
    Frank@Hiweb 冯立超@瀚博资讯

    I found the answer, as following:
    http://pkjayan.wordpress.com/2010/05/17/agent-managed-non-trusted-servers-without-gateway/
    and
    http://blogs.technet.com/b/stefan_stranger/archive/2012/04/17/monitoring-non-domain-members-with-om-2012.aspx
    Frank@Hiweb 冯立超@瀚博资讯

  • SCOM 2012 Console not responding when the server to be connected is down.

    SCOM 2012 Console hangs when the server to be connected is down or gone (e.g. lease replaced).  How to change the 'connection server' to point to a valid server without re-installing SCOM Console? Thx

    To enable high availability for your Operations Manager Data Access service, you can use Network Load Balancing (NLB)
    PLz refer: http://blog.coretech.dk/kra/how-to-make-operations-manager-2012-rc-scom-2012-fault-tolerance/
    Faizan

  • SCCM 2012 use PowerShell to create a GlobalCondition, limiting the Deployment Type of an Application to certain operating systems.

    Title says it all basically.
    In the GUI im able to create a Global Condition (condition type: Expression) where I can add a clause that Limits the deployment type of an application to certain operating Systems (useful for deploying 64-bit apps).
    Is there away to Trigger that Setting using PowerShell? So far I haven't found one.
    Thx in advance...

    I changed my script a little bit and can be found Here. 
    An example to use it is:
    #Get Application named "Test" from the Server "localhost"           
    $app = Get-SCCMApplication "Test" "localhost"
    #A rule will be created from the global condition rule "ForumTest" where the registry value equals to "1"
    $rule1 = Create-SCCMGlobalConditionsRule . "ForumTest" "IsEquals" 1 "Registry"
    #Add the rule to the requirement rule of the deployment type
    $app.DeploymentTypes[0].Requirements.Add($rule1)
    #And save the application
    Save-SCCMApplication $app
    PowerShell, System Center 2012, Windows 8 http://blog.lechar.nl
    Thanks Rob!
    Have unfortunately encountered some problems:
    Get-SCCMApplication does not exist. Changed it to Get-CMApplication
    Create-SCCMGlobalConditionsRule - Cant find any "Create..." cmdlets
    Save-SCCMApplication does not exist
    Get-CMApplication : A positional parameter cannot be found that accepts argument 'TestApp'.
    At H:\sctipt\SetRequirement.ps1:2 char:9
    +  $app = Get-CMApplication "TestApp" "siteServe ...
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Get-CMApplication], ParameterBindingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.ConfigurationManagement.Cmdlets.AppMan.Commands.GetApplicationCommand
    Create-CMGlobalConditionsRule : The term 'Create-CMGlobalConditionsRule' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At H:\script\SetRequirement.ps1:5 char:11
    +  $rule1 = Create-CMGlobalConditionsRule . "GlobalRuleName" "IsEquals" 1 "Registry"
    +           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Create-CMGlobalConditionsRule:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    Cannot index into a null array.
    At H:\script\SetRequirement.ps1:8 char:2
    +  $app.DeploymentTypes[0].Requirements.Add($rule1)
    +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : NullArray
    Save-CMApplication : The term 'Save-CMApplication' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the na
    me, or if a path was included, verify that the path is correct and try again.
    At H:\script\SetRequirement.ps1:12 char:1
    + Save-CMApplication $app
    + ~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Save-CMApplication:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException

  • Issues with SCOM 2012 Agent on Red Hat 5 Server

    We are running SCOM 2012 server and have deployed the agent successfully to a number of Red Hat Linux servers. I am having an issue on about a quarter of the hosts, in that they appear as HEALTHY but are Grayed out and not green. When I look at the /var/opt/microsoft/scx/log/omiserver.log
    file I see:
    WARNING: wsman: authentication failed for user scom2012
    I have verified that the system account is setup with the correct password and the runas account is setup with the correct password (i am able to deploy the agent from the SCOM server using it, so the passwords DO match).
    Any ideas? 

    We are running SCOM 2012 server and have deployed the agent successfully to a number of Red Hat Linux servers. I am having an issue on about a quarter of the hosts, in that they appear as HEALTHY but are Grayed out and not green. When I look at the /var/opt/microsoft/scx/log/omiserver.log
    file I see:
    WARNING: wsman: authentication failed for user scom2012
    I have verified that the system account is setup with the correct password and the runas account is setup with the correct password (i am able to deploy the agent from the SCOM server using it, so the passwords DO match).
    Any ideas? 
    I've seen this on a few systems here when the agent has been upgraded but the old agent process does not die off.  Just to rule it out, pick a node, make sure there are no instances of scxcimserver or scxcimprovagt and then start the agent and
    see if the issue goes away.  I've also seen wsman authentication failures related to the libssl issue that was fixed in yesterday's release.

  • Automate build TCP port checks in SCOM 2012 using template?

    Hi, I would like to leverage Orchestrator to build TCP port checks from customer requests.
    ie, Customer requests Port X on server Y be checked.  Orchestrator to kick off script to generate the require entries in SCOM2012 allow the TCP port check to be dynamically built.
    Cannot see anything that would assist with this.
    Can anyone help?
    Thanks, Thomas

    For Create custom TCP Port Monitoring, you can refer to below links
    http://www.systemcentercentral.com/custom-tcp-port-monitoring-management-pack-for-scom-2012/
    http://technet.microsoft.com/en-us/library/hh457544.aspx
    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".

  • Using Powershell (or console) to find all objects in maintenance mode?

    Hi,
    I have stumbled across the fact that aside from a handful of servers that have been put into pretty much unlimited MM rather than fix them a previous admin has put loads of individual objects such as disk drives, network cards etc. in long MM.
    I am trying work out an easy way of seeing the server associated with the actual disk, card etc.. I am using -
    Get-SCOMMonitoringObject | where-object {$_.InMaintenanceMode -eq $true}
    This does list everything such as -
    Success                True        C:                                        
    Uninitialized          True        Local Area Connection                     
    Uninitialized          True        Memory
    but I am not sure how I then link that to an actual server so I can take it out of MM?
    I am guessing I could use PowerShell to take all monitors out of MM for instance but dont really want to do that
    thanks!

    Hi,
    More details about command Get-SCOMMaintenanceMode:
    http://technet.microsoft.com/en-us/library/hh920235(v=sc.20).aspx
    Regards,
    Yan Li
    Regards, Yan Li

Maybe you are looking for