Wednesday, October 14, 2015

Office Web Apps Server 2013 - machines reported as Unhealthy

After you configure Web Apps 2013 farm you found the Web Apps Machine is Unhealthy






In order for IIS to understand .svc files, and not use the Static file handler, you need to install HTTP Activation for .NET Framework 4.5 WCF Services on your WAC machines. It can be done using the following PowerShell command:

Add-WindowsFeature NET-WCF-HTTP-Activation45

 
 
Once the feature is installed, there is no need for any server restart, you should see that your machines are reported as Healthy. Remember it can take up to 10-20 minutes. You can sometimes speed up the health reporting a bit by restarting the WAC Service:
 

Wednesday, October 7, 2015

Enable feature in SharePoint 2013 - PowerShell

How to activate SharePoint feature using powershell script?



Open SharePoint Management Shell as Administrator

Enable-SPFeature FeatureID -url http://url
Optional [-Force]

To get Feature ID run the command Get-SPFeature


Example:

Active Site Collection Publishing Feature

Enable-SPFeature f6924d36-2fa8-4f0b-b16d-06b7250180fa -url http://webApplication/siteColection/

Friday, October 2, 2015

Remove property from Property Bag with PowerShell

How to remove properties from multiple places in SharePoint with powershell script?

For Web Application

$web = Get-SPWeb <url>
$web.Properties.Remove('test') // this is a key
$web.Update()
$web.Properties

For Farm

$web = Get-SPFarm
$web.Properties.Remove('test') // this is a key
$web.Update()
$web.Properties



Powershell to get Property bag for Farm, Web App or Site Collection