Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


powershell stopped working on SBS 2011

Posted on 2013-05-16
Medium Priority
Last Modified: 2014-06-11
I have just run Sharepoint 2010 management shell and it comes up with an error of powershell stopped working.

some of the details

InnermostExceptionType     System.BadimageFormatException
Question by:WNottsC
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 3

Author Comment

ID: 39170985
none of these seem to work still comes up with powershell has stopped working

Author Comment

ID: 39170988
do I need to restart any services
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.


Author Comment

ID: 39171002
this may actually not be a powershell issue.

If I navigate to Windows\System32\WindowsPowerShell\v1.0 or the same but WOW64 and run powershell.exe then it loads fine it is just the SharePoint 2010 Management Shell

Author Comment

ID: 39171009
At the same time the CompanyWeb has stopped working and also the Sharepoint 2010 Timer service and Sharepoint 2010 VSS Writer service have both stopped running and I get an error when trying to start them
LVL 22

Accepted Solution

Haresh Nikumbh earned 1500 total points
ID: 39171014
okay have you gone through this?

    Click Start, and then right-click SharePoint 2010 Management Shell.
    Click Properties.
    Click the Shortcut tab in the SharePoint 2010 Management Shell Properties window.
    Input the following value in the Target field:

    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Version 2.0 -NoExit " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 ' "


Author Comment

ID: 39171035
this has still not worked does it need the "\\" on "Registration\\sharepoint.ps1"
LVL 22

Expert Comment

by:Haresh Nikumbh
ID: 39171051
yes have you tried with "\\" ?

Author Comment

ID: 39171071
yes and it still does not work.

If I change it so that it looks like this it at leasts opens sysWOW64

C:\Windows\sysWOW64\WindowsPowerShell\v1.0\powershell.exe -Version 2.0 -NoExit " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 ' "

I know this is not correct could it be an issue with my profile because it is trying to open up

PS C:\Users\support

Author Comment

ID: 39171665
I have just tried a few things and I am getting confused.

Other sites are saying that it is because Windows Management Framework 3.0 update has been applied.



however I can not see this installed

I have also run get-host in powershell and it is showing the version as 2.0 so this sounds like the update is not installed.

The issue only happens in Sharepoint  Management shell   if I run this command in Powershell I get the powershell has stopped working

Add-PSSnapin Microsoft.Sharepoint.powershell

Any ideas

Author Closing Comment

ID: 40128333
The reason I have given this a B and not A is because it has not provided me with a Solution but has provided me with an idea of how to test things

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question