Extending Windows Computer class from a CSV file in SCOM


<!--[if lt IE 9]>

<![endif]-->


Comments (3)

  1. T. Robijns says:

    Hello Kevin,
    Wonderful post, as always.
    Small unrelated suggestion: If your function “Is-ClassMember” would return the boolean $true/$false instead of the string”true”/”false”, you can use it immediately in your IF clause:

    #Check and see if the $FQDN value contains a computer that exists as a Windows Computer in SCOM
    $IsSCOMComputer = Is-ClassMember $FQDN
    If ($IsSCOMComputer -eq “True”)

    would then become:
    If (Is-ClassMember -InstanceDisplayName $FQDN)

    Thank you for the enormous insight into SCOM

  2. steven says:

    how can we change to what info to be discover by the SCOM you have declared like tier, groupid n owner

  3. chunfeng zhang says:

    Hello Kevin,
    First of all thank you for the article provided.
    I tried this method successfully expanded microsoft.windows.computer class.
    But I think there is a problem extending Microsoft.SystemCenter.VirtualMachineManager.2016.HyperVHost,
    I do not know the following line of script right or wrong.
    # ——————————————————————–
    $Inst = $discoveryData.CreateClassInstance(“$MPElement[Name=’AC!Assets.Core.HyperVHost’]$”)
    $Inst.AddProperty(“$MPElement[Name=’MSVL!Microsoft.SystemCenter.VirtualMachineManager.HyperVHost’]/VMMId$”, $VMMId)
    $Inst.AddProperty(“$MPElement[Name=’AC!Assets.Core.HyperVHost’]/FQDN$”, $FQDN)
    $Inst.AddProperty(“$MPElement[Name=’AC!Assets.Core.HyperVHost’]/AssetStatus$”, $AssetStatus)
    # ——————————————————————–

    Thank you very much for your help!

Skip to main content