2017年12月20日 星期三

The pool managing the instance is not available or the location monitoring object cannot be found - discovery progress

Navigate to C:\Program Files\Microsoft System Center 2016\Operations Manager\Server

Open (as administrator) ConfigService.config

Edit the following lines, removing the \INSTANCENAME values so that only the SQL server value is shown.
     <Category Name="Cmdb">
        <Setting Name="ServerName" Value="jimmy\jimmy" />
        <Setting Name="DatabaseName" Value="OperationsManager" />

      <Category Name="ConfigStore">
        <Setting Name="ServerName" Value="jimmy\jimmy"  />
        <Setting Name="DatabaseName" Value="OperationsManager" />

To

     <Category Name="Cmdb">
        <Setting Name="ServerName" Value="jimmy" />
        <Setting Name="DatabaseName" Value="OperationsManager" />

      <Category Name="ConfigStore">
        <Setting Name="ServerName" Value="jimmy" />
        <Setting Name="DatabaseName" Value="OperationsManager" />

                   
Restart System Center Management Configuration and System Center Data Access Service.


Issue with SCOM agent in forest trust domain(0x80090311)

If you see these events 20057 with code (0x80090311), that is mean (trust is corrupted) and agents can not authenticate to MS.

The most common reason is Firewall issue.
(TCP/UDP 88 port (Kerberos) and TCP/UDP 389 port (LDAP)) should be open from Agent to Management Server DCs.

2017年10月30日 星期一

How to Use the Ping Command to Ping IPv4 or IPv6

Here’s a useful tidbit relating to ping on Windows: If you specify -4 or -6 after the IP address or hostname, you can ping either IPv4 or IPv6, respectively. For example:

To ping using IPv4:

  ping somehostname.com -4

To ping using IPv6:

  ping somehostname.com -6

2017年10月18日 星期三

2017年10月12日 星期四

Total CPU Utilization Percentage" is monitor not working as expected

Cause
======
CPU % and queue length are not above the threshold as per the properties of monitor

Resolution
=========
This is working as per the design.

We have the default monitor name : Total CPU Utilization Percentage.
We are dealing with two conditions here

1) Threshold CPU that is 95 % by default with number of samples collected is 3


2) Queue length which is 15 by default   

2017年9月28日 星期四

High CPU/High Memory in WSUS - Windows update will not download updates - stuck at 0% downloading

A WSUS update is now available that includes improvements for update metadata processing. This update should be applied to all WSUS servers in your environment.
Windows Server 2016 (KB4039396)
Windows Server 2012 R2 (KB4039871)
Windows Server 2012 (KB4039873)
WSUS 3.0 SP2 (KB4039929)

If you still occasionally experience thread abort exceptions, you can increase ASP.NET’s default timeout.
Increase the ASP.NET timeout
  • Make a copy of \Program Files\Update Services\WebServices\ClientWebService\Web.Config.
  • Open \Program Files\Update Services\WebServices\ClientWebService\Web.Config.
  • Find the element “<httpRunTime”. It will look like this (in an unmodified web.config):
<httpRuntime maxRequestLength="4096" />
  • Modify httpRunTime by adding an executionTimeout attribute:
<httpRuntime maxRequestLength="4096" executionTimeout="3600" />
  • Save the web.config to a different location and copy the modified one into the directory.
  • From an elevated command prompt, run IISReset to restart IIS

2017年9月11日 星期一

How to increase the timeout for Migration Jobs in System Center 2012 Virtual Machine Manager

To increase the timeout between jobs, follow the steps below:
1. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Settings
2. Create a new DWORD value
3. Set the name to be LiveMigrationQueueTimeoutSecs
4. Set the value to be 00000708 HEX. This will set the Timeout to 30 minutes and is a good place to start. 
5. Restart the VMM service

2017年8月28日 星期一

Programmatically remove a management pack with Dependencies

Programmatically remove a management pack with Dependencies

When a management pack is deleted from the administration pane UI, it can become very time consuming to recursively track down and delete all dependent management packs before deleting the originally intended management pack. You can use the following script to cascade delete a management pack and all its dependencies.
To run the script, follow these steps:
  1. Open the Operations Manager Command Shell prompt in Administrator mode.
  2. Run the attached script from the directory where you have saved it in the disk. For example:
    • .\RecursiveRemove.ps1 <ID or System Name of the MP>
    • .\RecursiveRemove.ps1 Microsoft.SQLServer.2014.Discovery
    Note You can see the ID or System Name of the MP that you want to uninstall by selecting it in Installed Management Packs view. Then click Properties in the Actions Pane. Then copy the content in ID: text box in General tab.
# The sample scripts are not supported under any Microsoft standard support 
# program or service. The sample scripts are provided AS IS without warranty 
# of any kind. Microsoft further disclaims all implied warranties including, 
# without limitation, any implied warranties of merchantability or of fitness
# for a particular purpose. The entire risk arising out of the use or 
# performance of the sample scripts and documentation remains with you. In no
# event shall Microsoft, its authors, or anyone else involved in the creation,
# production, or delivery of the scripts be liable for any damages whatsoever
# (including, without limitation, damages for loss of business profits,
# business interruption, loss of business information, or other pecuniary
# loss) arising out of the use of or inability to use the sample scripts or
# documentation, even if Microsoft has been advised of the possibility of 
# such damages.
#
#
# PowerShell script to automagically remove an MP and its dependencies.
#
# Original Author :      Christopher Crammond
# Modified By   :      Chandra Bose
# Date Created   : April 24th, 2012
# Date Modified  :  Januray 18th, 2016
#
# Version  :       0.0.2
#

# Needed for SCOM SDK
$ipProperties = [System.Net.NetworkInformation.IPGlobalProperties]::GetIPGlobalProperties()
$rootMS = "{0}.{1}" -f $ipProperties.HostName, $ipProperties.DomainName


#######################################################################
#
# Helper method that will remove the list of given Management Packs.
#
function RemoveMPsHelper 
{param($mpList)
  foreach ($mp in $mpList)
  {
 $recursiveListOfManagementPacksToRemove = Get-SCOMManagementPack -Name $mp.Name -Recurse
 if ($recursiveListOfManagementPacksToRemove.Count -gt 1)
 {
  Echo "`r`n"
  Echo "Following dependent management packs has to be deleted before deleting $($mp.Name)..."

  $recursiveListOfManagementPacksToRemove | format-table name
  RemoveMPsHelper $recursiveListOfManagementPacksToRemove
 }
 else
 {
  $mpPresent = Get-ManagementPack -Name $mp.Name
        $Error.Clear()
        if ($mpPresent -eq $null)
        {
            # If the MP wasn’t found, we skip the uninstallation of it.
            Echo "    $mp has already been uninstalled"
        }
  else
  {
   Echo "    * Uninstalling $mp "
   Uninstall-ManagementPack -managementpack $mp
  }
 }
  }
}

#######################################################################
#
# Remove 'all' of the JEE MPs as well as MPs that are dependent on them.
# The remove is done by finding the base MP (Microsoft.JEE.Library) and finding
# all MPs that depend on it.  This list will be presented to the user prompting
# if the user wants to continue and removing the list of presented MPs
#
function RemoveMPs
{param($mp)

  $listOfManagementPacksToRemove = Get-SCOMManagementPack -Name $mp -Recurse
  $listOfManagementPacksToRemove | format-table name

  $title = "Uninstall Management Packs"
  $message = "Do you want to uninstall the above $($listOfManagementPacksToRemove.Count) management packs and its dependent management packs"

  $yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "Uninstall selected Management Packs."
  $no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", "Do not remove Management Packs."
  $options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)

  $result = $host.ui.PromptForChoice($title, $message, $options, 0) 

  switch ($result)
  {
        0 {RemoveMPsHelper $listOfManagementPacksToRemove}
        1 {"Exiting without removing any management packs"}
  }
}

#######################################################################
# Begin Script functionality
#
if ($args.Count -ne 1)
{
  Echo "Improper command line arguments"
  Echo ""
  Echo "Specify a command line argument to either import or export MPs"
  exit 1
}
else
{
  $firstArg = $args[0]

  add-pssnapin "Microsoft.EnterpriseManagement.OperationsManager.Client";
  $cwd = get-location
  set-location "OperationsManagerMonitoring::";
  $mgConnection = new-managementGroupConnection -ConnectionString:$rootMS;

  RemoveMPs $firstArg

  set-location $cwd
  remove-pssnapin "Microsoft.EnterpriseManagement.OperationsManager.Client";  
}

System_CAPS_noteNote
If any other imported management packs depend on the management pack you are trying to remove, the Dependent Management Packs error message displays. You must remove the dependent management packs before you can continue.

For
https://technet.microsoft.com/en-us/library/hh230746(v=sc.12).aspx

2017年8月3日 星期四

SCOM 2016,Unable to resolve the user xxx associated with the user role. Error code 1332

Problem
===========
Unable to resolve the user xxx associated with the user role. Error code 1332

Cause
=========
Normally – when you have a trust with a remote account domain, and you want to add users from the rote domain to SCOM, things go perfectly.
However, if the user account in the remote domain uses a different UPN name than the SAM account name – the SCOM UI block’s it.
  
Solution
===========
Use SCOM PowerShell to add these users to the role:

$Role = Get-SCOMUserRole -Name "MSFT TEST"
$Role | Set-SCOMUserRole -User ($Role.Users + "MSFT\jimmytest")


2017年7月26日 星期三

After applying update KB4025336 to our WSUS servers clients are no longer able to communicate with WSUS.

Cause
========
the virtual directories were throwing internal server error 500's for the WSUS


Analysis
=========

2017-07-26    13:41:01:572 1048   20d8   PT        WARNING: GetCookie_WithRecovery failed : 0x80244008
2017-07-26    13:41:01:572 1048   20d8   PT        WARNING: RefreshCookie failed: 0x80244008
2017-07-26    13:41:01:572 1048   20d8   PT        WARNING: RefreshPTState failed: 0x80244008
2017-07-26    13:41:01:572 1048   20d8   PT        WARNING: PTError: 0x80244008
2017-07-26    13:41:01:572 1048   20d8   Report           WARNING: Reporter failed to upload events with hr = 80244008.

Action Plan
=============

1. Open the elevated command prompt, and cd to the directory: C:\Program Files\Update Services\Tools;
2. Run the command: wsusutil.exe usecustomwebsite true,  to change the 80 port usage to 8530;
3. Run the command: wsusutil.exe usecustomwebsite false,  to change the 8530 port usage to 80 again.

2017年5月24日 星期三

Windows 10 Shows Windows Vista on Windows Server 2008R2 WSUS

請在WSUSDB裡面執行以下的語法,會將所有的Windows 10 Client MachineOS Description 修改成Windows 10
UPDATE [SUSDB].[dbo].[tbComputerTargetDetail]
SET [OSDescription] = 'Windows 10'
WHERE [OSMajorVersion] = '10'
AND [OSMinorVersion] = '0'
AND [OldProductType] = '1'

AND ([OSDescription] <> 'Windows 10' or [OSDescription] IS NULL) 

2017年5月11日 星期四

Error 2912 (0x80070534) happened when a host was added to VMM.

Cause
=========
The error occurred after the AD service account was renamed, and then the account mismatches with that in VMM registry.

Resolution
==============
1. Login to VMM server machine, and check the below registry:

     HKLM\Software\Microsoft\Microsoft System Center Virtual Machine manager Server\Setup\VMMerviceAccount

Please make note of the value.


2. Compare it with the account in AD side, and make sure they are matching.

2017年4月27日 星期四

SCOM Workgroup Monitoring – Disable AD Integration

To disable during setup:
Install the SCOM agent with the following command line: MOMAgent.msi USE_SETTINGS_FROM_AD=0 MANAGEMENT_GROUP=<Management Group Here>” MANAGEMENT_SERVER_DNS=<FQDN of management server here> /qb

To disable in the registry:
Open registry editor and nagivate to: “SYSTEM\CurrentControlSet\Services\HealthService\Parameters\ConnectorManager“.
Set the EnableADIntegration in the registry to 0′
Restart the HealthService (System Center Management)


2017年3月20日 星期一

Installing a server role on a server running a Server Core installation

Dism /online /enable-feature /featurename:Microsoft-Hyper-V
Dism /online /enable-feature /featurename:Microsoft-Hyper-V-Management-Clients /all

http://technet.microsoft.com/en-us/library/ee441260(v=ws.10).aspx

2017年2月16日 星期四

SCOM got a lot Monitoring failed event 4001 Part 2

SYMPTOMDate and Time: 2017/2/16 下午 04:46:07
Log Name: Operations Manager
Source: Health Service Script
Event Number: 4001
Level: 1
Logging Computer:
User: N/A
 Description:
Management Group: CDIBOPS. Script: Main Module: CPUUsagePercentDataSource.ps1 Version: 6.7.15.0 : Error occured during CPU Usage for SQL Instances data source executing. Computer:HDBSERVER1 Reason: Cannot add type. There were compilation errors. Position:325 Offset:29 Detailed error output: Cannot add type. There were compilation errors. -------- (0) : 未指定輸入 (1) : using System; -------- (0) : 找不到原始程式檔 'C:\Windows\TEMP\zsvypltn.0.cs' (1) : using System; 

CAUSE
There are some known errors to the 6.6.4.0 version of the SQL management packs, and one of them does mention “Cannot add type. Compilation errors occured.”
In a thread on the Technet Forums it was suggested that it has to do with rights, but focusing mainly on the SQL instance. What caught our eyes, however, was the fact that the script is using the
C:\Windows\TEMP folder instead of its private one. And this seems to be because it is using a few .Net components that do some sort of JIT compilation.
We took a quick look using procmon, filtered on C:\Windows\TEMP\ and yes indeed. The monitoring account used is trying to create and delete its temporary files in that very folder.

work-around
The work-around is simple, but cumbersome. Just make sure that the assigned RunAs account have read/write/delete rights on C:\Windows\TEMP.


SCOM got a lot Monitoring failed event 4001

SYMPTOM
Customer is getting access denied for some registry keys from the sql account:
Detailed error output: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Requested registry access is not allowed.
 
CAUSE
The SQLMPLowPriv, SQLDefaultAction account didn;t have the right permissions according to the MP guide.

Solution
I managed to find the reg key that needs permission:
SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Modules
 
Please give permissions on this reg key as this is a requirement from SCOM and should have had access to this key.


2017年2月15日 星期三

Upgrading to SQL 2014: Report Server version mismatch

Symptom
=============
If you have recently upgraded your SQL Server Reporting Services instance from SQL 2012 SP2 to SQL 2014, you may hit the following error message when trying to access your report server:
The version of the report server database is either in a format that is not valid, or it cannot be read. The found version is ‘163’. The expected version is ‘162’. (rsInvalidReportServerDatabase).

Cause
========
As part of a hotfix for SQL 2012 SP2 CU5, a change was made which resulted in a new ReportServer database version. Since this fix was made after the SQL2014 release, if your SQL2012 SP2 server is on CU5 or later, then it will have a higher database version than what SQL2014 RTM expects.

Solution
=========
We are porting the fix in the next cumulative update for SQL 2014, CU7. In order to fix the version mismatch, you should install CU7 or later onto your SQL2014 instance, which will allow the Reporting Services instance to correctly recognize the new database version.

Notes
======
If you have not yet upgraded, you can determine whether you will run into this issue by executing the following query against your ReportServer database:
SELECT MAX([DbVersion]) FROM [dbo].[DBUpgradeHistory] 

2017年1月11日 星期三

Size increasing on disk at "C:\PROGRAMDATA\MICROSOFT\WINDOWS\WER\REPORTQUEUE"

Symptom
=========
Size increasing on disk at "C:\PROGRAMDATA\MICROSOFT\WINDOWS\WER\REPORTQUEUE"


Resolution
===========
We followed the below steps to resolve the issue.
1. Delete C:\Windows\WinSxS\pending.xml and pending.xml.01xxxxxxxxxxxxxxxxxxxxxx
2. HKLM\COMPONENTS\Value - PendingXmlIdentifier and Value - AdvancedInstallersNeedResolving  and Value - NextQueueEntryIndex existed. Deleted them.
3. Rebooted the machine.
4. Ran sfc /scannow

5. Deleted the contents of :\PROGRAMDATA\MICROSOFT\WINDOWS\WER\REPORTQUEUE 

2017年1月9日 星期一

Change The default maximum size of XML WSUS Server

To adjust the maximum size of XML allowed per request, you will need to adjust a setting within the WSUS SUSDB database.

You can adjust this setting by running the following SQL script on the WSUS server:
==========
USE SUSDB
GO
UPDATE tbConfigurationC SET MaxXMLPerRequest = 0
==========
NOTE: You will need to run this on the WSUS/SUP. You should check to see if the SUSDB is hosted by the default Windows Internal Database (WIDS) or by full SQL. You can check the following registry keys on the SUP to determine what is hosting SUSDB:
HKLM\SOFTWARE\Microsoft\Update Services\Server\Setup\SqlServerName

2017年1月4日 星期三

Windows 7 SP1 it's not possible to patch the client because no updates are being downloaded neither from internal WSUS.

Action Plan
============
Please manually install the latest WSUS agent by hotfix and reboot 

Windows Update Client for Windows 7 and Windows Server 2008 R2: March 2016

https://support.microsoft.com/en-us/kb/3138612