Retrieving a SharePoint app URL using JSOM

13 November, 2017

At occasions, I need to call apps directly from other scripts. I then need the actual app web URL and cannot launch a dialog to find this.There are APIs out there to get this but the entire URL must be constructed.I know the app domain and redirect URL, but need to fetch the app web, i.e. the masquerade URL. To do this, I can use the following snippet:The key here is to send the app redirect URL together with a part of the app URL to check for.


Cleaning Publish Folders for TFS/Visual Studio Online

24 October, 2017

The data growth a year down the line on our build server is pretty insane. There are nearly a terabyte of files in the Publish folder, even though we run cleanup scripts after each build in the pipeline.The problem is that the retention in Visual Studio Online does not match what is in the Publish folder as these are never cleared. You need to create a pipeline step or run a script.I created a script that can be run on a schedule.


Script: Perform IISRESET on entire SharePoint farm

16 August, 2017

This short utility script can be used to restart IIS on all servers in a farm without specifying machine names.The last check verifies that the RPC call went thourgh successfully.


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.


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.