Friday, July 4, 2014

[OpsMgr 2012 R2][Advisor] Best practices for System Center Advisor integration ( #OpsMgr2012R2 #SystemCenterAdvisor #BestPractices )

Marnix Wolf has posted his thoughts on System Center Advisor integration on a new post.



 
Direct link to post <<<< HERE >>>>
 

His post explains that System Center Advisor (#SCA #SystemCenterAdvisor ) is integrated by default in SCOM 2012 R2 and if you don't want to use it, it's better to take some actions.
 
A very short summary is that there is multiple approach to deal with it when you don't want to use SCA Integration :
  • A BAD approach : remove the SCA MPs. Bad beceause you'll remove parts of the core of SCOM 2012 R2.
  • A FAST approach : Disable the Discovery Advisor Connector Discovery for all instances of Windows Computer class.
  • A BEST approach : Disable ALL Discoveries, Monitors & Rules present in the Advisor MP.
By the way, in case you want to deal with it when you use SCA integration, just override the Frequency in seconds parameter on the 3 discovery rules to 86400. By default, it's configured to 600, also discoveries are running every 10 minutes and this is really too often !
Here are the 3 discovery rules to override :
  • Advisor Connector Discovery
  • Microsoft.SystemCenter.Advisor.Internal.SharePoint
  • Microsoft.SystemCenter.Advisor.Internal.Lync

Read the full post here to have more détails and screenshots. Thanks to Marnix Wolf for sharing his investigations.



This posting is provided "AS IS" with no warranties.

[Microsoft Azure] Create and manage your own Public Cloud - Free one month trial !! ( #Azure #Microsoft )

Microsoft has modified the Microsoft Azure Free Trial for all new users. You can now save 200$ and test for 1 month for free the product !

http://azure.microsoft.com/en-us/pricing/free-trial/
 
 
 

This posting is provided "AS IS" with no warranties.

Tuesday, July 1, 2014

[OpsMgr 2012][Powershell] Access Denied launching the InternetExplorer.Application COM using Powershell ( #Powershell #VBS #OpsMgr )

My Colleague Florian AGUETTAZ was asked to create a two state monitor based on a script checking the value of two webpages.
He first decided to create a Powershell script to create an IE connexion but he has a lot of permission issues.

MyScripts.ps1 : Retrieving the COM class factory for component with CLSID {0002DF01-0000-0000-C000-000000000046} failed due to the following error: 80070005.

CLSID {0002DF01-0000-0000-C000-000000000046} is corresponding to the IE component and the error 80070005 is an Access Denied.



Then he has tried to use VBS script in his MP and has been able to retrieve the status of both web pages.

He has made an interesting  post on his experience and give the script he has used.

http://florianaguettaz-it.blogspot.fr/2014/07/opsmgrpowershell-access-denied.html
 
 
 
 

This posting is provided "AS IS" with no warranties.

Monday, June 30, 2014

[OpsMgr 2012] The Add Object Wizard in Operations Manager 2012 displays only 500 objects even if more than 500 exist ( #OpsMgr2012 )

When you use the Add Groups or Add Object button while creating a report in Microsoft System Center 2012 Operations Manager (OpsMgr 2012), no more than 500 objects are displayed in the Add Object Wizard even if more than 500 exist.

This default limit of 500 objects is by design, and this setting is controlled through the system registry.
Microsoft has published on 2014 June the 24th,  KB2976809 to provide a way to increase  the maximum object limit in the Add Object Wizard.

http://support.microsoft.com/kb/2976809/en


To work around this issue, create a registry key to manually set the maximum object limit in the Add Object Wizard.

To do this, follow these steps:
  1. On the computer that's hosting the Operations Manager console, close all running instances of the console.
  2. Start Registry Editor. Make sure that you're using the same user account that's used to run the console.
  3. Locate and then click the following registry subkey: HKEY_CURRENT_USER\Software\Microsoft\Microsoft Operations Manager\3.0\Console
  4. Create a new DWORD value key, and save it as MaximumSearchItemLimit. Assign a value to this key that reflects the maximum number of objects that you want to display. For example, use a value of 1000 if you want to limit the maximum number of objects to 1000 instead of to the default limit of 500.
Location: HKEY_CURRENT_USER\Software\Microsoft\Microsoft Operations Manager\3.0\Console
Name: MaximumSearchItemLimit
Type: REG_DWORD
Value: 0 to 65535
 
Then Exit Registry Editor.
 
To verify the new setting, start the Operations Manager console, and then open a report that uses the Add Group or Add Object button. Click the Search button in the Add Object dialog box, and then verify that the maximum number of available items that are now displayed matches the MaximumSearchItemLimit value.


Note Make sure that you repeat steps 1–5 on all computers that are hosting the Operations Manager console.


This posting is provided "AS IS" with no warranties.

Thursday, June 26, 2014

[SCOM 2012] Maintenance Mode Scheduler V3 from Tim McFadden ( #MaintenanceMode #SCOM2012 )

Tim McFadden has released the SCOM 2012 Maintenance Mode Scheduler Version 3 on his blog post here.

http://www.scom2k7.com/scom-2012-maintenance-mode-scheduler-v3/


Here are the new features in V3 that will help address this problem:

  • Schedule Subscriptions for maintenance mode.  Most organizations only use the alerts from SCOM.  Now you can schedule your complex subscriptions into maintenance mode.  You can choose to send the alerts that were queued up or discard them.
  • International Date format of DD/MM/YYYY now supported
  • New Integrated Dashboard with the help of Tao Yang
  • Removed resource pools from the list of groups
  • Changed default start time to only 2 minutes ahead instead of 5
  • Check to verify start time hasn’t already passed
  • Minor bug fixes
    Download a free trial version on the post.
 

This posting is provided "AS IS" with no warranties.

Friday, June 20, 2014

[SCOM 2012][Powershell] Closing all alerts from a specific Management Pack ( #SCOM2012 #Powershell )

I 've today a need to close all alert that has been raised by a  specific Management Pack. The way I decided to work is to list all alerts, detect from what monitor or rule the alert is comming from and then, check the monitor / rule property to know if it's related to the MP I want to close all alerts.


 For using the script, just replace the MY.MP.TEST by you MP name.



  1. # Set variable with the MP name you want to close all alerts
  2. $MPtoCheck = 'MY.MP.TEST'
  3. # Check Open alerts
  4.  $OpenAlerts = get-SCOMalert
  5. # Create an empty list of AlertID
  6.  $ListAlertIDtoClose = ""
  7. #Check what MP has raised the alert
  8.  foreach ($alert in $OpenAlerts)
  9.       {
  10.       $AlertMP = ""
  11.       $AlertID = $alert.ID
  12.       write-host $AlertID
  13.       If ($alert.IsMonitorAlert -eq "True")
  14.          {
  15.          $AlertMP = (get-SCOMmonitor -ID $Alert.MonitoringRuleID).GetManagementPack().name
  16.          }
  17.      else
  18.         {
  19.         $AlertMP = (get-SCOMrule -ID $Alert.MonitoringRuleID).GetManagementPack().name
  20.         }
  21.     
  22.      If ($AlertMP -match $MPtoCheck) {
  23.         write-host "AlertId: " $AlertID "is from " $AlertMP " and must be closed." -foregroundcolor "red"
  24.         if ($ListAlertIDtoClose -eq "")
  25.            { $ListAlertIDtoClose = $AlertID.guid }
  26.         else
  27.            { $ListAlertIDtoClose = $ListAlertIDtoClose + "," + $AlertID.guid}
  28.       } 
  29.   }
  30. # Show the list of alert ID that must be closed
  31.  $ListAlertIDtoClose
  32. # Create a table
  33.  $ListAlertIDtoCloseTable = $ListAlertIDtoClose.split(",")
  34. # Close all alert from the table
  35.  foreach ($AlertID in $ListAlertIDtoCloseTable)
  36.     {
  37.      get-SCOMAlert | where {$_.ID -like $AlertID} | Resolve-SCOMAlert -Comment "All alerts are closed by powershell script."  | out-null
  38.     }

Note :


For testing purpose, I've just removed the "| Resolve-SCOMAlert -Comment "All alerts are closed by powershell script."  | out-null " in line 37. For each Alert ID in the table, it will only show the alerts and not close them.

So in the screenshot, you can see lines in red - they are corresponding to alerts ID that are raised by MY.MP.TEST
Then in the middle, you can see a list of ID coma separated, this is the line 31 that is executed.

The table at the end, is listed all the alert from the list. since I removed the  "| Resolve-SCOMAlert -Comment "All alerts are closed by powershell script."  | out-null " in line 37, alerts are not closed.



Be carefull when closing alerts - this should be used in a test environnement first !

This posting is provided "AS IS" with no warranties.

Thursday, April 24, 2014

[Powershell tool] Script Browser for Windows PowerShell ISE ( #Powershell #Toolbox #Script)

Script Browser for Windows PowerShell ISE enables you to search for over 9000 script samples in the TechNet Script Center from within the scripting environment.



Script Browser for Windows PowerShell ISE enables you to search for over 9000 script samples in the TechNet Script Center from within the scripting environment. You can mark the script samples as favorites and download the script samples for later use. You will also get the chance to try out another new pilot function bundled with Script Browser - 'Script Analyzer'. We hope to learn your feedback.




Version: 1.0
File Name: ScriptBrowser.msi
Date Published: 4/15/2014
File Size: 1.4 MB

Supported Operating System

Windows 7, Windows 7 Home Basic 64-bit, Windows 7 Home Premium, Windows 7 Home Premium 64-bit, Windows 7 Home Premium E 64-bit, Windows 7 Home Premium N, Windows 7 Home Premium N 64-bit, Windows 7 Professional, Windows 7 Professional 64-bit, Windows 7 Professional E 64-bit, Windows 7 Professional K 64-bit, Windows 7 Professional KN 64-bit, Windows 7 Professional N, Windows 7 Professional N 64-bit, Windows 7 Service Pack 1, Windows 7 Starter, Windows 7 Starter 64-bit, Windows 7 Starter N, Windows 7 Ultimate, Windows 7 Ultimate 64-bit, Windows 7 Ultimate E 64-bit, Windows 7 Ultimate K 64-bit, Windows 7 Ultimate KN 64-bit, Windows 7 Ultimate N, Windows 7 Ultimate N 64-bit, Windows 8, Windows Server 2008 R2, Windows Server 2008 R2 Datacenter, Windows Server 2008 R2 Enterprise, Windows Server 2008 R2 for Itanium-based Systems, Windows Server 2008 R2 Foundation, Windows Server 2008 R2 SP1, Windows Server 2008 R2 Standard, Windows Server 2012, Windows Server 2012 Essentials, Windows Server 2012 R2, Windows Server 2012 R2 Essentials

  • Supported operating system: Windows 7, Windows 8, Windows Server 2008 R2, Windows Server 2012, or Windows Server 2012 R2
  • Microsoft .NET Framework version 4.5 or a later version
  • Windows Management Framework 3.0 or a later version
  • Windows Search Service

The installation of Microsoft Script Browser for Windows PowerShell ISE requires administrative access to your computer. You may also be asked to close all open Windows PowerShell ISE windows during the installation.

This posting is provided "AS IS" with no warranties.