You can release the memory on the COM objects created from the Excel interop class using something like: $set ilusing"System.Runtime.InteropServices" Invoke type Marshal::FinalReleaseComObject(myworkbook) * invoke type Marshal::FinalReleaseComObject(myworkbooks) etc... invoke type GC::Collect
↧