Dec 03 2019 07:47 AM
When I run CreateSRSMedia.ps1 under an Administrator PowerShell console, I get an error:
“Cannot convert the "System.Object[]" value of type "System.Object[]" to type "System.Version". At line:1 char:1” (Running it from C:\MTR\CreateSRSMedia.ps1).
No useful information on what went wrong provided. Any idea what could be wrong???
It is step #1 on this page:
https://docs.microsoft.com/en-us/microsoftteams/room-systems/console#prepare-the-installation-media
I opened a Premier Performance Support ticket, but haven't been able to get a tech who knows what that script is so far. :(
Dec 03 2019 11:54 AM
Dec 03 2019 11:57 AM
@Paul Lange Thanks for the reply.
Unfortunately, in the transcript, all it says after the usual "start transcript" information (computer information, PSVersion, etc.) all it says is:
Host OS version 10.0.18362.476
Script version 1.5.0
Found CreateSRSMedia already downloaded.
Validating signature for update.ps1...
success.
End transcript.
:(
Dec 03 2019 12:46 PM
Dec 03 2019 01:06 PM
@Paul Lange I appreciate your assistance. I created a new C:\temp directory and copied the CreateSRSMedia.ps1 script over so it was the only file in that directory. I executed the script with the same results. :(
Dec 03 2019 10:51 PM
@Richard Eklund Ok - since it is difficult to say why the script fails if you are remote I would recommend to try another PC and run it there.
Dec 04 2019 06:27 AM
@Paul Lange Thanks. I am rebuilding another system to try it on right now. Unfortunate it doesn't give any indication to where it fails.
Dec 04 2019 08:05 AM
SolutionI finally figured it out. I have a profile.ps1 in my WindowsPowerShell directory in my documents folder. I didn't use it anymore, but had a "Write-Host" line in there, which I didn't comment out from when I did.
I was able to replicate it by deleting the contents of profile.ps1 and putting write-host "Test" in the file. Launching powershell then gives the error. If I delete it or delete the contents of profile.ps1 so there is no write-host entries, it works fine. Write-Output also gives the error when launching this script.
I tried a few other commands, such as changing directories, and it worked fine, but write-host or write-output in the profile.ps1 broke the script.
Jan 31 2024 01:44 AM
Dec 04 2019 08:05 AM
SolutionI finally figured it out. I have a profile.ps1 in my WindowsPowerShell directory in my documents folder. I didn't use it anymore, but had a "Write-Host" line in there, which I didn't comment out from when I did.
I was able to replicate it by deleting the contents of profile.ps1 and putting write-host "Test" in the file. Launching powershell then gives the error. If I delete it or delete the contents of profile.ps1 so there is no write-host entries, it works fine. Write-Output also gives the error when launching this script.
I tried a few other commands, such as changing directories, and it worked fine, but write-host or write-output in the profile.ps1 broke the script.