Sort of fixed it - I ran the following 2 commands first:
$bits = "D:\Software\SP2010\AutoSPInstaller\SP"
$spyear = 2010
then ran Configure-PDFSearchAndIcon $xmlinput - which worked.
$bits = "D:\Software\SP2010\AutoSPInstaller\SP"
$spyear = 2010
then ran Configure-PDFSearchAndIcon $xmlinput - which worked.