Showing posts with label SharePoint2010. Show all posts
Showing posts with label SharePoint2010. Show all posts

Thursday, July 18, 2013

Event ID 6644 : Event manager error: Could not load file or assembly - Remove orphan evet handlers in SharePoint lists

שלום חברים,
הלקוח שלי ביצע מיגרציה לסביבת SharePoint 2010 מ- Moss 2007. לאחר המיגרציה (בוצעה לפני כחצי שנה) הופיע לעיתים קרובות ה-Error הבא ב- Event Log :



זה נובע בעיקר מחוסר ידיעה/תשומת לב לכל ה-DLL הרלוונטים ל- SharePoint(כולל של רכיבים שהוספו לחווה).
המשמעות של השגיאה היא, EventReceiver שהיה מקושר לרשימה לא רץ (לא קיים DLL ב-GAC) .

הפתרון הוא לבטל את הרישום של ה-Event לרשימה.
כתבתי Script ב- PowerShell , הרצתי אותו והבעיה שלי נפתרה.

מצ"ב ה-Script, תהנו :



# Get All SiteCollections
$siteCollection = Get-SPSite
 foreach ($site in $siteCollection)
 {
             <# Unmark the line below if you want to see the siteCollection Path each iteration
                   Write-Host "Site Collection Pathe :  " $site -foregroundcolor green #>
           
            #Check if there is a subsites under the SiteCollecyion if isn't write "The SubSite Doesn't Exist"
            if ($site.AllWebs.count -gt 0)
            {
              foreach($web in $site.AllWebs)
              {
              <# Unmark the line below if you want to see the SubSite Path each iteration
                   Write-Host "SubSite Pathe :  " $web -foregroundcolor Yellow#>

                         foreach ($list in $web.Lists)
                         {         
                              # Colelction of EventReceivers of the list
                               $ev = $list.EventReceivers
                                      
                             # Check if there is an EventReceivers
                               if ($ev.count -gt 0)
                               {
                                   
                       <# Unmark the line below if you want to see the List Name and the number of the EventReceivers
                             Write-Host "List Name :  " $list.Title -foregroundcolor Gray  
                            Write-Host "Number of eventRecivers in List :  " -foregroundcolor Gray -nonewline; Write-Host                             $ev.count -foregroundcolor Blue#>
                                               
                                    # Get the Curent EventReceiver
                                    foreach ($myev in $ev)
                                                {                      
                                     
                                                  if($myev.assembly -eq 'Write here the EventReceiver Assembly')
                                                   {
                                                            Write-Host "Site Collection Pathe :  " $site -foregroundcolor green
                                                            Write-Host "SubSite Pathe :  " $web -foregroundcolor Yellow
                                                            Write-Host "List Name :  " $list.Title -foregroundcolor Gray
                                                            Write-Host $myev.assembly -foregroundcolor cyan
                                                            $myev.delete()
                                                  }        
                                                }
                                       }
                         }
              }
            }
            else
            {
                        Write-Host "Site Collection Pathe :  " $site -foregroundcolor green
                        Write-Host "No SubSites" -foregroundcolor red
            }          
 }


בהצלחה !
רון נס.







============================================================================================================================================================================================================================================================




Hello Friends,
Befor 6 Months ,My client migrate his  Moss 2007 environment to SharePoint 2010 environment. After The Migration some Errors appeared frequently on the Event Log:



This is mainly due to lack of knowledge / attention to the relevant DLLs to SharePoint (including the components were added to the farm).
The Meaning of the error is the EventReceiver was linked to the list but was not running (there is no DLL in the GAC(.

The solution is to unregister the Event from the list.
I wrote a script inPowerShell, ran it, and my problem was solved.

Here is the script, enjoy:

# Get All SiteCollections
$siteCollection = Get-SPSite
 foreach ($site in $siteCollection)
 {
             <# Unmark the line below if you want to see the siteCollection Path each iteration
                   Write-Host "Site Collection Pathe :  " $site -foregroundcolor green #>
           
            #Check if there is a subsites under the SiteCollecyion if isn't write "The SubSite Doesn't Exist"
            if ($site.AllWebs.count -gt 0)
            {
              foreach($web in $site.AllWebs)
              {
              <# Unmark the line below if you want to see the SubSite Path each iteration
                   Write-Host "SubSite Pathe :  " $web -foregroundcolor Yellow#>

                         foreach ($list in $web.Lists)
                         {         
                              # Colelction of EventReceivers of the list
                               $ev = $list.EventReceivers
                                      
                             # Check if there is an EventReceivers
                               if ($ev.count -gt 0)
                               {
                                   
                       <# Unmark the line below if you want to see the List Name and the number of the EventReceivers
                             Write-Host "List Name :  " $list.Title -foregroundcolor Gray  
                            Write-Host "Number of eventRecivers in List :  " -foregroundcolor Gray -nonewline; Write-Host                             $ev.count -foregroundcolor Blue#>
                                               
                                    # Get the Curent EventReceiver
                                    foreach ($myev in $ev)
                                                {                      
                                     
                                                  if($myev.assembly -eq 'Write here the EventReceiver Assembly')
                                                   {
                                                            Write-Host "Site Collection Pathe :  " $site -foregroundcolor green
                                                            Write-Host "SubSite Pathe :  " $web -foregroundcolor Yellow
                                                            Write-Host "List Name :  " $list.Title -foregroundcolor Gray
                                                            Write-Host $myev.assembly -foregroundcolor cyan
                                                            $myev.delete()
                                                  }        
                                                }
                                       }
                         }
              }
            }
            else
            {
                        Write-Host "Site Collection Pathe :  " $site -foregroundcolor green
                        Write-Host "No SubSites" -foregroundcolor red
            }          
 }



 Good Luck :)

Ron Ness.

Tuesday, July 9, 2013

How to detect the edition of SharePoint 2010 installed?

How to detect the edition of SharePoint 2010 installed?

שלום חברים,
אם ברצונכם לדעת איזו גרסת SharePoint מותקנת לכם במחשב בצעו את הפעולות הבאות :
1.       כנסו ל-Registry
2.       נווטו ל – HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SharedTools\WebServer Extensions\14.0\WSS\InstalledProducts.
3.       בדקו את מפתח הרישום הרלוונטי לפי הרשימה.
BEED1F75-C398-4447-AEF1-E66E1F0DF91E: SharePoint Foundation 2010
1328E89E-7EC8-4F7E-809E-7E945796E511: Search Server Express 2010
B2C0B444-3914-4ACB-A0B8-7CF50A8F7AA0: SharePoint Server 2010 Standard Trial
3FDFBCC8-B3E4-4482-91FA-122C6432805C: SharePoint Server 2010 Standard
88BED06D-8C6B-4E62-AB01-546D6005FE97: SharePoint Server 2010 Enterprise Trial
D5595F62-449B-4061-B0B2-0CBAD410BB51: SharePoint Server 2010 Enterprise
BC4C1C97-9013-4033-A0DD-9DC9E6D6C887: Search Server 2010 Trial
08460AA2-A176-442C-BDCA-26928704D80B: Search Server 2010
84902853-59F6-4B20-BC7C-DE4F419FEFAD: Project Server 2010 Trial
ED21638F-97FF-4A65-AD9B-6889B93065E2: Project Server 2010
926E4E17-087B-47D1-8BD7-91A394BC6196: Office Web Companions 2010


בהצלחה !
רון נס.
============================================================================================================================================================================================================================================================



Hello Friends,

How often you wanted to figure out what SKU(s) of SharePoint 2010 family of products in installed on a particular server.
Do the following:
1. Enter to the Registry in the server
2. Navigate to - HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ SharedTools \ WebServer Extensions \ 14.0 \ WSS \ InstalledProducts.
3. Check the relevant registry key according to the list:

BEED1F75-C398-4447-AEF1-E66E1F0DF91E: SharePoint Foundation 2010
1328E89E-7EC8-4F7E-809E-7E945796E511: Search Server Express 2010
B2C0B444-3914-4ACB-A0B8-7CF50A8F7AA0: SharePoint Server 2010 Standard Trial
3FDFBCC8-B3E4-4482-91FA-122C6432805C: SharePoint Server 2010 Standard
88BED06D-8C6B-4E62-AB01-546D6005FE97: SharePoint Server 2010 Enterprise Trial
D5595F62-449B-4061-B0B2-0CBAD410BB51: SharePoint Server 2010 Enterprise
BC4C1C97-9013-4033-A0DD-9DC9E6D6C887: Search Server 2010 Trial
08460AA2-A176-442C-BDCA-26928704D80B: Search Server 2010
84902853-59F6-4B20-BC7C-DE4F419FEFAD: Project Server 2010 Trial
ED21638F-97FF-4A65-AD9B-6889B93065E2: Project Server 2010
926E4E17-087B-47D1-8BD7-91A394BC6196: Office Web Companions 2010
 

Note : 
SKU...
SKU is the standard abbreviation for "stock-keeping unit." Microsoft uses SKU as the name for this program to convey the idea of a consulting service package so dialed-down that it can be purchased off a price list.

Good Luck :)

Ron Ness.