I’ve created a function to read some WMI objects and a function to set a property on one of the attributes of each object returned from this function. All functions work properly without pipeline input but I want to change that.
The output of the “Get” function looks like this:
I’ve created a function that looks like this:
I’m assuming if I’ve got the $InputObject param object type set correctly then the params for the Disable function will be bound to the $InputObject by value. However, I’m consistently getting the error like it’s not. I’m trying to use data from a CSV that works if I just use each row of the CSV into the Get cmdlet but whenever I try to pipe that to the Disable cmdlet I get the below error.