SOLVED

Error running CreateSRSMedia.ps1 - Microsoft Teams Rooms USB image creation

%3CLINGO-SUB%20id%3D%22lingo-sub-1044277%22%20slang%3D%22en-US%22%3EError%20running%20CreateSRSMedia.ps1%20-%20Microsoft%20Teams%20Rooms%20USB%20image%20creation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1044277%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20I%20run%20CreateSRSMedia.ps1%20under%20an%20Administrator%20PowerShell%20console%2C%20I%20get%20an%20error%3A%3C%2FP%3E%3CP%3E%E2%80%9CCannot%20convert%20the%20%22System.Object%5B%5D%22%20value%20of%20type%20%22System.Object%5B%5D%22%20to%20type%20%22System.Version%22.%20At%20line%3A1%20char%3A1%E2%80%9D%20(Running%20it%20from%20C%3A%5CMTR%5CCreateSRSMedia.ps1).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENo%20useful%20information%20on%20what%20went%20wrong%20provided.%20Any%20idea%20what%20could%20be%20wrong%3F%3F%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20is%20step%20%231%20on%20this%20page%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Froom-systems%2Fconsole%23prepare-the-installation-media%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Froom-systems%2Fconsole%23prepare-the-installation-media%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20opened%20a%20Premier%20Performance%20Support%20ticket%2C%20but%20haven't%20been%20able%20to%20get%20a%20tech%20who%20knows%20what%20that%20script%20is%20so%20far.%20%3A(%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1044277%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%20Rooms%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMTR%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESkype%20Room%20Systems%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESRSv2%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1045049%22%20slang%3D%22en-US%22%3ERe%3A%20Error%20running%20CreateSRSMedia.ps1%20-%20Microsoft%20Teams%20Rooms%20USB%20image%20creation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1045049%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3E%3CBR%20%2F%3Ethere%20should%20be%20a%20transcript.%3CBR%20%2F%3EFor%20me%20this%20is%20in%20my%20documents%20folder.%3CBR%20%2F%3EMay%20be%20this%20file%20helps.%3CBR%20%2F%3E%3CBR%20%2F%3ERegards%2C%3CBR%20%2F%3E%3CBR%20%2F%3EPaul%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1045052%22%20slang%3D%22en-US%22%3ERe%3A%20Error%20running%20CreateSRSMedia.ps1%20-%20Microsoft%20Teams%20Rooms%20USB%20image%20creation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1045052%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F44596%22%20target%3D%22_blank%22%3E%40Paul%20Lange%3C%2FA%3E%26nbsp%3BThanks%20for%20the%20reply.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUnfortunately%2C%20in%20the%20transcript%2C%20all%20it%20says%20after%20the%20usual%20%22start%20transcript%22%20information%20(computer%20information%2C%20PSVersion%2C%20etc.)%20all%20it%20says%20is%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHost%20OS%20version%2010.0.18362.476%3C%2FP%3E%3CP%3EScript%20version%201.5.0%3C%2FP%3E%3CP%3EFound%20CreateSRSMedia%20already%20downloaded.%3C%2FP%3E%3CP%3EValidating%20signature%20for%20update.ps1...%3C%2FP%3E%3CP%3Esuccess.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEnd%20transcript.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3A(%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1045211%22%20slang%3D%22en-US%22%3ERe%3A%20Error%20running%20CreateSRSMedia.ps1%20-%20Microsoft%20Teams%20Rooms%20USB%20image%20creation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1045211%22%20slang%3D%22en-US%22%3ELooks%20like%20it%20fails%20after%20%22Test-Signature%20%24UpdatedScript%22%3CBR%20%2F%3ECan%20you%20try%20to%20delete%20the%20files%20and%20folders%20that%20were%20downloaded%20in%20C%3A%5CMTR%5CCreateSRSMedia.ps1%20and%20try%20it%20again%3F%3CBR%20%2F%3EOr%20you%20could%20copy%20the%20script%20to%20c%3A%5Ctemp%20and%20try%20it%20again%20from%20there.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1045242%22%20slang%3D%22en-US%22%3ERe%3A%20Error%20running%20CreateSRSMedia.ps1%20-%20Microsoft%20Teams%20Rooms%20USB%20image%20creation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1045242%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F44596%22%20target%3D%22_blank%22%3E%40Paul%20Lange%3C%2FA%3E%26nbsp%3B%20I%20appreciate%20your%20assistance.%20I%20created%20a%20new%20C%3A%5Ctemp%20directory%20and%20copied%20the%20CreateSRSMedia.ps1%20script%20over%20so%20it%20was%20the%20only%20file%20in%20that%20directory.%20I%20executed%20the%20script%20with%20the%20same%20results.%26nbsp%3B%20%3A(%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1045847%22%20slang%3D%22en-US%22%3ERe%3A%20Error%20running%20CreateSRSMedia.ps1%20-%20Microsoft%20Teams%20Rooms%20USB%20image%20creation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1045847%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F70616%22%20target%3D%22_blank%22%3E%40Richard%20Eklund%3C%2FA%3E%26nbsp%3BOk%20-%20since%20it%20is%20difficult%20to%20say%20why%20the%20script%20fails%20if%20you%20are%20remote%20I%20would%20recommend%20to%20try%20another%20PC%20and%20run%20it%20there.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1046872%22%20slang%3D%22en-US%22%3ERe%3A%20Error%20running%20CreateSRSMedia.ps1%20-%20Microsoft%20Teams%20Rooms%20USB%20image%20creation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1046872%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F44596%22%20target%3D%22_blank%22%3E%40Paul%20Lange%3C%2FA%3E%26nbsp%3BThanks.%20I%20am%20rebuilding%20another%20system%20to%20try%20it%20on%20right%20now.%20Unfortunate%20it%20doesn't%20give%20any%20indication%20to%20where%20it%20fails.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1047198%22%20slang%3D%22en-US%22%3ERe%3A%20Error%20running%20CreateSRSMedia.ps1%20-%20Microsoft%20Teams%20Rooms%20USB%20image%20creation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1047198%22%20slang%3D%22en-US%22%3E%3CP%3EI%20finally%20figured%20it%20out.%20I%20have%20a%20profile.ps1%20in%20my%20WindowsPowerShell%20directory%20in%20my%20documents%20folder.%20I%20didn't%20use%20it%20anymore%2C%20but%20had%20a%20%22Write-Host%22%20line%20in%20there%2C%20which%20I%20didn't%20comment%20out%20from%20when%20I%20did.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20able%20to%20replicate%20it%20by%20deleting%20the%20contents%20of%20profile.ps1%20and%20putting%20write-host%20%22Test%22%20in%20the%20file.%20Launching%20powershell%20then%20gives%20the%20error.%20If%20I%20delete%20it%20or%20delete%20the%20contents%20of%20profile.ps1%20so%20there%20is%20no%20write-host%20entries%2C%20it%20works%20fine.%20Write-Output%20also%20gives%20the%20error%20when%20launching%20this%20script.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20a%20few%20other%20commands%2C%20such%20as%20changing%20directories%2C%20and%20it%20worked%20fine%2C%20but%20write-host%20or%20write-output%20in%20the%20profile.ps1%20broke%20the%20script.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

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. :(

 

 

7 Replies
Hi,

there should be a transcript.
For me this is in my documents folder.
May be this file helps.

Regards,

Paul

@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.

 

:(

Looks like it fails after "Test-Signature $UpdatedScript"
Can you try to delete the files and folders that were downloaded in C:\MTR\CreateSRSMedia.ps1 and try it again?
Or you could copy the script to c:\temp and try it again from there.

@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.  :(

@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.

@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. 

best response confirmed by Richard Eklund (Occasional Contributor)
Solution

I 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.

www.000webhost.com