none
Does anyone know what this errors could mean?`Exception calling "Approve" with "2" argument(s): "Value cannot be null.` RRS feed

  • Question

  • I have no idea what this error means and how to fix it, could anyone help me with it? Thanks in advance

    Exception calling "Approve" with "2" argument(s): "Value cannot be null.
    Parameter name: targetGroup"
    At C:\Program Files\wsus-operations\Script\operations.ps1:288 char:13
    +             $patchmatch.Approve($action,$targetgroup)
    +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : ArgumentNullException

    --------------------------------Yes Security Update for Windows XP (KB896423)
    Exception calling "Approve" with "2" argument(s): "Value cannot be null.
    Parameter name: targetGroup"
    At C:\Program Files\wsus-operations\Script\operations.ps1:288 char:13
    +             $patchmatch.Approve($action,$targetgroup)
    +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : ArgumentNullException

    --------------------------------Yes Update for Windows XP (KB894391)

    Line @ 288:col13: `$patchmatch.Approve($action,$targetgroup)`


    Monday, July 13, 2015 3:04 PM

Answers

  • Your arguments are the two variables, $action and $targetgroup. The error message is telling you that the .Approve() method threw an error because one of the arguments (those two variables) didn't contain a value (it was null). You need to go back to your script and figure out why that variable didn't contain a value.

    Edit: In case you didn't see it yourself, the error indicates that targetGroup was null.


    Monday, July 13, 2015 3:10 PM