I disagree about running these scripts before the conversion. The directory remediation clearly states to do this after OLMA is disabled in the new Office 365 tenant space in a Live@Edu to Office 365 upgrade scenario.
As to the error you are running into. I believe it may be a simple case sensitivity issue. When running the script ensure that your LDAP query starts with a capitalized LDAP
-LDAP "LDAP://
Whereas -LDAP "ldap:// will fail.
Regards,
Kyle