Well, I have the pack created but I am not seeing a discovered object.
So here is the class definition.
<ManagementPackFragment SchemaVersion="2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<TypeDefinitions>
<EntityTypes>
<ClassTypes>
<ClassType ID="WSUS.Client.Management.Seed" Base="Windows!Microsoft.Windows.ApplicationComponent" Accessibility="Public" Abstract="false" Hosted="false" Singleton="false">
<Property ID="SubsystemName" Type="string" AutoIncrement="false" Key="true" CaseSensitive="false" MaxLength="5" MinLength="0" Required="false" Scale="0" />
<Property ID="WindowsUpdateEnabled" Type="string" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="5" MinLength="0" Required="false" Scale="0" />
</ClassType>
</ClassTypes>
</EntityTypes>
</TypeDefinitions>
<LanguagePacks>
<LanguagePack ID="ENU" IsDefault="true">
<DisplayStrings>
<DisplayString ElementID="WSUS.Client.Management.Seed">
<Name>Seed Class</Name>
<Description></Description>
</DisplayString>
<DisplayString ElementID="WSUS.Client.Management.Seed" SubElementID ="SubsystemName">
<Name>Subsystem Name</Name>
<Description>Subsystem Name</Description>
</DisplayString>
<DisplayString ElementID="WSUS.Client.Management.Seed" SubElementID ="WindowsUpdateEnabled">
<Name>WSUS Enabled</Name>
<Description>Shows if WSUS is enabled</Description>
</DisplayString>
</DisplayStrings>
</LanguagePack>
</LanguagePacks>
</ManagementPackFragment>
And here is the discovery script. It should be noted that I am seeing the Event 998 properly filled out in the log.
Sub LogDebugEvent(EventNo,Message)
Message = VbCrLf & Message
If bDebug = 1 Then
Call oAPI.LogScriptEvent("WUAUDiscover.vbs",EventNo,EVENT_LEVEL_INFO,Message)
End If
End Sub
SourceId = WScript.Arguments(0)
ManagedEntityId = WScript.Arguments(1)
sComputerName = WScript.Arguments(2)
bDebug=WScript.Arguments(3)
if (Wscript.Arguments.Count=4) Then
isVirtualNode = "False"
Else
isVirtualNode ="True"
end If
Set oAPI = CreateObject("MOM.ScriptAPI")
Set oDiscoveryData = oAPI.CreateDiscoveryData(0, SourceId, ManagedEntityId)
Set WshShell = WScript.CreateObject("WScript.Shell")
iUseWSUS = WshShell.RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\UseWUServer")
LogDebugEvent 999, "Server " & sComputerName & " is virtual " & isVirtualNode & " and AU is set to " & iUseWSUS
if (isVirtualNode="False") Then
if (iUseWSUS=1) Then
LogDebugEvent 998, "Server " & sComputerName & " should have an instance created."
Set oInstance = oDiscoveryData.CreateClassInstance("$MPElement[Name='WSUS.Client.Management.Seed']$")
oInstance.AddProperty "$MPElement[Name='WSUS.Client.Management.Seed']/SubsystemName$", sComputerName
oInstance.AddProperty "$MPElement[Name='System!System.Entity']/DisplayName$", sComputerName
oInstance.AddProperty "$MPElement[Name='WSUS.Client.Management.Seed']/WindowsUpdateEnabled$", "True"
oDiscoveryData.AddInstance(oInstance)
end If
End If
oAPI.Return(oDiscoveryData)
But I still do not see any objects in SCOM.