Blog Archives

Failed to Register SharePoint Services in PSConfig (Fix)

Unfortunately this happens on Stand Alone servers more often than you would think. Good news is that there is a really quick way to fix this.

Resultado de imagem para Failed to Register SharePoint Services in PSConfig sharepoint 2016

Open up Regedit and browse to:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15\LauncherSettings 
Create the following key:Type: DWORD
Name: AcknowledgedRunningOnAppServer 
Value: 1

Then do the same thin in the following registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15\LoadBalancerSettings

No need to restart, just rerun PSConfig and you should be good to go.

Original: http://sharepoint-community.net/profiles/blogs/failed-to-register-sharepoint-services-in-psconfig

Office Tools For Visual Sudio 2015 – for SharePoint

If you are new on Visual Studio 2015 and you would like to use it for sharepoint projects you could make the download of Office Tools For Visual Sudio 2015 on the following link:

https://www.visualstudio.com/en-us/features/office-tools-vs.aspx

Thanks

Powershell – Script to Deploy Solution on Sharepoint

Many times we need create a script to deploy solutions on SharePoint via Powershell.

So I would like to share my script.

You just need change the Solution Name and Web Application Url.

How to use it:

Save the script in a file with the extension .ps1 > Starts Windows Shell with Administration and run it.

Copy the script below or make download: http://1drv.ms/1HRNeHR

function WaitForJobToFinish([string]$SolutionFileName)
{ 
    $JobName = "*solution-deployment*$SolutionFileName*"
    $job = Get-SPTimerJob | ?{ $_.Name -like $JobName }
    if ($job -eq $null) 
    {
        Write-Host 'Timer job not found'
    }
    else
    {
        $JobFullName = $job.Name
        Write-Host -NoNewLine "Waiting to finish job $JobFullName"
        
        while ((Get-SPTimerJob $JobFullName) -ne $null) 
        {
            Write-Host -NoNewLine .
            Start-Sleep -Seconds 2
        }
        Write-Host "Finished waiting for job.."
    }
}

Add-PsSnapin Microsoft.SharePoint.PowerShell


#-------------------------VARIABLES START-----------------
#default Variables - Always needed
$CurrentDir= split-path -parent $MyInvocation.MyCommand.Definition
$solutionName="YOURSOLUTION.WSP"
$SolutionPath=$CurrentDir + "\"+$solutionName

#variable for dedicated WebApp solutions
$WebAppUrl="HTTP://WEBAPPLICATION:port"

#Only used case features need some Activation/Deactivation
$FeatureName="Feature"
#---------------------VARIABLES END-----------------

#---------------------Deploy Script START-----------------
#Write-Host 'Going to disable feature'
#disable-spfeature -identity $FeatureName -confirm:$false -url $WebAppUrl

#Write-Host 'Going to uninstall feature'
 #uninstall-spfeature -identity $FeatureName -confirm:$false -force
Write-Host 'Going to uninstall solution'
#Comment one of the next 2 script lines
 #1 - For global WSP
 #Uninstall-SPSolution -identity $solutionName -confirm:$false
#2 - For WebApp solutions, I.E. Webparts
Uninstall-SPSolution -identity $solutionName -confirm:$false -WebApplication $WebAppUrl

Write-Host 'Waiting for job to finish'
WaitForJobToFinish

Write-Host 'Going to remove solution'
Remove-SPSolution –identity $solutionName -confirm:$false

Write-Host 'Going to add solution'
Add-SPSolution $SolutionPath

Write-Host 'Going to install solution to all web applications'
#Comment one of the next 2 script lines
 #1 - For global WSP
 #Install-SPSolution –identity $solutionName –GACDeployment -force
 #2 - For WebApp solutions, I.E. Webparts
Install-SPSolution –identity $solutionName -WebApplication $WebAppUrl –GACDeployment -force

Write-Host 'Waiting for job to finish'
WaitForJobToFinish

#Write-Host 'Going to enable Feature'
#Enable-spfeature -identity $FeatureName -confirm:$false -url $WebAppUrl

Remove-PsSnapin Microsoft.SharePoint.PowerShell

SharePoint Commands STSADM – Features & Solutions

Feature:

STSADM deactivating feature

  • stsadm -o deactivatefeature -id FEATUREGUID -url http:// -force
  • stsadm -o execadmsvcjobs
STSADM activating feature
  •  stsadm -o execadmsvcjobs stsadm -o activatefeature -id FEATUREGUID -url http://
  •  stsadm -o activatefeature -id FEATUREGUID -url http://

Solution:

STSADM Retracting solution

  •  stsadm -o retractsolution -name WSPNAME.wsp -immediate -allcontenturls
  •  stsadm -o execadmsvcjobs

STSADM delete solution

  • stsadm -o deletesolution -name WSPNAME.wsp -override
  • stsadm -o execadmsvcjobs STSADM

STSADM add solution

  • stsadm -o addsolution -filename WSPNAME.wsp
  • stsadm -o execadmsvcjobs

STSADM deploy solution

  • stsadm -o deploysolution -name WSPNAME.wsp -url http:// -immediate -allowgacdeployment

How to use in CMD File:

  • SharePoint 2007 – C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
  • SharePoint 2010 – C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN
  • SharePoint 2013 – C:\Program Files\Common Files\Microsoft Shared\web server extensions\15\BIN