Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, July 25, 2016 7:55 PM
Dear,
I have the following problem: I use several scripts in CMD (batch) that calling Powershell into the CMD, using "powershell -command".
I noticed that some stations here in the company have the version of Windows 10 (10.0.10586), and others with the version of Windows 10 (10.0.10240).
In version (10.0.10240), the version of Powershell is 5.0.10240.16384, while in Windows 10 (10.0.10586), the version of Powershell is PSVersion 5.0.10586.122, and this is the version that does not run command.
I would like to know if it is possible to downgrade Powershell 5.0.10586.122 to 5.0.10240.16384 version.
An exemple of command is:
powershell -command "invoke..." or powershell -command "get-object..."
Regards,
All replies (3)
Tuesday, July 26, 2016 2:04 PM âś…Answered | 1 vote
Well testing on 1058.494, so the latest cumulative update, works fine for me. So would not appear to me related to powershell version related to me.
So does powershell work in a command prompt outside the batch file?
Is the path showing powershell on the path ok?
Hello Mr,
See my test with on 10586 version. My original language is Portuguese/BR:
But I found a way to around this issue. We can use the "start /b" command before the 'powershell' command:
Thank you!
Monday, July 25, 2016 9:36 PM
Well testing on 1058.494, so the latest cumulative update, works fine for me. So would not appear to me related to powershell version related to me.
So does powershell work in a command prompt outside the batch file?
Is the path showing powershell on the path ok?
Wednesday, July 27, 2016 2:44 AM
Hi Sergio.FS,
Good to hear that you have found a workaround, thanks for sharing your experience and solution here. It will be very beneficial for other community members who have similar issue.
Best regards
Please mark the reply as an answer if you find it is helpful.
If you have feedback for TechNet Support, contact [email protected]