Category Archives: SharePoint

SharePoint 2013

SharePoint 2013: Enabling PDF Previews in Document Libraries with Office Web Apps 2013

I wanted to hold onto this post since it seems like a useful feature that sounds like it should have been available OOTB. This will be nice to add once I upgrade to 2013.

Wictor Wilén – SharePoint MCA, MCSM, MCM and MVP – SharePoint 2013: Enabling PDF Previews in Document Libraries with Office Web Apps 2013.

SharePoint 2007

Get Inventory of All SharePoint Documents Using Windows PowerShell

I thought this was a great find when looking to assess site usage before planning data migration to SharePoint 2013. I haven’t run it across the entire farm yet due to the time it will take to run; however, I’ve tested it and posted the code below the link to show some changes I’ve made to get it to work in my environment. I encourage you to read the comments when following the link for some troubleshooting if you run into trouble.

Getting an Inventory of All SharePoint Documents Using Windows PowerShell « SharePoint Automation.

[code language=”powershell”]
[System.Reflection.Assembly]::Load(“Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”)
[System.Reflection.Assembly]::Load(“Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”)
[System.Reflection.Assembly]::Load(“Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”)
[System.Reflection.Assembly]::Load(“System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”)

function Get-DocInventory([string]$siteUrl) {
$site = New-Object Microsoft.SharePoint.SPSite $siteUrl
foreach ($web in $site.AllWebs) {
foreach ($list in $web.Lists) {
if ($list.BaseType -ne “DocumentLibrary”) {
continue
}

foreach ($item in $list.Items) {
$data = @{
“Site” = $site.Url
“Web” = $web.Url
“list” = $list.Title
“Item ID” = $item.ID
“Item URL” = $item.Url
“Item Title” = $item.Title
“Item Created” = $item[“Created”]
“Item Modified” = $item[“Modified”]
“File Size” = $item.File.Length/1KB
}
New-Object PSObject -Property $data
}
}
$web.Dispose();
}
$site.Dispose()
}

Get-DocInventory | Out-GridView
Get-DocInventory | Export-Csv -NoTypeInformation -Path c:\Temp\Report_SC_Docs.csv
[/code]

SharePoint 2007

Adding user profile images to Active Directory and SharePoint 2007

Many companies have a huge collection of employee photographs somewhere, typically for a badge system. The first hurdle was getting the pictures into Active Directory in bulk. The images were named by the full employee name, not username so it was difficult to match them together. Luckily Exclaimer Outlook Photos is a free tool that not only imports the photos into Active Directory but also resizes and attempts to match image filenames against the Display Name property. You could also use Bulk Rename Utility to clean up the file names in advance especially if you are knowledgeable with using Regular Expressions to make the necessary modifications.

If I were using SharePoint 2010 or 2013, getting the images mapped into SharePoint would be a simple process of mapping this image field to the field in the User Profile Service. In SharePoint 2007, this process is a little more difficult until I ran across the SUSHI utility on CodePlex. It has a Profile Import Feature that will take a folder of images and match them by username to profiles in SharePoint. Well going back to the original problem of getting the images named by username instead of full name I was able to take the uploaded images in Active Directory and export them in bulk using the follow PowerShell command:

Import-module ActiveDirectory
Get-ADUser -Filter * -Properties thumbnailphoto | where {$_.thumbnailphoto} | foreach {$_.thumbnailphoto | Set-Content -Path “C:\temp\$($_.SamAccountName).png” -Encoding Byte}

This dumped all of the images into a folder that SUSHI could then use to upload from. Hopefully this helps walk you through the process of getting a bunch of useful images sitting on a drive doing nothing and get them integrated into your environment.

SharePoint 2007

Browsing a WebDAV folder various errors in Windows 7

I had a user experiencing an odd issue accessing a mapped SharePoint library. It would give an access denied error sometimes and other times it would say the disk is not formatted when they tried to access it. I found a Microsoft KB article that said it would happen under Windows XP; however, this user was using Windows 7. I could access the folder in this manner from a similar Windows 7 computer. The library had over 10,000 files in it so then I found the following article which was similar to the Microsoft KB:

How to Expand webdav client file Browseing limitations – Knowledgebase – Application X.

However, they didn’t specify the operating system so I made the registry change, restarted the Web Client service and the user was successfully able to access the folder again. I’m still curious as to what caused the issue for that particular user.

SharePoint 2013

Third Party Add Ons Code Acceptance Checklist

In looking at making the migration from 2007 to 2013, I’m curious as to what involvement third party add ons will play in the new system. Currently there are some free and paid add ons kicking around on the SharePoint 2007 farm with mostly good results. In narrowing down what end users what though it is difficult to just say no that something isn’t possible when it could be with the addition of another piece of software. I’ll have to do considerable research to determine a policy for the addition of additional software for SharePoint.

Sample code acceptance checklist for IT organizations.

SharePoint 2007

Enabling SharePoint Champions for User Adoption

Great info on encouraging end user adoption and following the path to getting an old SharePoint installation updated and to find champions in your organization to help in the process and to encourage user adoption moving forward from Wendy Neal (www.sharepointwendy.com)