When executing the script, I get an error in the command "$CSV += $NieuwePC"
Method invocation failed because [System.Management.Automation.PSObject] does not contain a method named 'op_Addition'.
I do not understand what this message meant and how to solve it.
From what I can tell, you are trying to add a new PC to a CSV if it doesn't exist or update an existing record if it does. The error is because the PSCustomObject doesn't have an add method. I would write this as a function and let the pipeline take care of adding it the the CSV.