• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 85
  • Last Modified:


Hello on our Server 2008 R2 when I try to run a powershell script using method right click, run/open with powershell it flashes what looks like a regular CMD window then disappears.  On my workstation right clicking & run/open with powershell opens correctly, asking for parameters.  Do i need to update the version on our server?  Ran Get-Host which returns the attached.
1 Solution
To see the error, open a PS console, drag and drop the file into the console to run it from there.
And, yes, the issue is probably that the server still has PS 2.0 installed.
Make sure you read the system requirements about when to better not update PS.
You'll find the downloads (3.0, 4.0, 5.1, depending on what you want/need or is supported) by searching for "Windows Management Framework".
open windows powershell then browse to the script, and then run from Windows Powershell console
ManieyaK_Citrix Systems / Network AdminAuthor Commented:
I dragged and dropped the file int PS attached is a screenshot.  Not sure that is did anything at all.
Well, either the script found nothing to report, because there was indeed nothing to report, or it found nothing because it was running on PS 2.0.
You can run a test on workstation (assuming it is returning something there by default):
In a Command prompt or Powershell console, enter
powershell.exe -Version 2
Get-Host should now return PS 2.0
Run the script in that console - if it doesn't return anything now, either, you know it's because of PS 2.0.
David Johnson, CD, MVPOwnerCommented:
the answer is staring you right in your face..

the execution of scripts on this computer is disabled

a quick work around is in your task scheduler

powrshell.exe -executionpolicy bypass -file c:\script\script.ps1

or run powershell as an administrator
set-executionpolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now