this is normally caused by 'unassigned' COM method calls
Can't test this currently but try to assign a dummy var to some of your calls.

ie. $nul = $objConnection.Open ("Provider=ADsDSOObject;")
_________________________