Gmail scripts – Mark Read During Business Hours

I quickly threw this together. The following script would mark all Gmail email coming in to be read if it’s Monday through Friday between the hours of 9am and 5pm. This is done at http://script.google.com with the API from https://developers.google.com/apps-script/reference/gmail/.

Don’t forget to click on Resources > Current Project’s Triggers and have it run once a minute!

function markReadDuringBusHours() {
    var currentDate = new Date();
    var currentDay = currentDate.getDay();
    var currentHour = currentDate.getHours();
    var threads = GmailApp.getInboxThreads();
    if (currentHour > 8 && currentHour < 18 && currentDay > 0 && currentDay < 6)
    {
        GmailApp.markThreadsRead(threads);
    }
}

“Getting the most out of SharePoint” email

Once a user completes the creation of their My Site, an email will be automatically sent that looks like this:

Get the Most Out of SharePoint

As you can see, you may not want this to be sent out or, at least, have the ability to customize it. Unfortunately, it’s baked into SharePoint so your only options are either to intercept the email via Exchange or to customize files that could be replaced on a service update, patches, whatever.

To customize, read this. Is this how I get the most out of SharePoint?

The file in question is located in: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\Resources

And to get rid of the Let’s Get Social dialog box, click here.

Add ‘Sign in as Different User’ back to SharePoint 2013 Drop Down

1.  Navigate to the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\CONTROLTEMPLATES\Welcome.ascx file and open it in a text editor

2.  Add the following snippet before this line <SharePoint:MenuItemTemplate runat=”server” id=”ID_RequestAccess”


<SharePoint:MenuItemTemplate runat="server" ID="ID_LoginAsDifferentUser"
Text="<%$Resources:wss,personalactions_loginasdifferentuser%>"
Description="<%$Resources:wss,personalactions_loginasdifferentuserdescription%>"
MenuGroupId="100"
Sequence="100"
UseShortId="true"
/>

3.  Save and reload in browser. You’ll get the “Working on it…” screen before the site loads.

SharePoint 2013 Installation

This is guide for installing SharePoint 2013 Enterprise using a compilation of various posts with the plan built off of Todd Klindt’s basic installation guide.

  1. Confirm Service Accounts. Here’s another suggestion that has more detail
    • Make sp_install a local administrator on all SharePoint servers
  2. Install SQL 2012 SP1
  3. Run Prereq installer to Install Prereqs
  4. Install forgotten prereqs
  5. Install SharePoint 2013
  6. Run “Start-Transcript” in SharePoint 2013 Management Shell so you can track all the commands you are executing
  7. Create Farm
  8. Install any CUs
  9.  Create managed accounts
  10. Create content web app
  11. Create mysite web app. Here’s another resource. And finally TechNet
    • How to get those user photos in there from AD. Make sure to read the comments as well
    • If you set up the User Profile Service now, profile data will have temporary issues until you setup other services.
  12. Create App Management Service. Here’s the TechNet info on Apps. Here’s some important info regarding allowing anonymous access to Apps.
  13. Add SharePoint web apps to Hosts file
  14. Create State Service
  15. Create Usage Service app (see previous link)
  16. Create Managed Metadata Service
  17. Create Search Service
  18. Run a full crawl to verify everything works
  19. Create User Profile Service app if you haven’t already
  20. Create other service applications as needed
  21. Gpupdate /force & reboot
  22. Run all Health Analyzer rules
  23. Don’t forget the Workflow Manager and this for non-SSL:
    • register-SPWorkFlowService -spsite “http://yourSite” -WorkflowHostUri “http://workflowHost:12291″ -AllowOAuthHttp
    • And don’t forget to run Workflow Manager on every server in your farm.
  24. Create the Business Data Connectivity Service Application. Make sure you’re running the “Business Data Connectivity Service” in Services on Server before you create the Service Application.
  25. Install PerformancePoint 
  26. Report Server. No content-types?

Update Web Part on a Page Using Powershell in SharePoint 2010

I recently had to update a web part’s zone id that existed on most pages throughout the SharePoint 2010 site. I wrote up this powershell script to address this. DISCLAIMER: Use at your own risk!

  $site = new-object Microsoft.SharePoint.SPSite(“http://your_site”)
  foreach($web in $site.AllWebs)
{
    #Make sure you specify which page needs changes
    $page = $web.GetFile(“default.aspx”)
    $page.CheckOut()
    $wpm = $web.GetLimitedWebPartManager($page.Url, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
  #$wpm.WebParts | ft
  $wp = $wpm.WebParts | Where-Object { $_.Title -eq “Page Tabs” }
  #$wp.ZoneID | ft
  $wp.ZoneID = “Header”
  $wpm.SaveChanges($wp)
  $page.CheckIn(“Update via PowerShell”,[Microsoft.SharePoint.SPCheckinType]::MajorCheckIn)
  $wp.ZoneID | ft
}
$web.Close()
$site.Close()

I left the commented lines in since they can be helpful as well.

Query Tool for Raw Web Service Search Results for SharePoint 2007 & 2010 (FAST and Enterprise)

CodePlex has two great tools to query your SharePoint 2007 or 2010 search which return raw XML so you can see exactly what is going on in your results.

Fast Search For SharePoint MOSS 2010 Query Tool - Ok, they need to work on the title a bit and the background is just a terrible idea but the thing works for both FAST and Enterprise Search on 2010. It allows you to choose Scope, edit the Default Columns, and a lot more. It’s mostly intuitive to use. Just make sure to change your “Results Provider” to “SharePoint” if you’re using Enterprise instead of FAST.

SharePoint Search Service Tool – This is for SharePoint 2007 and works just as well as the previous one. It has less options but gets you your XML results quickly and edit the query as needed. Plus, a nice background!

SharePoint 2007 Search Service Tool

Posta Tuscan Grille – A Review

The other day I went with a friend to a restaurant I didn’t know existed – Posta Tuscan Grille in the Marriot across from the Jimmy John’s (not to be confused with Sosta or Tosca). It’s a nice looking place although we didn’t get the full dining experience as Lenovo had taken over. Imagine this filled with discussions about ThinkPads and the latest meme:

posta1

If we had counterfeited some Lenovo name tags, we would have had a free lunch. Instead, we were sent to the bar area which was nice (pretty much the same theme) but had more of a hotel feel.

Our waiter arrived quickly, provided us with drink, lunch, and special menus and was very helpful and professional. He also said that if we get something from the one-page lunch special menu, it’d come out quickest. I ended up having lasagna from the main menu ($15) which looked like this:

posta2

Sorry, I dug into it prior to the picture! I would tell you the fancy name of the sauces and other details, but I assumed their online menu would have the description and it’s not even on there. Suffice to say, the left side was one of the best sauces I’d ever had. It was a buttery cream that wasn’t too rich and if I had a jug I would’ve asked them to fill it and add a straw. Ok, that’s a bit gross but you get the idea. The right side was good too but the left was just too good.

My friend had something off of the quick menu, a veggie sandwich with Caesar salad on the side instead of the fries:

posta3

It was good, nothing wrong with it but probably wouldn’t order again. The bread was good and soft. It held together. I believe it was $10.

I would definitely recommend this place, especially if you’re with a client. The food is good and it’s a little pricey but at least the quality is there. The server could’ve visited one more time to freshen the drinks but he made up for that mistake by giving us a couple of their Tuscan fries to try (well seasoned, slightly limp, good).

I’ll have to go back to try their pizzas “from the bricks” or have that lasagna again.