All posts by Jonathan Almquist

Get-ClassPath

I updated my getClassPath script to work with OpsMgr 2012 cmdlet’s.

Original OpsMgr 2007 script is here: http://blogs.technet.com/b/jonathanalmquist/archive/2008/11/01/get-monitoringclass.aspx

#begin

##This script accepts a class name, and returns the entire
##Base class path. It also returns Host Class for each
##Base class returned. Essentially, you’ll see the entire
##class path for the given class.
##Jonathan Almquist
##info@scomskills.com
##version 2.0
##updated on 9/25/2012
##Usage = Get-ClassPath.ps1 <class_name>
##Example = Get-ClassPath.ps1 Microsoft.Windows.Computer

param($classname)
$ast = "-"
$class = get-scomclass | where {$_.name -eq $classname}
Write-Host ($ast * 50)
Write-Host "TARGET CLASS" $class
Write-Host ($ast * 50)`n
while ($class -ne "False")
    {
    $property = $class | foreach-object {$_.getProperties()} | Select-Object name
    foreach ($value in $Property)
        {
        if ($value.name -ne $null)
            {
            write-host `t`t`t`t $value.name
            }
            else
            {
            Write-Host `t`t`t`t "No properties"
            }
        }
    write-host `n
    Write-Host ($ast * 50)
    Write-Host "BASE CLASS PATH for" $class
    Write-Host ($ast * 50)`n
    $baseclass = get-scomclass | where {$_.id -eq $class.base.id.tostring()}
    While ($baseclass.base.id -ne $NULL)
        {
        $baseclass.name
        $property = $baseclass | foreach-object {$_.getProperties()} | Select-Object name
        foreach ($value in $Property)
            {
            write-host `t`t`t`t $value.name
            }
        $baseclass = get-scomclass | where {$_.id -eq $baseclass.base.id.tostring()}
        }
    if ($class.hosted -eq "True")
        {
        $hostclass = get-scomclass | where {$_.name -eq $Class.Name} | ForEach-Object {$_.findHostClass()}
        write-host `n
        Write-Host ($ast * 50)
        Write-Host "HOST CLASS for" $class
        Write-Host ($ast * 50)`n
        $class = get-scomclass | where {$_.name -eq $Class.Name} | ForEach-Object {$_.findHostClass()}
        Write-Host $class
        }
        else
        {
        write-host `t`t "*Not Hosted*" `n`n
        $class = "False"
        }
    }

#end

 

Enjoy!

Data warehouse configuration failed to install

Had a problem today installing an additional management server using the installation wizard. Installation stopped and rolled back at the Data Warehouse Configuration step (Data warehouse configuration failed to install).

image

I didn’t see anything too unusual in the logs, so it was a bit confusing. I asked Boklyn Wong (MCS) to check into the problem, and he discovered that there is sometimes an issue with the installation wizard when using non-standard database ports (which we are). He suggested I attempt to install via command line, and this worked for us.

setup.exe /silent /install /components:OMServer /SqlServerInstance: <server\instance> /SqlInstancePort: <port> /DatabaseName: OperationsManager /DWSqlServerInstance: <server\instance> /DWSqlInstancePort: <port> /DWDatabaseName:OperationsManagerDW /ActionAccountUser: <domain\account> /ActionAccountPassword: <password> /DASAccountUser: <domain\account> /DASAccountPassword: <password> /DataReaderUser: <domain\account> /DataReaderPassword: <password> /DataWriterUser: <domain\account> /DataWriterPassword: <password> /EnableErrorReporting: Always /SendCEIPReports: 0 /UseMicrosoftUpdate: 0

 

Only problem is there doesn’t appear to be an installation path switch, so if you’re installing to anywhere but the default c:\program files, you may need to search a little more for the installation path switch.

Reference: http://technet.microsoft.com/en-us/library/hh416216.aspx

Troubleshooting network device discovery–snmputil

UPDATE (09/04/2015): SNMPUtil is just one method for checking connectivity, but these days I prefer to use SNMPWalk or some other utility. I’m keeping this post here for archival purposes.

One of the first things you might want check while troubleshooting network device discovery in OpsMgr 2012 is to verify whether the network discovery server can connect to to the SNMP agent on the device. There are a few reasons why a network discovery server cannot connect to the device via SNMP, and one of the easiest methods to test this is to use a the SNMPUtil tool. This tool was included with the Windows 2000 resource kit (which is becoming increasingly difficult to find).

Here is a simple command to use to test whether a device is reachable from the network discovery server:

snmputil getnext <IP Address or FQDN> <community string> .1.3

Just replace IP Address or FQDN and Community String with your varables.

If the device is reachable via SNMP, you will receive a message similar to the following:

image

If the device is not reachable, you will receive a message similar to the following:

image

Service Principal Name Configuration Status – SQL Server cannot authenticate using Kerberos

Marnix did a post on this a while back, but I wanted to supplement what he wrote with some additional information.

If your SQL Service account exists in another domain, this monitor will not work because line 597 of the data source script queries LDAP instead of GC.

Set oRootDse = GetObject(“LDAP://RootDSE”) should be Set oRootDse = GetObject(“GC://RootDSE”)

If you are affected by this issue, you’ll need to fix the script – which means rewriting the monitor.