Solved

powershell stopped working on SBS 2011

Posted on 2013-05-16
11
292 Views
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
0
Comment
Question by:WNottsC
  • 8
  • 3
11 Comments
 
LVL 22

Expert Comment

by:Haresh Nikumbh
ID: 39170928
0
 

Author Comment

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

Author Comment

by:WNottsC
ID: 39170988
do I need to restart any services
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:WNottsC
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
0
 

Author Comment

by:WNottsC
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
0
 
LVL 22

Accepted Solution

by:
Haresh Nikumbh earned 500 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 ' "

http://support.microsoft.com/kb/2796733
0
 

Author Comment

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

Expert Comment

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

Author Comment

by:WNottsC
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
0
 

Author Comment

by:WNottsC
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.

http://msmvps.com/blogs/bradley/archive/2012/12/12/do-not-install-2506143-optional-wmf-3-0-patch-on-your-sbs-2011.aspx

http://blog.ronnypot.nl/?p=960

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
0
 

Author Closing Comment

by:WNottsC
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
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

This article will help you understand what HashTables are and how to use them in PowerShell.
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 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