Yes those first lines are just making a connection and yes you only need them once.

The Execute() method of the Command object ($objCommand.Execute()) returns a recordset, which is not exactly an array.

The $OU variable holds the path to the OU the computer is in. So that when we search for printers, we can just target that OU. If we didn't find the computer in AD with the original query, then we have no OU to use with the printer query.

And I'm not sure i have ever tried "Select * ..." with the AD queries. But I'm fairly certain that will return quite a large recordset. If you know which fields you need, I'd suggest just SELECTing them individually
_________________________
Eric