November 30, 2011

STSADM Custom Commands

http://blog.falchionconsulting.com/index.php/downloads/

Example: http://blog.falchionconsulting.com/index.php/2008/02/export-content-types/

SET SOLUTION_NAME=”Lapointe.SharePoint.STSADM.Commands.wsp”
SET STSADM=”C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm”
%STSADM% -o addsolution -filename %SOLUTION_NAME%
%STSADM% -o deploysolution -local -allowgacdeployment -name %SOLUTION_NAME%


Deploying the exported Content Types:
http://www.sharepointnutsandbolts.com/2007/04/deploying-content-types-as-feature.html

User Profile Service - File Not Found

Farm Account Issue, Sometimes Sharepoint is installed with some account and is configured with some other account. Then Just go to Security --> Configure Service Accounts --> Update Farm Account

November 18, 2011

Linq



IEnumerable Way


var results = SPContext.Current.Web.Lists["Some List"].Items.Cast().Where(item => item[SPBuiltInFieldId.Title].ToString() == "Title To Search");


foreach(SPListItem item in results)
{
//logic
}


Ling Way


List results = (from SPListItem item in listobject where item["Title"].ToString() == "blahblah" select item).ToList();


foreach(SPListItem item in results)
{
//logic
}

Send email to all users of a sharepoint group

November 11, 2011

Single Breadcrumb - SharePoint 2010

Powershell SPSiteDataQuery Debug




clear
$site = Get-SPSite -Identity http://url
$q = New-Object -TypeName microsoft.SharePoint.SPSiteDataQuery
$q.Lists = "<Lists BaseType='1'/>"
$q.ViewFields = "<FieldRef Name='FieldInternalName'/>"
$q.Query = "<Where><Eq><FieldRef Name='FieldInternalName'/><Value Type='Text'>2011-0077</Value></Eq></Where>"
$q.Webs = "<Webs Scope='SiteCollection'/>"
echo $site.RootWeb.GetSiteData($q).Rows.Count

November 10, 2011

SharePoint 2010 Loopback

http://support.microsoft.com/kb/896861

Method #1 BackConnectionHostNames
  1. Click Start, click Run, type regedit, and then click OK.
  2. In Registry Editor, locate and then click the following registry key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
  3. Right-click MSV1_0, point to New, and then click Multi-String Value.
  4. Type BackConnectionHostNames, and then press ENTER.
  5. Right-click BackConnectionHostNames, and then click Modify.
  6. In the Value data box, type the host name or the host names for the sites that are on the local computer, and then click OK.
  7. Quit Registry Editor, and then restart the IISAdmin service

Method 2: Disable the loopback check (less-recommended method)

The second method is to disable the loopback check by setting the DisableLoopbackCheck registry key.

To set the DisableLoopbackCheck registry key, follow these steps:
  1. Set the
    DisableStrictNameChecking
    registry entry to 1. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:
    281308  Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name
  2. Click Start, click Run, type regedit, and then click OK.
  3. In Registry Editor, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  4. Right-click Lsa, point to New, and then click DWORD Value.
  5. Type DisableLoopbackCheck, and then press ENTER.
  6. Right-click DisableLoopbackCheck, and then click Modify.
  7. In the Value data box, type 1, and then click OK.
  8. Quit Registry Editor, and then restart your computer.
Also, make sure you have entry in AAM and Host file.

SonarQube with Jenkins Setup using Docker Images

https://funnelgarden.com/sonarqube-jenkins-docker/  https://medium.com/@hakdogan/an-end-to-end-tutorial-to-continuous-integration-and-con...