Issue is I am trying to use parallelization to add a generated object which is a custom object.
My custom class is
class Foo{
[string]$AuditArea
[string]$FooName
[String]$FooId
Foo () {}
}
$Records = [System.Collections.Concurrent.Concurrentbag[Foo]]::new()$bar = [Foo]::New()$Records.tryadd($bar)MethodException: Cannot convert argument "item", with value: "", for "TryAdd" to type "Foo": "Cannot convert the "Foo" value of type "Foo" to type "Foo"."