Monday, September 26, 2016

Remove a SharePoint List from Outlook's Default SharePoint Lists with Powershell

There's a very useful Administrative Template for Outlook that allows you to install a set of Default SharePoint Lists with just Group Policy. Unfortunately--there's no way to remove that set of lists with a GPO, such as you may want to do if the content was migrated to a new version of SharePoint or to SharePoint Online.

I put together a simple script that uses the Outlook MAPI to enumerate SharePoint lists and if any match your set of specified lists, remove them. The code below will remove any Default SharePoint lists that are listed in the Registry (for Outlook 2013 only). If the URLs are unchanged in the Registry, they'll be added back in to Outlook the next time you close and open it. So keeping the default setting is mostly useful for testing purposes.

Monday, September 19, 2016

Logoff a specific user from all servers (useful for password changes, e.g.)

We have periodic password changes in our environment, which sometimes can cause account lockouts if the user has many open (or disconnected and not logged off) remote desktop sessions. This post describes a Powershell script that will help prevent this problem by logging the specified user off all machines in a particular OU.