PS script error

Iqbal, Mohammed Shahid [CORP/AE] 0 Reputation points
2025-04-10T11:39:30.33+00:00

Hello Team,

I get the below error while running the PS script...

The property 'Configuration' cannot be found on this object. Verify that the property exists and can be set.

At line:49 char:1

  • $obj.Configuration = [System.Net.WebUtility]::HtmlEncode($MultiKioskM ...
  • 
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    
        + FullyQualifiedErrorId : PropertyNotFound
    
     
    
    

Set-CimInstance : Cannot bind argument to parameter 'InputObject' because it is null.

At line:51 char:30

  • Set-CimInstance -CimInstance $obj
  •                          ~~~~
    
    • CategoryInfo : InvalidData: (:) [Set-CimInstance], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.Management.Infrastructure.CimCmdlets.SetCimInstanceCommand
Windows for business Windows Server User experience PowerShell
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 47,901 Reputation points
    2025-04-10T18:32:37.0966667+00:00

    The variable "$obj" hasn't been initialized. Its value is $null.

    This seems to me to be a pretty clear explanation of the error when you tried to use $obj:

    Set-CimInstance : Cannot bind argument to parameter 'InputObject' because it is null.
    Set-CimInstance -CimInstance $obj

    The actual error is:

    ParameterArgumentValidationErrorNullNotAllowed

    Add this cmdlet at the top of your script to detect common errors (like the one you asked about) before you encounter them at runtime:

    Set-PSDebug -Strict

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.