Skip to content

You cannot call a method on a null-valued expression. #114

@asktechsupport

Description

@asktechsupport
You cannot call a method on a null-valued expression.
At line:36 char:5
+     $output = $process.StandardOutput.ReadToEnd()
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
 
ConvertFrom-Json : Cannot bind argument to parameter 'InputObject' because it is null.
At line:39 char:27
+         $json = $output | ConvertFrom-Json
+                           ~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [ConvertFrom-Json], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ConvertFromJsonCommand

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions