Friday 29 April 2016

How to do IIS Reset in all the servers in a SharePoint Farm

It was awesome artcile and powersheel script has been written by Juan Carlos González on Technet,below is the URL:

I am not author for this article just posting to reach out the peoples who needed.

Summary:  This script allows to do an IIS Reset to all the servers (Web Front End and Application Servers) in a SharePoint farm (2010 and 2013 SharePoint versions). The script defines a function that uses the Get-SPServer cmdlet in order to get all the servers where the IIS reset operation

We use when we want to perform an IISRESET across an entire SharePoint farm. It’s useful if you have a large SharePoint farm.
This will take down your farm while the IISRESET is restarting the services, so it’s best to test this on a non-production environment first. Ensure you have an outage/agreed maintenance window to perform this task on a production farm.
All you got to do is spin up Power Shell on any SharePoint server in the farm and run this:

############################################################################################################################################
# This Scrip allows todo an IIS RESET to all the servers in a SharePoint Farm
# Requited parameters: N/A
############################################################################################################################################
If ((Get-PSSnapIn -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
{ Add-PSSnapIn -Name Microsoft.SharePoint.PowerShell }

$host.Runspace.ThreadOptions = "ReuseThread"

#Definition of the funcion that performs the IIS RESET in all the servers
function Do-IISReset
{   
    try
    {       
        #Getting the servers where the IISReset is going to be done
        $spServers= Get-SPServer | ? {$_.Role -eq "Application"}
        foreach ($spServer in $spServers)
        {           
            Write-Host "Doing IIS Reset in server $spServer" -f blue
            iisreset $spServer /noforce "\\"$_.Address
            iisreset $spServer /status "\\"$_.Address
        }       
        Write-Host "IIS Reset completed successfully!!" -f blue 
    }
    catch [System.Exception]
    {
        write-host -f red $_.Exception.ToString()
    }
}

Start-SPAssignment –Global
#Calling the function
Do-IISReset
Stop-SPAssignment –Global

Remove-PSSnapin Microsoft.SharePoint.PowerShell


Save above file in .ps1 format and run using power shell with admin rights or windows Power shell ISE and run this file on any of App server in Farm.

Wednesday 27 April 2016

Reset Windows Server Admin password

How to reset Windows Server Admin password

Summary:           If we forgot the domain admin password, and no other administrator exists in this Windows domain, you can use the procedure below to reset the password. Note that the screenshots are for Windows Server 2012 R2 with Update.

With this password reset method, we have to boot from a second Windows installation. Then we have to replace utilman.exe (the Utility Manager with ease-of-use functions such as the Narrator and Magnifier) on a domain controller with the command prompt (cmd.exe). Next, we’ll boot up the machine where you forgot the password, click the Utility Manager icon on the logon screen to launch a command prompt, and then reset the password. Here is the step-by-step guide:

  • Boot from a Windows Server 2012 R2 DVD (or ISO file in a virtual environment) and click Next when Windows Setup loads.


Windows Setup


  • Press SHIFT + F10 to open a command prompt.
Open command prompt in Windows Setup

  • .      At the command prompt, enter:

move d:\windows\system32\utilman.exe d:\windows\system32\utilman.exe.bak

Note: On Windows Server 2008 R2, we will most likely have to replace the drive letter d: with c: If you are unsure about the drive letter, search for the drive that contains the Windows folder. The driver letter for the instance of Windows PE that started Windows Setup is x:

copy d:\windows\system32\cmd.exe d:\windows\system32\utilman.exe


Copy cmd.exe

  • Remove the boot media from the server and tell Windows PE to reboot:
wpeutil reboot
  • Once your domain controller is running again, click the Utility Manager icon.
Utility Manager icon


  •     At the command prompt that (I hope) opened, reset the domain admin password with this command, Type your password and hit enter again retype the same. We’ll get successful message
net user administrator *


Reset domain admin password
  • Mainly for security reasons, I highly recommend restoring the original utilman.exe. For this, you have to again boot Windows Server set-up, follow steps 1-2, and then enter:
move /y d:\windows\system32\utilman.exe.bak d:\windows\system32\utilman.exe

(Replace the drive letter if Windows isn’t installed on the d:)
Restore utilman.exe

  •        After we removed the boot media , we can reboot the server again with

wpeutil reboot

Password reset complete


Friday 22 April 2016

The total size of the activity XAML including the referenced XAML is greater than the maximum allowed size of 51200 KB

Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors:

The total size of the activity XAML including the referenced XAML is greater than the maximum allowed size of 51200 KB.






Solutions:

1. Open the database and choose WFResourceManagementDB table dbo.WorkflowServiceConfig

2. Push the right button and choose >Edit Top 200 Rows

3. Change the setting WorkflowServiceMaxWorkflowXamlSizeInBytes (eg, increase in 2 times)

WorkflowServiceMaxWorkflowXaml

Make a restart in IIS WorkflowMgmtPool and Workflow Management Site

Hope this will fix the issue...... Thanks


Thursday 21 April 2016

Free SharePoint eBooks

Looking for new and free SharePoint reference books? This eBook collection will certainly satisfy your appetite for improvement in SharePoint technology field. There’s plenty of valuable tutorials here to keep you busy reading for a while. Be sure to grab few of these eBooks, check more related goodies at the bottom and don’t forget to tell us what you think.


SharePoint 2013 WCM Advanced Cookbook 

Buy the paper book  SharePoint 2013 Server includes new and improved features for web content management that simplify how you design publishing sites, and enhances the authoring and publishing processes of organizations.
With SharePoint 2013 WCM Advanced Cookbook, you will learn about a full-fledged web content management system using Microsoft SharePoint Server 2013.
Publisher: Packt Publishing
By: John Chapman
Published Year: 2014
Pages: 436
Download PDF (7 MB)


Microsoft SharePoint 2013: Designing and Architecting Solutions

Buy the paper book
Determine the best design for your SharePoint implementation by gaining a deeper understanding of how the platform works. Written by a team of SharePoint experts, this practical guide introduces the Microsoft SharePoint 2013 architecture, and walks you through design considerations for planning and building a custom SharePoint solution. It’s ideal for IT professionals, whether or not you have experience with previous versions of SharePoint.
Publisher: Microsoft Press
By: Shannon Bray, Miguel Wood, Patrick Curran
Published Year: 2013
Pages: 488

Microsoft SharePoint 2013 Inside Out

Buy the paper book
You’re beyond the basics, so dive right into SharePoint 2013—and really put your business collaboration platform to work! This supremely organized reference packs hundreds of time saving solutions, troubleshooting techniques, and workarounds. It’s all muscle and no fluff. Discover how the experts facilitate information sharing across the enterprise—and challenge yourself to new levels of mastery.
Publisher: Microsoft Press
By: Darvish Shadravan, Penelope Coventry, Thomas Resing, Christina Wheeler
Published Year: 2013
Pages: 904

Professional SharePoint 2013 Administration

Buy the paper book
The new iteration of SharePoint boasts exciting new features. However, any new version also comes with its fair share of challenges and that’s where this book comes in. The team of SharePoint admin gurus returns to presents a fully updated resource that prepares you for making all the new SharePoint 2013 features work right. They cover all of the administration components of SharePoint 2013 in detail, and present a clear understanding of how they affect the role of the administrator.
Publisher: Wrox
By: Shane Young, Steve Caravajal, Todd Klindt
Published Year: 2013
Pages: 840

Exploring Microsoft SharePoint 2013

Buy the paper book
Your guide to the most significant changes in SharePoint 2013. Discover what’s new and what’s changed in SharePoint 2013—and get a head start using these cutting-edge capabilities to improve organizational collaboration and effectiveness.
Led by a Microsoft MVP for SharePoint, you’ll learn how to take advantage of important new features and functionality, including app development, collaborative social enterprise tools, enhanced versioning, themes, improved search, and an extended client object model.
Publisher: Microsoft Press
By: Penelope Coventry
Published Year: 2013
Pages: 200

We don't know what happened, but something went wrong. Could you please try that again?

We don't know what happened, but something went wrong. Could you please try that again?

I recently ran into an issue I hadn't seen before when configuring Excel Services on SharePoint
2013 RTM. I'd performed all the configuration steps described on TechNet.
 However, when I tried to browse to a workbook, I got the following error:


I checked the event logs and the trace logs, and the root of the problem was an 
Excel Services Application error with event ID 5226: Unable to create or access workbook cache.


This might seem like a straightforward permission issue. However, what also tends to happen in this
situation is that the IIS application pool will stop, and this error gets buried under many more generic errors.
(I've seen event IDs 5231, 5239 and 5240, for which the official advice is to restart the server.
Obviously in this case that isn't much help.)

The fix is straightforward - change the permissions on the %WINDIR%\Temp folder. 
As a managed account, the Excel Services application pool is a member of the 
local WSS_WPG security group, which has read and execute permissions on the 
Temp folder. Add the modify permission, recycle the application pool, 
and everything should work properly.

You could of course grant permissions on the Temp folder to the individual application pool account - in this case, I opted to grant permissions to the WSS_WPG group in case other managed accounts need to create temporary cache files.


SharePoint Online Save as Site Template option gone?


About the situation that the Team Site cannot be saved as templates after activating SharePoint Server Publishing Infrastructure, we can re-enable the Save site as template feature in SharePoint Designer 2013.


For detailed steps, you can refer to the information below.

1. Open the site in SharePoint Designer 2013.

2. Click Site Options in the top ribbon->SaveSiteAsTemplateEnabled->Modify->change False to True, then click OK->OK.

3. Click Save as Template in the top ribbon, type a name, select Include Content, and click OK.



4. It may take a while to work on the progress. Go to the Solutions Gallery to check the template.


Note: Some apps or certain content added to the Team Site may not be allowed when you want to save Team Site as template. If you want to continue to use this method, it's required to remove some content or functionality until the process can be going on.

For more details refer this link: https://community.office365.com/en-us/f/154/t/164502

How To Increase Workflow Size Using PowerShell

Summary:  The Default Size of the SharePoint 2013 workflow is 5 MB which is quite enough until you are writing very complex or multi-level approval workflow.  
1   To increase workflow size we need to open workflow manager PowerShell with administrator1.  
           First to get the current allowed size of workflow type Get-WFServiceConfiguration and press enter. It will ask you to provide the workflow serviceURL. Enter it. Then in the name parameter, give the name of the configuration whose value you want to get. In this case it is WorkflowServiceMaxInstanceSizeKB.

1.       To update this setting run below command, Once all done reset IIS and see the result
Set-WFServiceConfiguration –ServiceUri http://your server name12291 -Name “WorkflowServiceMaxInstanceSizeKB” -Value 6262880


 2.Verify size is increased by running  above command.



App Management Service for Sharepoint 2013 SP Desinger Workflows

My Application Event log is filled with SharePoint Foundation Error - Event ID 8031, it shows up every 15 minutes… with a big question mark, I turned to internet search engine; some suggested apply the October Cumulative updates for SharePoint 2010 which we already did last year, other suggest rebuild the SharePoint! OMG!

Basically, here is the summary of what you need to do.
  1. Copy the long ID from  the event log
  2. Search the ID in SharePoint Config DB
  3. Retrieve the Column ID
  4. Then run stsadm -o deleteconfigurationobject command
  5. Done!
Here are the details
  1. Copy the long ID from the event 8031, just like the blue highlight in the image above
  2. Logon to SQL Server and lunch SQL Management Studio 
  3. Navigate to SharePoint_Config database, create a new SQL Query, and enter the following statement
    • SELECT ID, Properties FROM [Objects] WHERE [Name] LIKE '%24ca5db5-9a2f-4a3d-9e52-38ab5a1a7ab0_735388cb-9769-4d37-b212-0b17a5db02f8%'
  4. Note the id was copied from the screen above.
  5. The query result returned with one record found. (screen below) 
    • Feel free to look into the XML contents if you are interested.
  6. Then I copy the column id from the above image (highlighted in purple)
  7. Go back to the Web server and run the following stsadm.
    • STSADM -o deleteconfigurationobject -id C8D9F11F-D129-41D7-9248-D54DE43059D2
  8. The operation completed successfully, 
You should stop receiving the Event ID 8031 every 15 minutes. You pretty much need to repeat this work every time after you remove a SharePoint Search Application from your farm.

Hope this help!