You're welcome, I'm glad you have found it useful! I was hoping someone else out there besides me would. I created the script in Powershell 7.2.1 and have not tested it in older versions. As you experienced errors running it in an older version (I'd assume the built-in Windows OS version 5.1) I'd say it's safe to say the script requires at least version 7.0 to run successfully. In the readme on the github page I do include a link to the latest Powershell downloads from MS to help out those who may need to update their Powershell.