Hi,
Thanks for your question.
The error was because you are trying to execute a method that does not exist.
The simple answer for this one is that you have an undeclared (null) variable. In this case it is $spoFolder. Please try to check the output of $spoFolder. Use "Get-member" cmdlet to get the methods of the object.
Also, please try to post your question on the author's QA page as Jrv said.
Best regards,
Lee
Just do it.