Solved

powershell stopped working on SBS 2011

Posted on 2013-05-16
11
306 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
[X]
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
11 Comments
 

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
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

 

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

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.

Question has a verified solution.

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

The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

691 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