Pages

Wednesday, November 27, 2013

Unable to unlock by using stsadm/powershell and central admin


The site was locked and I was tried to unlock the site using stsadm and powershell commands in sharepoint 2013 but didn’t worked.

Finally I found below PowerShell from the MS forum to unlock the site and it got worked.

$Admin =  new-object Microsoft.SharePoint.Administration.SPSiteAdministration('http://root.toto.com')

$Admin.ClearMaintenanceMode()

$site.MaintenanceMode

 

NOTE: The above commands will work only if your SharePoint 2013 April cumulative update installed

Monday, November 11, 2013

Extract SharePoint farm solutions of SharePoint 2010 and MOSS


Extract or exporting SharePoint 2010 farm solution using PowerShell

Run the below PowerShell to Extract all solutions from the SharePoint farm.

(Get-SPFarm).Solutions | ForEach-Object{$var = (Get-Location).Path + "\" + $_.Name; $_.SolutionFile.SaveAs($var)}

Extract or Exporting SharePoint 2007 farm solutions:
                                                                                                 I was used SharePoint farm solution extractor to extract SharePoint 2007 farm solutions using the below command and link

SharePointFarmSolutionExtractor.exe -extractAll c:\SharePointSolutions

SharePoint web application not created on SharePoint web front servers


While I was creating a new web application in SharePoint 2013 farm environment, I got a “page cannot be displayed” message in the site creation page and the web application was created only on the central admin Server and not all other SharePoint farm machine.

I was restarted the machine to fix the issue and ran the timer job execution stsadm command but it didn’t worked and finally I got a solution from one of the blog that to increase value of “Shutdown Time limit” for SharePoint Central admin site application pool from default value of 90 Seconds to 300 Seconds and done the IISRESET and then created a new web application and got worked

Monday, September 23, 2013

Creating SQL Server Alias without installing SQL client Tool


Normally we have to install SQL client tool to create SQL Server alias on the SharePoint Servers and Now you can create a SQL server alias without installing SQL server client connectivity tool using SQL server client network utility tool.
Steps:
a.       Start-> Run-> cliconfg.exe and it will open SQL server Client network utility tool


Click Alias and Click add for creating SQL server alias and Give the SQL alias name, Select TCP/IP and port no and click ok. Now we have successfully created the SQL server alias.



Tuesday, September 3, 2013

High Availability and Disaster Recovery for Sharepoint 2013

I am preparing the document for High availability which is Always on feature in SQL Server 2012 for SharePoint 2013 Server. This  document coming soon with print Screen on my blog :)

Tuesday, July 2, 2013

Getting User Mailbox size with location in Exchange 2007 using script

I was involved to deploy Exchange Hybrid for office 365 project and find the below powershell script to Getting Existing users mailbox size with location while gathering exchange 2007 information.

Run the below script on Exchange 2007 server
$exchangeservers = Get-MailboxServer
$AllUsers = @()
$AllUsersEmail = @()
foreach ($server in $exchangeservers)
{
$AllUsers += Get-Mailbox -Server $server |Get-MailboxStatistics |select servername,displayname,itemcount,totalitemsize
}
foreach ($user in $AllUsers)
{
 $obj = new-object psObject
 $mailinfo = get-mailbox -identity $user.displayname |select PrimarySMTPAddress,Office, DistinguishedName
 $tmp = [adsi]("LDAP://" +  $mailinfo.DistinguishedName)

 $obj |Add-Member -MemberType noteproperty -Name "Server Name" -Value $user.ServerName
 $obj |Add-Member -MemberType noteproperty -Name "Display Name" -Value $user.DisplayName
 $obj |Add-Member -MemberType noteproperty -Name "Item Count" -Value $user.ItemCount
 $obj |Add-Member -MemberType noteproperty -Name "Total Item Size" -Value $user.TotalItemSize.value.toMB()
 $obj |Add-Member -MemberType noteproperty -Name "Email Address" -Value $mailinfo.PrimarySMTPAddress
 $obj |Add-Member -MemberType noteproperty -Name "Office" -Value $mailinfo.Office
 $obj |Add-Member -MemberType noteproperty -Name "Description" -Value $tmp.description
 $AllUsersEmail += $obj
}
$AllUsersEmail |Export-Csv c:\test.csv -NoTypeInformation

Create Sharepoint 2013 Search Service Application Topology using Script

I have created Search Service Application Topology for sharepoint 2013 using below powershell Script


# Create a new Search Service Application in SharePoint 2013

 Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
# Settings

$IndexLocation = "E:\Sharepoint 2013Index” #Location must be empty, will be deleted during the process!

$SearchAppPoolName = "SearchServiceApplicationPool"

$SearchAppPoolAccountName = "ramu\spsearchapp”

$SearchServerName = (Get-ChildItem env:computername).value

$SearchServiceName = "Search Service Application"

$SearchServiceProxyName = "Search Service Application Proxy"

$DatabaseName = "Search Service AdminDB"

Write-Host -ForegroundColor Yellow "Checking if Search Application Pool exists"

$SPAppPool = Get-SPServiceApplicationPool -Identity $SearchAppPoolName -ErrorAction SilentlyContinue

if (!$SPAppPool)
{

    Write-Host -ForegroundColor Green "Creating Search Application Pool"

    $spAppPool = New-SPServiceApplicationPool -Name $SearchAppPoolName -Account $SearchAppPoolAccountName -Verbose

}

# Start Services search service instance

Write-host "Start Search Service instances...."

Start-SPEnterpriseSearchServiceInstance $SearchServerName -ErrorAction SilentlyContinue

Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $SearchServerName -ErrorAction SilentlyContinue
 

Write-Host -ForegroundColor Yellow "Checking if Search Service Application exists"

$ServiceApplication = Get-SPEnterpriseSearchServiceApplication -Identity $SearchServiceName -ErrorAction SilentlyContinue

if (!$ServiceApplication)

{

    Write-Host -ForegroundColor Green "Creating Search Service Application"

    $ServiceApplication = New-SPEnterpriseSearchServiceApplication -Partitioned -Name $SearchServiceName -ApplicationPool $spAppPool.Name -DatabaseName $DatabaseName

}

 
Write-Host -ForegroundColor Yellow "Checking if Search Service Application Proxy exists"

$Proxy = Get-SPEnterpriseSearchServiceApplicationProxy -Identity $SearchServiceProxyName -ErrorAction SilentlyContinue


if (!$Proxy)

{

    Write-Host -ForegroundColor Green "Creating Search Service Application Proxy"

    New-SPEnterpriseSearchServiceApplicationProxy -Partitioned -Name $SearchServiceProxyName -SearchApplication $ServiceApplication

}


$ServiceApplication.ActiveTopology

Write-Host $ServiceApplication.ActiveTopology

# Clone the default Topology (which is empty) and create a new one and then activate it

Write-Host "Configuring Search Component Topology...."

$clone = $ServiceApplication.ActiveTopology.Clone()

$SSI = Get-SPEnterpriseSearchServiceInstance -local

New-SPEnterpriseSearchAdminComponent –SearchTopology $clone -SearchServiceInstance $SSI

New-SPEnterpriseSearchContentProcessingComponent –SearchTopology $clone -SearchServiceInstance $SSI

New-SPEnterpriseSearchAnalyticsProcessingComponent –SearchTopology $clone -SearchServiceInstance $SSI

New-SPEnterpriseSearchCrawlComponent –SearchTopology $clone -SearchServiceInstance $SSI

Remove-Item -Recurse -Force -LiteralPath $IndexLocation -ErrorAction SilentlyContinue

mkdir -Path $IndexLocation -Force

New-SPEnterpriseSearchIndexComponent –SearchTopology $clone -SearchServiceInstance $SSI -RootDirectory $IndexLocation

New-SPEnterpriseSearchQueryProcessingComponent –SearchTopology $clone -SearchServiceInstance $SSI

$clone.Activate()

Write-host "Your search service application $SearchServiceName is now ready"