Friday, 8 August 2014

Sharepoint 2010 Content Deployment Failing (cannot find feature)

So my content deployment kept of failing giving error

Could not find Feature <My Feature Name>.

I did everything and Feature was correctly deployed etc.

Turns out the features were not in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES folder on the central admin server... only on the web server. Once I copied them over it worked like a charm. Weird that when you install them with stsadm it doesn't put them everywhere. 

Monday, 4 August 2014

SharePoint: Grant Replicate Directory Changes Permission on a domain

In order to ask replicate directory changes permission to a domain controller, it does not have to be a domain admin. by delegation, we can create this.

Why do we do this?

like say, user wants to update their information from SharePoint by themselve, we can allow the information that store in SharePoint database and replicate to the Active Directory. Some also need to be done as well in SharePoint Administration.



How to Grant Replicate Directory Changes?



  • At your domain controller, open up the Active Directory Users and Computers.
  • Right-click the domain. for example, netoverme.local ans select Delegate Control
  • Click Next on the Delegation Control Wizard.
  • On Users and Groups windows, click Add.
  • type a name of synchronization account. For example, sp_admin .click Nextsp_admindelegeate

  • on task to delegate, select create a custom to delegate and click next.
  • on the Active Directory Objext Type, Select This Folder,existing objects in this folder, and creation of new objects in this folder, and click Next.
  • on the Permission pages, select Replicating Directory Changes.replicating directory changes



click Next and Finish.

Event ID 6398 due to CEIP Data Collection for SharePoint Foundation


If you have seen this error in your Job History, here is a workaround.

You can implement the following workaround to disable the CEIP Data Collection Job.

1.) Launch an elevated SharePoint 2010 Management Shell

2.) Run the following command to find out the current status of CEIP at the Farm and Site level

Get-SPBrowserCustomerExperienceImprovementProgram -Farm <- This will return the status of the Browser CEIP at the farm level
(Get-SPFarm).CEIPEnabled <- This will return the status of the CEIP at the farm level
(Get-SPWebApplication).BrowserCEIPEnabled <- This will return the status of the CEIP at the site level

3.) If CEIP is enabled, run the following commands to disable CEIP at the Farm and Site level

Set-SPBrowserCustomerExperienceImprovementProgram -Farm -Enable:$FALSE
Set-SPBrowserCustomerExperienceImprovementProgram -WebApplication "SBS SharePoint" -Enable:$FALSE

4.) Next, open SharePoint 2010 Central Administration

5.) Click System Settings

6.) Click Configure Privacy Options under Farm Management

7.) Under the section Customer Experience Improvement Program, select the radio button for 'No, I don't wish to participate.' and then click OK.

8.) Next, disable the CEIP Data Collection job by running the following command

Get-SPTimerJob job-ceip-datacollection | Disable-SPTimerJob

9.) Run IISRESET /noforce from an elevated command prompt.

Friday, 1 August 2014

Remove SharePoint DB without having SQL Management Studio access

Just a quick tip that can help a lot in some situations, when in the situation when you for example have deleted a service application and the DB’s are still there, the DBA’s have all left and you have no way of connecting to SQL with a management tool…

This is what you can do, given that you have the permissions…(high?)

Get-SPDatabase
 (Will list all databases used by SharePoint, Name and GUID and Type.)

$DatabaseToDelete = Get-SPDatabase <GUID of the database you need to get rid of>
 (Load the database as a SPDatabase object)

$DatabaseToDelete.Delete()
 (It’s now gone…)

Enable Anonymous Access in SharePoint 2010

Here are 8 simple steps on how to set up anonymous access in MS SharePoint 2010.  It is not much different then SharePoint 2007 set up, the only difference is the GUI or the Ribbon.

1. Starting in Central Administration, under Application Management, click on the Manage web applications.
 

2. Make sure you select the site you want to enable anonymous access and click on the Authentication Providers icon.




3. On the Authentication Providers pop-up window click on the Default zone.



4. Under Edit Authentication, check Enable anonymous access and click Save.


5. Going back to Web Application Management click on the Anonymous Policy icon.


6. Under Anonymous Access Restrictions select your Zone and set the Permissions to None – No policy and click Save.


7. Now, web application will allow anonymous access to be set. So, navigate to your top level site collection for the web application. Click the Site Actions > Site Settings. Under Users and Permissions click Site permissions.

8. Under Permission Tools, click Anonymous Access icon and set the permissions to Entire Web site and click OK.




That’s all, folks! If you followed these steps properly you should have now Anonymous Access enabled.

How to Download All Your SSRS Report Definitions (RDL files) Using PowerShell

Here’s a short PowerShell script that :
1. Connects to your report server
2. Creates the same folder structure you have in your Report Server
3. Download all the SSRS Report Definition (RDL) files into their respective folders

In addition to backing up your Source Project, your ReportServer database, or good old RSScripter (see http://sqlserver-indo.org/blogs/mca/archive/2009/03/08/extract-and-transfer-rdl-files-from-ssrs.aspx) this is just another way you can “backup” or archive your reports.


#note this is tested on PowerShell v2 and SSRS 2008 R2
[void][System.Reflection.Assembly]::LoadWithPartialName("System.Xml.XmlDocument");
[void][System.Reflection.Assembly]::LoadWithPartialName("System.IO");
 
$ReportServerUri = "http://yourreportserver/ReportServer/ReportService2005.asmx";
$Proxy = New-WebServiceProxy -Uri $ReportServerUri -Namespace SSRS.ReportingService2005 -UseDefaultCredential ;
 
#check out all members of $Proxy
#$Proxy | Get-Member
#http://msdn.microsoft.com/en-us/library/aa225878(v=SQL.80).aspx
 
#second parameter means recursive
$items = $Proxy.ListChildren("/", $true) | `
         select Type, Path, ID, Name | `
         Where-Object {$_.type -eq "Report"};
 
#create a new folder where we will save the files
#PowerShell datetime format codes http://technet.microsoft.com/en-us/library/ee692801.aspx
 
#create a timestamped folder, format similar to 2011-Mar-28-0850PM
$folderName = Get-Date -format "yyyy-MMM-dd-hhmmtt";
$fullFolderName = "C:\Temp\" + $folderName;
[System.IO.Directory]::CreateDirectory($fullFolderName) | out-null
 
foreach($item in $items)
{
    #need to figure out if it has a folder name
    $subfolderName = split-path $item.Path;
    $reportName = split-path $item.Path -Leaf;
    $fullSubfolderName = $fullFolderName + $subfolderName;
    if(-not(Test-Path $fullSubfolderName))
    {
        #note this will create the full folder hierarchy
        [System.IO.Directory]::CreateDirectory($fullSubfolderName) | out-null
    }
 
    $rdlFile = New-Object System.Xml.XmlDocument;
    [byte[]] $reportDefinition = $null;
    $reportDefinition = $Proxy.GetReportDefinition($item.Path);
 
    #note here we're forcing the actual definition to be 
    #stored as a byte array
    #if you take out the @() from the MemoryStream constructor, you'll 
    #get an error
    [System.IO.MemoryStream] $memStream = New-Object System.IO.MemoryStream(@(,$reportDefinition));
    $rdlFile.Load($memStream);
 
    $fullReportFileName = $fullSubfolderName + "\" + $item.Name +  ".rdl";
    #Write-Host $fullReportFileName;
    $rdlFile.Save( $fullReportFileName);

Enterprise Wiki template is unavailable when you create a new SharePoint subsite

You have a Microsoft SharePoint site collection. When you try to create a new subsite, you notice that the Enterprise Wiki template is not available as an option.

To resolve this issue, turn on the Publishing feature at the site collection level. To do this, follow these steps:
  1. On the Site Actions or Settings menu (depending on your version of SharePoint), point to Site Settings, and then click Modify All Site Settings.

    Note If you do not see additional items when you point to Site Settings, click Site Settings.
  2. If you are not at the root of your site, under Site Collection Administration, click Go to top level site settings.
  3. On the Site Settings page, under Site Collection Administration, click Site collection features.
  4. On the Site Collection Features page, next to Office SharePoint Server Publishing Infrastructure or SharePoint Server Publishing Infrastructure (depending on your version of SharePoint), click Activate.

sps3:// Search Crawl Access is denied error

If you are looking at SharePoint Search Crawl logs, and find a top level Error, in details you'd find:

Access is denied. Verify that either the Default Content Access Account has access to this repository, or add a crawl rule to crawl this repository. If the repository being crawled is a SharePoint repository, verify that the account you are using has "Full Read" permissions on the SharePoint Web Application being crawled. ( HttpStatusCode Unauthorized The request failed with HTTP status 401: Unauthorized. )

You need to go to the site settings of the site giving error and do the following:

In Site Administration section of Site Settings, find Search and offline availability click that link. Make sure the Allow this site to appear in search results is set to Yes.