The WriteObject and WriteError methods cannot be called after the pipeline has been closed. Please contact Microsoft Support ...