Sep 22, 2011

Installing SCOM 2007 R2 on a SQL 2008 Instance with all Windows Firewalls Enabled.

I decided I needed to re-install my lab environment.  I wanted to keep all of the firewalls on during the install process and only open the ports that are actually needed. I installed SQL using a named instance as many customers use a SQL 2008 cluster.
After I installed the SCOM database on the SQL 2008 server with all firewalls on.  I created a firewall rule to let port 1433 allow connections.  As specified in the Supported Configurations doc
Root management server 1433 —> OperationsManager database
1
I also setup a firewall rule to allow port 1434 back to the RMS server from the SQL Instance Server. (Also in the guide)


Root management server 1434 UDP < — OperationsManager database
2
I start the install of SCOM to the RMS server.  I unchecked Database as my database is already install the on the SQL instance.
3
I typed in my SC Database Instance Name and clicked Next
4
But I got this error “Setup cannot location the SC database”
5
So I enabled firewall logging to see what was getting dropped blocked by setting the firewall to log dropped packets.
6

In the SCOM setup I clicked back and then next.
I checked the firewall logs in %systemroot%\system32\Logfiles\Firewall\pfirewall.log  and it looks like UDP port 1434 is being dropped

datetimeactionprotocolsrc-ipdst-ipsrc-portdst-portsizepath
12/26/201016:56:54DROPUDP192.168.2.63192.168.2.6158321143438RECEIVE

I create another rule on the SQL server to enable UDP port 1434
8

In the SCOM setup I click back and next again.

Once again same failure.  “Setup cannot location the SC database”
Back to the firewall logs.  It now needs TCP port 62756 (Not in the guide)
datetimeactionprotocolsrc-ipdst-ipsrc-portdst-portsizepath
12/26/201017:12:03DROPTCP192.168.2.63192.168.2.61505036275638RECEIVE


I create another rule on the SQL server to enable TCP port 62756
7
After that rule is enabled I am able to continue on a install SCOM successfully with all of the windows firewalls still on.

Aug 25, 2011

HTTP 500 Error with Large Reports in SCCM 2007

If you have more than a couple thousand clients in your SCCM 2007 site and have ever tried to run a large report (like “Hardware 01A – Summary of computers in a specific collection” against the All Systems collection, for example), you’ve probably encountered this HTTP 500 error:
image
This problem and resolution are pretty well documented for Windows Server 2003 and IIS6, but in this particular case we’re running Windows Server 2008 SP2, so we’re using IIS7.  The underlying cause is the same (default ASP Buffering Limit is set too low to handle the size of the report) and the fix is the same (increase the limit), but the steps to fix are just a little different for IIS7:


1. Launch IIS Manager
2. Click on the server name in the left pane to bring up the features for IIS (if you have more than just the SCCM reporting hosted in IIS and don’t want to modify this setting for all sites, expand the Sites node and click Default Web Site to bring up the features for just that site)
3. Double-click on the ASP feature
image
4. Expand the Limits Properties node and find the Response Buffering Limit item.
image
By default it’s set at about 4MB (4194304 bytes).  The general rule of thumb is about 1MB per 1000 records, but you may want to go with 1.5 to 2 MB just to be safe.  Modify the value and click Apply in the actions pane.
5. Restart IIS.
Now when you run your report you should actually get the results!
image
As you can see, in this case we had around 4500 records, which was just enough to fill the response buffer and generate the error.  Bumping it up to 10k bytes to accommodate future growth was more than enough to resolve the issue.

Useful ConfigMgr Resources

========================================================
ConfigMgr Resources/Information:
ConfigMgr Design Resources
OS Deployment
Out of Band Management

Aug 24, 2011

Moving SCCM to a New Server

There may come a time where you need to move you SCCM environment to a new server. This will help make that process as possible.
When needing to move SCCM to new hardware you must remember:

  1. The side code cannot be renamed without uninstalling SCCM and reinstalling or standing up a new SCCM server (side-by-Side) migration.

  2. You must keep the same server name as the existing SCCM server.

  3. You must also keep the same drive structure as the existing SCCM server.

So what are the steps you need to take?

  1. Backup the site settings and database of the SCCM Server

  2. Backup local folders (if any) used for package sources: (source folder, drivers folder…etc). Make a note of the permissions as well.

  3. Decommission the SCCM Server and remove from the domain.
    1. Note: Name, IP, site code, installation path,


  4. Build the new server with the information from step 3.
    1. Install and configure all SCCM prerequisites

    2. If SQL was local before Install the same SQL version and any updates

    3. Install SCCM 2007 to the same patch level, directory, site code from the old SCCM server


  5. Restore folders used for SCCM (Sources, drivers, packages, and set permissions

  6. Restore the SCCM database from the old server using the Site repair wizard

  7. Resolve any errors under the site status.

I hope this blog helps you with your transition

WSUS failed to sync some of the updates

I came across an issue where I was noticing errors in the SMS_WSUS_SyncUpdates Component. Every time the synchronization ran for windows updates, I would get the following:
SMS WSUS Synchronization failed.


Message: Failed to sync some of the updates.
Source: Microsoft.SystemsManagementServer.SoftwareUpdatesManagement.WSyncAction.WSyncAction.SyncUpdates.

This typically has to do with the EULA agreement with some updates. This error should clear up at the next synchronization. However in this case it did not.
Trying a reboot of the server, SCCM Services, WSUS did not help. This was happening with a handful of updates.
To resolve this issue:
I also added the network services account to the root of the WSUS folder as it was missing.
Next I ran a wsustuil -reset
I also uninstalled the SUP role, waited about 5 minutes then reinstalled the role. I then kicked off a synchronization which ran a full synchronization again.
I monitored the wsyncmgr.log file to ensure the updates are synchronizing.

It took some time to do the full synchronization but it completed successfully without reproducing the synchronization errors.

Aug 18, 2011

Of duplicate computer accounts in SCCM

Recently wrote a little script that deletes duplicate computer accounts in SCCM. This is because I have included the addition of computers from AD





#Region Description
#
# Name       : remove-DuplicateComputers.ps1
#
# Version    : 1.0
# Web        :
# Date       : 21-12-2010  
# Description: Find duplicate computer objects to SCCM and delete
#             
#EndRegion
#Region Functions
#EndRegion
[array]$ArrayComps=$null
$ConnStr="Provider=MSDASQL;DSN=SMS_TB1;"
$sSQL="select T.Name0, T.CountName
from (select dbo.v_R_System.Name0, count(*) as CountName
from dbo.v_R_System
Group By dbo.v_R_System.Name0 ) as T
where T.CountName > 1
ORDER BY T.Name0"
$adoSQL= New-Object -ComObject  ADODB.Connection
$rsSheet= New-Object -ComObject ADODB.Recordset
$adoSQL.ConnectionString=$ConnStr
$adoSQL.Open()
$rsSheet.Open($sSQL,$adoSQL)
if(!$rsSheet.EOF)
{
 $meter=0
 while (!$rsSheet.EOF){
  $ArrayComps+=@{Name=$rsSheet.Fields.Item("Name0").Value;Count=$rsSheet.Fields.Item("CountName").Value; BadID="";LastDate=$null;}
  $rsSheet.MoveNext()
 }
}
if (!$adoSQL)
{
 $adoSQL.Close()
}
$adoSQL=$null
$meter=0
$meter2=0
foreach ($Comp in $ArrayComps)
{
 Get-WmiObject -Namespace "Root\SMS\site_TB1" -Query  ("select * from SMS_R_System where Name = '"+$Comp.Name+"' ") | %{
  if (!$_.Client -and !$_.Active)
  {
   $Comp.BadID=$_.ResourceId
   #$_.Delete()
   Write-Host "№"($meter++)" Computer " $Comp.Name "with ID="$_.ResourceId "Deleted!!!" -ForegroundColor Red
  }
  else
  {
   if ($Comp.LastDate)
   {
    if ($_.SMSUUIDChangeDate -ge $Comp.LastDate)
    {
     Write-Host "---№"($meter2++)" Computer " $Comp.Name "with ID="$Comp.BadID "Deleted!!!" -ForegroundColor Red
    }
    else
    {
     Write-Host "---№"($meter2++)" Computer " $Comp.Name "with ID="$_.ResourceId "Deleted!!!" -ForegroundColor Red
    }
   }
   else
   {
    $Comp.LastDate=[double](($_.SMSUUIDChangeDate).split("."))[0]
    $Comp.BadID=$_.ResourceId
   }
  }
   
 }
}
#$ArrayComps | ?{!$_.BadID}

Jun 28, 2011

SCOM: Monitoring Windows Event Logs Using SCOM

Problem
1


Step: 1 Create a Monitor
Open “Authoring” Pane, select “Monitors”
2

Right click on “Monitors”, choose “Create a Monitor” and choose “Unit Monitor”
3
Expand “Windows Events” then expand “Simple event detection” and choose “Manual Reset” then choose you management pack where you are planning to save this “Monitor”
4
Type “Name” for this Monitor i am using “failure of Differential backup” and write a brief “Description” and in “Monitoring Target” i am choosing “Windows Server Operating System” because in my environment “Symantec backup exec” in installed on windows 2003 and 2008 servers, not click Next
5
choose the “Log Name” where your application write “event logs” in my case “Symantec Backup Exec” writes event in “Application Log” that’s why i choose “Application” now click on Next
6
Now we need to provide the Event ID and Event Source in Expression Builder so that is any event log matched this criteria created SCOM can alert us. In My case “Event ID is 34113” and Event Source is “Backup Exec” , now click on NEXT
7
Now we need to “Configure Health Conditions” so If “Event is Raised” then the status is “Warning” otherwise it is “Healthy” now click on “Next”
8
We need an alert when is Event is Created , so click on “Generate Alerts for this Monitor” and click on “Create”
9

Step: 2 Create a subscription
I am creating a New Subscription for it so that whenever this Event ID creates or Backup Job Fails then it should send an alert "our “Backup Administrators”
Click on “Administration” and Select “Subscriptions”
10
Right click on “Subscriptions” and choose “New Subscriptions”
11
Now Type “Subscription Name” and Description and click Next
12
In “Subscription Criteria” click on “Created by Specific rules or Monitors” and choose our previously created “Monitor” “Failure of Differential backup” and click on Next
13
Add users which intended to receive the alerts, after adding users click on NEXT
14 
Choose Channels by which you are going to send an alerts, in my case I am sending alerts using an email. click NEXT
15
Click on “Enable this notifications subscription” and click on Finish.
16

Step: 3 Testing
Now its time to test the monitor, I used Logevent.exe to create an demo alert in window Application Log. See this link to know more about Logevent utility.
18

Step: 4 Result
Bingo !!! It shows warning in SCOM Alert window.
19
and it also send me an email about this alert :-)
20