Update:
I have not resolved the original issue I posted of running the OnboardingScript.ps1 error, but I have a workaround with the help of the following document: https://learn.microsoft.com/en-us/azure/azure-arc/servers/onboard-portal
In short,
Step 1:
Copy the AzureConnectedMachineAgent.msi to your server. I added this to my desktop and ran the installer manually.
Step 2:
Once you can confirm the Agent has installed and can see it in your Programs you then need to configure it to communicate with the Azure Arc service by running the following command from Command Prompt:
"%ProgramFiles%\AzureConnectedMachineAgent\azcmagent.exe" connect --resource-group "resourceGroupName" --tenant-id "tenantID" --location "regionName" --subscription-id "subscriptionID"
Replace the resource group name, tennant ID etc with your environment information and click enter.
As this runs, part way through you will be prompted to navigate to https://microsoft.com/devicelogin via your browser (as you would when the OnboardingScript.ps1 actually works) and enter the code that is provided. This has worked for me just fine.
I still have an open ticket with MS Support to see if we can resolve the original error, but honestly this takes about the same amount of time all in all.
I hope this helps anyone else having the same issue.