I’m Moderating a free webinar on Branding on Thursday October 23rd 2014

Come join me and a 3 awesome SharePoint MVP’s this Thursday 10-23-2014 at 11am CST for a talk about the Role of Branding in the future of SharePoint.

Join myself and John Ross, Randy Drisgill and Yaroslav Pentsarskyy for an interesting discussion on branding, complete with the latest best practices..

Our expert panel will answer questions about

  • How Branding differs between Online and On-Premise.
  • The Role of Responsive Design in Modern Day SharePoint Branding
  • The latest guidance from Microsoft as it relates to Branding Office 365

Plus as many audience questions as we can answer in 60 minutes!

I hope to see you there!

Register at:
https://www1.gotomeeting.com/register/509215617

– Jack

I’m presenting at SPFest Chicago – December 8th-10th 2014

I’m excited to be a part of SP Fest Chicago 2014 this year with two sessions:

“SharePoint PowerShell Time Machine”
On Tuesday December 9th at 11:20am.

In this session I share scripts that will either save you time, or in some cases, allow you to go back in time. For example, there’s a script that enables versioning on every document library in your farm. Another that logs basic permissions, and as many other handy scripts as I can fit into a 70 minute session!

“Advanced Introduction to PowerShell Scripting”
On Monday December 8th 8:30am-Noon with co-host Michael Blumenthal

This 100-200 level half day workshop will introduce you to PowerShell in a way that you can use the very next day at work. We’ll quickly cover the basics of PowerShell, then demonstrate some real world scripts used to solve day to day problems in the life of a SharePoint Administrator. We then deconstruct a script- and show you “how we figured it out” – showing the process of starting a script from scratch, and the explorative process used to figure out what to put in a script when you have no idea how at the beginning (and without using Google!) Along the way we explain and demonstrate the features of PowerShell that make things fun! There is something for everyone – new PowerShell users will be on the fast-track to using PS in day to day work. more experienced PS users benefit from seeing real-world scripts and hearing how others go about solving problems. We even have a few tricks that will save time for developers! 

I hope to see you there!

– Jack

I’m speaking at SharePoint Saturday Chicago on September 5th

I’m honored to be selected to present at this weekends SharePoint Saturday Chicago (downtown)

I’ll be doing a session titled:

Architecting the infrastructure of a multi server SharePoint Farm

The session is going to cover topics like configuring load balancers for the web front ends, understanding how sharepoint load balances it’s services and what to do about SSL, IIS bindings etc…

Ever get strange characters ( ╗┐’ )when executing a PS1 or batch file?

I’ve had this happen a few times, and always wondered what was up.

Every once in a while, I’d try to run a powershell file that looked normal in my text editor, but when I ran it, would have a few extra characters in front.

This often surfaced when calling one powershell/batch file from another.

Today I copied the odd characters off the screen and searched for them on the internet.

I found this great blog post.

http://superuser.com/questions/601282/%CC%81%E2%95%97%E2%94%90-is-not-recognized-as-an-internal-or-external-command

Basically those 3 characters I was getting were “Beginning of File” characters -something some formats handle better than others.

The solution was simple – I went into Notepad++ and changed the file encoding to “UTF-8 no BOF” and then used the convert option right under that in the menu for good measure.

Problem solved, and more importantly, I understand now why it was happening.

Using WAP to publish SharePoint on the internet.

Sam Hassani over at Brightstarr put together a couple of great articles on Exposing SharePoint over the internet through Web Access proxy (WAP) , a feature of Windows Server 2012R2.

These articles talk about WAP as a nice alternative to UAG and TMG (two security products Microsoft used to sell, but has since retired)  I haven’t followed the steps yet, but it looks like it might be a suitable fill in for CA Siteminder in some cases as well.

Part 1: http://www.brightstarr.com/sharepoint-technology-and-application-insights/securely-publishing-sharepoint-externally-using-web-application-proxy

Part 2: http://www.brightstarr.com/sharepoint-technology-and-application-insights/securely-publishing-sharepoint-externally-using-web-application-proxy-part-2

The best part of the above articles, in my opinion, is that they really make this stuff look easy and accessible – I can’t wait to try this out!

New Article: SSL certificates and SharePoint

This article talks about several different options for using SSL certificates in SharePoint – it should be very helpful if you’re new to SSL or if you’re hitting one of the border cases such as multi-named Certificates.

  • Single SharePoint Server, single URL + SSL
  • Multiple Web Front end SharePoint servers, sharing one URL using one SSL certificate
  • Single/Multiple SharePoint Server(s), with multiple URL’s each using different SSL certificates on different IP Addresses
  • Single/Multiple SharePoint Server(s), with multiple URL’s each using the same wildcard SSL certificate on the same IP address
  • Single/Multiple SharePoint Server(s), with multiple URL’s each using the same Mulitname (also known as Subject Alternative Name) SSL certificate on the same IP address

http://sharepointjack.com/ssl-certificates-and-sharepoint/

SharePoint ULS logs Tips, Tricks, and Thoughts

ULS logs are where SharePoint logs what’s happening, they are plain text files.

Here are a few thoughts on optimizing your workflow when dealing with the ULS logs.

#1 – Know where your logs are.

In Central administration, under Monitoring->Diagnostic Logging, you can set the path for the ULS logs – this sets the path for EVERY server in your farm, so you’ll need to ensure the drive letter exists and has space on EACH server. In general, you don’t want these on the C: Drive, which unfortunately, is the default. I put them in a folder called d:\Sharepoint_Logs

#2 – Don’t log more than you need to!

ULS log files can be HUGE – on the Diagnostic Logging screen (Central admin->Monitoring->Diagnostic Logging) consider doing the following:

  • Under “Event throttling” select “All Categories” then pull the drop downs in that section to “Reset to Default”
  • Under the “Trace Log” area, set the number of days to something reasonable – Ie decide how far back you’d be willing to go to look at a problem, in many cases, 7 days should be sufficient.
  • Under the “Trace Log” area, Restrict Trace Log Disk Space – My Log drive is 80GB, but it’s also shared with a few other logs like the usage logs, and some CSV’s I generate with PowerShell – so I limit ULS logs to 40GB

#3 – Use the ULS Log Viewer.

There have been several of these types of viewers made, but there is “the one” that everyone always uses and that’s available here: http://www.toddklindt.com/ulsviewer

This used to be on Codeplex, but sadly, it wasn’t updated and Codeplex auto-deleted it. Todd was gracious enough to put a copy on his site so others can continue to use this great tool.

Personally, I keep a copy of the ULS Log Viewer right in the folder with the ULS logs- that way it’s nice and handy.

What the ULS logviewer does, is parse the log file and display it in a very user friendly way – I used to use Notepad++ to look at the logs and this is much much better for logviewing.  It has the option of opening a log file, or of opening the ULS logs in real time. One nice thing about it, is it seems to “Know” where your ULS logs are, so you can open the current one without having to go through a bunch of mouse clicks. It’s also great at letting you filter the logs, for example, seeing only the critical events.

#4 – PowerShell related ULS commands

There are a few PowerShell commands for the ULS logs that can be handy to know about. This MSDN page talks about all of them, below you’ll find a few that I’ve personally used with a longer explanation than whats on MSDN.

Merge-SPLogFile

What this one does, is combines all the ULS log file entries from all the servers in your farm, and merges them down to a single file on the box where the command was run – very helpful for tracing issues between boxes on your farm.

There are a lot of ways to use the command so try get-help Merge-SPLogfile -detailed to get the finer details (In particular, note the -starttime and -endtime parameters so you are only merging managable amounts of data!)

Also a quick search found this great article by Cecildt with screenshots and lots more detail than I have here: http://cecildt.blogspot.com/2012/10/sharepoint-2010using-merge-splogfile-to.html

New-SPLogFile

This command Closes the current ULS log file and starts a new one. To my knowledge it only does this on the server where you’ve run the command (ie if you have 3 servers, you’ll need to run on each one)  I’ve used this before when looking at a system in real time with a support person from MS- We ran this command to reset the log file, then recreated a problem, then ran the command again – and what we were left with was a very nice small ULS log that was reasonably timeboxed around the event we were investigating. We could have done the same with Merge-SPlogfile by setting times, but that command is slower, and we would have needed to jot down the start and end times.  In other words, New-SPlogfiles doesn’t do anything you couldn’t do with other tools, it just makes it easier under the right circumstances.

– Jack

Deployinator

At work I typically deploy  WSP’s to our environments.

A situation came up where it was necessary to redeploy a WSP multiple times, maybe dozens, as a developer worked through an issue.

We needed a fast way to allow the developer to deploy the WSP’s, but with a catch – we couldn’t give him RDP access to the server, and I knew that meetings and such would prevent me from turning around the requests as quickly as needed.

The solution:

Deployinator

I configured this script to run as a scheduled task in Windows, running every 2 minutes.
(For help on scheduling a task, see Schedule your PowerShell Scripts using the Windows Task Scheduler and it’s accompanying 2 min video)

Notes are below the script so be sure to scroll down…

#purpose - check a directory for a file
#if found, update the solution, then move the file to a backup directory
#Jack Fruh 
Add-PSSnapin "Microsoft.SharePoint.Powershell" -erroraction Silentlycontinue
$dt = get-date -format "yyyyMMdd_hhmmtt"

$loc = get-location
$monitorfolder = "WSPDropFolder"
$archivefolder = "Archive"
$wsp = "Name.of.Your.wsp"
$source = "$($loc.path)\$monitorfolder\$wsp"
$dest = "$($loc.path)\$archivefolder\$($dt)_$wsp"

if (test-path $source)
{
    # allow enough time 
    # in case the file was being copied 
    # at the exact moment the script ran:
    sleep 10
    $dt = get-date -format "yyyyMMdd_hhmmtt"
    write-host "file $source found - deploying"
    Update-SPSolution -Identity $wsp -LiteralPath $source -GacDeployment
	  
    move-item $source $dest
	  
    $EmailFrom = "Deployinator@yourdomain.com"
    $EmailTo = "developer@yourdomain.com"
    $EmailCC = "you@yourdomain.com"
    $EmailSubject = "Code moved to Stage"
    $EmailBody = "Hi There, at $dt $source was updated in stage, and moved to $dest"
    $SMTPServer = "smtp.yourdomain.com"

    Send-MailMessage -From $EmailFrom -To $EmailTo -CC $EmailCC -Subject $EmailSubject -body $EmailBody -SmtpServer $SMTPServer	  
}
    else
{
    write-host "No File to deploy found at $source"
}

The WSPDropFolder is shared (ie a windows shared folder on the server) with the developer – the developer is the only one who has access so that should help on the security side of things.

The Script checks to see if the file is there, it’s looking for a specific file, by name – this helps ensure the script is only used to deploy the agreed upon solution and not used for general deployments.

After the Script updates the WSP in sharepoint, it moves it to the Archive folder and date stamps it.

It then finishes things up by sending the developer, and myself an email so we both know the deployment completed.

“Using” the script is simple -the developer copies the WSP for deployment to the WSPDropFolder, then, within 2 minutes the script picks up the file and deploys it, the developer will see the folder is again empty, and will receive an email confirmation.

If the developer needs to redeploy, he just puts a new file in the WSPDropFolder and the process repeats.

It’s worked out great so far, allowing the developer to make and test multiple revisions to his code quickly, and without my intervention.

– Jack