Onboard-CloudHybridSearch.ps1 : Method invocation failed because [System.String] does not contain a method named ‘SetProperty’.

Onboard-CloudHybridSearch.ps1 : Method invocation failed because [System.String] does not
contain a method named ‘SetProperty’.