Solved

powershell stopped working on SBS 2011

Posted on 2013-05-16
11
288 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
 

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
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Computers reporting Windows patches applied 14 78
Windows 10 powershell/cmd/bash alternatives? 11 41
simple AD powershell script 8 78
Powershell knowledge 2 27
Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
Synchronize a new Active Directory domain with an existing Office 365 tenant
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now