Blog

Script: Perform IISRESET on entire SharePoint farm


05 December, 2016

This short utility script can be used to restart IIS on all servers in a farm without specifying machine names. function Reset-Servers { Write-Host "`tPerforming IISRESET on farm" -tabs 1 $servers = Get-SPServer | Where-Object { $_.Role -eq "Application" } foreach ($server in $servers) { Write-Host ("`t`tReset " + $server.Address + "...") -NoNewLine $success = $false $out = IISRESET $server.Address $out | ForEach-Object { if ($_.

Read More...

Outlook 2016 for Mac cannot connect to Exchange/Office 365


15 June, 2016

When logging into Exchange or Office 365 using Outlook 2016 for Mac. You receive the error “Authentication failed. Check your account information and try again” or the client simply stops syncing. I looked around various forums without any response but found that the cause for me was due to invalid KeyChain entries.

Read More...

Automating SharePoint App Packages using PowerShell


21 April, 2016

When you distribute an app through Visual Studio, you set the Client ID and redirect URL and this is then written inside the .app file. This file is in fact a .zip file and is then uploaded to the corporate app catalog. However, I wanted to automate this from my build server and/or for installation in different environments. The app file can be unzipped using PowerShell and we can modify the AppManifest.xml file to hold updated Client ID and redirect URL.

Read More...

Automating Internet Explorer using PowerShell and resetting Alternate CSS URL


08 April, 2016

I was using remote provisioning to set the alternate CSS URL for a SharePoint site but found that, when doing so, the subsites were not applied. When you set the alternate CSS URL property using the server-side API, it does apply to subsites. Instead, I wrote a small script that automates all this using the Internet Explorer browser hook in PowerShell. Helper Methods First, I need a global window to work with as I do not want to reopen IE for everything I do.

Read More...

Enable and Flush Site Output Cache using PowerShell


18 March, 2016

I had a requirement to enable the site output cache across all sites in our web application. I found an excellent script by Travis Smith called Set-SPSiteOutputCache. I downloaded that and simply put a loop wrapper around it. In my settings, I set the cache as Disabled for anonymous users and as Extranet for authenticated users. Enable-SPSiteOutputCache.ps1 I also prepared a small script to flush the object cache in all sites as: Flush-SPSiteOutputCache.ps1

Read More...