Tuesday, November 1, 2016

Using Powershell to Help Migrate Your Users' Connection to Sharepoint to a New Site

If you are using many SharePoint lists and want to connect them to Outlook automatically for your users, you have probably noticed that the official tools for this are lacking. We don't get nearly the simplicity of Exchange Public Folders without a lot of work, from the difficulty in just getting the SharePoint URLs in the format Outlook requires, to deploying those lists with the limited Group Policy options Microsoft provides. This situation isn't really acceptable once you get above 10-20 lists, so I spent some time putting together some tools in Powershell that make this process a little less painful. The full set of scripts can be found here.

Friday, October 7, 2016

Restore a Deleted GPO (when you have AD recycle bin turned on, system state backup but no GPO backups)

This is mostly to save some notes for myself.

I'm in the middle of migrating our Sharepoint Lists to a new server, and one step was cleaning up the old GPOs that assigned those lists to users in Outlook. I went ahead and deleted those before figuring out that using the old GPOs would be the best source for getting the old URLs to cleanup the old lists from Outlook...oops! Luckily, Powershell, AD Recycle Bin, and my System State backup came to the rescue.

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.


Thursday, August 25, 2016

Changes to Sharepoint Online break anonymous access to Document Libraries

If you use Sharepoint Online's Public Sites, you may want to be able to share content such as document libraries that by default, aren't available for anonymous users. Recent changes to Sharepoint Online broke a popular solution that worked for this in the past, but there's a simple workaround.

Thursday, July 21, 2016

Randomized Meal Planner

A few years ago I was home with my son several days a week, and I was in charge of most of our family's meals. I had developed a library of recipes that I turned to again and again--nothing fancy, but meals that I could make and our family enjoyed.

The only tedious part for me was coming up with a plan each week of what we were going to eat. I knew it was worth it to avoid the pain of asking "what's for dinner?" each night, but I couldn't bring myself to do the work.

The solution that I came up with is a combination of a Google Docs Spreadsheet and a script written in Google Apps Script to generate a random meal plan.

I entered in all of the meals that I liked to cook, how many times in a single month I was willing to eat that meal, how "hard" it was to cook, and the "category" of the meal so I avoided having pasta 2 nights in a row, for example. Going to a menu in the spreadsheet then picks from the meals that I have listed and creates a new sheet in the workbook, listing a month's worth of meals at a time.

The advantage of using Sheets and Google Apps Script is that it is easy to update all of the meals that I wanted randomized. The disadvantage is that Google seems to have abandoned Apps Script. It is not usable on mobile devices, for example. Some day I may move this concept to a mobile app, since nowadays I tend to do meal planning on my Android phone or on the iPad much more than on a laptop.

If you want to use this for your own meal planning, just click on the link to the meal planner document and save a copy of it to your Google Drive account.  There are instructions in the workbook itself.

Tuesday, July 19, 2016

Some Miscellaneous Powershell Scripts/snippets

I've just posted a few additional scripts that I've used over the years up on GitHub.

There are a few scripts that I use mostly in auditing AD.

I've also added some snippets that I've used to add AD photos (displayed in Outlook and Sharepoint), decommission user accounts, and create a group that has a diverse number of test users from various departments.

All of the scripts were written in Powershell and most rely on the AD cmdlets, so should work in Windows Server 2008 R2 or above.