SharePoint List and Column update script

I recently had the need to locate all list columns in a SharePoint site of a particular data type. My first thought was someone must have done this before and after a quick hunt around in Google discovered that it wasn’t the case.

I wrote a simple script to output the names of lists and fields of a particular type using PowerShell. It is easy to modify the script to look for other field types or to change the field configuration e.g. switching from plain text to rich text.
This MSDN Article contains details of the “SPField Class” and is very handy if you are looking to create a variation of my script.
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfield.aspx

A small word of warning…always test this in a test environment before running in production. Use this script at your own risk!

Here is my base script:

$SPwebApp = Get-SPWebApplication "http://myintranetURL"
 foreach ($SPsite in $SPwebApp.Sites)
 {
  foreach($SPweb in $SPsite.AllWebs)
  {
   write-host "Site URL: ", $spweb.url
   foreach($list in $spweb.lists)
    {
     write-host "List Name: ", $list.title
      foreach($field in $list.fields)
       {
        if ($field.type -eq "Note" -and $field.title -ne "Approver Comments")
         {
           write-host "field title: ", $field.title, " > ", $field.type -nonewline
           if ($field.richtextmode -eq "FullHTML")
            {
              write-host "* Rich Text Enhanced ** " -nonewline
            }
          write-host ""
        }
     }
    }
  }
 }

This scripts walks its way through every list in a given web application and outputs a list of “sites, lists and field names where the field type = “Note” (multi-line text).

Works on both SharePoint 2010 and SharePoint 2013.

How to apply for an IT Job

Over the past 10 or so years I have been involved in recruitment people for IT jobs in the organisations I have worked for and assisted clients filling internal IT positions. It is pretty clear from some of the applications that most people simply don’t have a clue when it comes to applying for a job.

A few simple things to do when applying for a position:

  • Write a cover letter using a professional letter format. Make sure the cover letter references the key points from the job ad. Many applicants don’t bother to write a cover letter or use a less formal format. The letter shows you have read and understood what is being asked for and that you have put effort into your application.
  • Make sure you CV is current, includes the correct contact details and includes a brief outline of you recent employment history – enough to show your skills and experience. Include your references, don’t ask for references on application. Finally include some hobbies and interests.

These things are important because employers like to interview people who have put effort into the application. If you have just send a generic CV and not taken the time to include a cover letter or even confirm you are eligible to apply, then don’t expect to be looked at in a good light. Chances are your CV will end up in the ‘No’ pile.

If you are luck enough to get an interview, make sure you turn up:

  • Be prepared to talk about yourself. Make sure you can clear articulate why you are applying for the position.
  • Do not put down your previous employer, workmates or users. Employers look for people who can deal with these types of people professionally.
  • When answering questions don’t be verbose, but don’t be to brief either.
  • Don’t speak in a mono-tone. You are excited to be here right!
  • Make sure you have read the companies website, so you understand what they do and recent news.
  • Even if you don’t have a question for the interviewer, have a question for the interviewer! Something about the position but avoid questions like “how much sick leave do I get”. Show you are interested in the company and what it does.
  • Be polite, shake hands and say thank you.

In my experience 80% of people fail to do these basic things. Get these simple things right and you will find yourself in the top 20% of applicants for the job. It is interesting to see who “turns up” to the interview and who just goes through the motions. Trust me, you don’t need to put much work in to be better than average!

Introducing SharePoint Access Services

Access Services lets you quickly create web applications and make them available to your SharePoint users via their web browser. The great thing is you don’t actually need to know much about SharePoint or be a web developer to make your application, the only thing you need is Microsoft Access skills.

The process for creating an Access Services database is:

  1. Create a database with tables and forms in Access 2010.
  2. Click the Home menu and choose the Save and Share option.
  3. Perform the compatibility test and fix any issues.
  4. Publish to SharePoint – enter a site name (Access Services creates a site for each published Access database).

Access Services migrates the data from the Access MDB file into the SharePoint Content database (as lists). This allows multi-user access to the Access Services database. One thing to note is that Access Services databases can’t use a SQL Server backend database. 

Image

Why use Access Services?

Access Services applications can be built by anyone with Microsoft Access with a very low learning curve. No need to learn .NET development.

Existing Access Databases can be converted. They must be upgraded to Access 2010 first and a few changes may be required to meet the deployment requirements, but will often be far quicker than developing a new application.

Performance is great for remote users. The application is accessed via your web browser and is a great way to improve performance for remote users.

Your database becomes multi-user with minimal effort!

Because it’s SharePoint your application is available on the intranet without additional infrastructure and licensing.

A few other things you should know:

  • User access management is handled by SharePoint security.
  • Locks the database at object level rather than file level. Better concurrent user access.
  • Allows large lists (100,000 items is easily supported)
  • Master page branding is not supported. Uses Access branding.
  • Linked tables are not supported
  • Access Services sites can’t be edited using SharePoint designer

Requirements?

To use Access Services you need the following:

  • SharePoint 2010 Enterprise
  • SQL 2008 R2 with Reporting Services installed in SharePoint Integrated mode

Learn more:

http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/

http://msdn.microsoft.com/en-us/office2010developertrainingcourse_accesslab_topic6.aspx

http://databases.about.com/od/tutorials/a/Building-An-Access-Database-In-Office-365.htm

Send me to NASA!

I have been fortunate enough to get nominated for the Kordia IT Super Hero award. Thanks to the support of many people and made it to the final 10! The winning prize is a trip to NASA!

I’m not the only IT guy who worked enormous hours and pulled out all the stops following the Christchurch Earthquake and so I feel very fortunate to get this far. Thank you to everyone who has voted so far!

Please vote for me here: http://www.ithero.co.nz/nominee/view/62

You know you’ve made it when your photo appears on Bus Stops!

As a kid, I was totally obsessed with anything to do with rockets, space and aviation in general.  This would be living my childhood dream!

Thank you very much for your vote!

Steve

SharePoint 2013

SharePoint 2013 “Preview” edition is now available to download.

I have posted an article on my company blog with links to various resources and other items of interest to SharePoint people.

SharePoint 2013 “Preview” – Download and resources

Here’s a couple of screenshots to get you started…

SharePoint 2013 – Home page

SharePoint 2013 – App Store

Overall SharePoint 2013 looks like a good step forward from SharePoint 2010. Microsoft have put a lot of effort into mobility, HTML 5 and cloud functionality.

Microsoft also released a preview of Office 2013. It will be a busy time getting up to speed on all these new things over the next few months. Nice work Microsoft.

SharePoint Orphaned Content Database

Today I resolved an interesting SharePoint 2010 issue. Examining the Windows Application Log on the Application Server I found the following error:

SQL Database ‘WSS_Content_ba49ed16-9131-4e70-ab2a-4378914fd6f0′ on SQL Server instance ‘SharePointSQLServerName’ not found. Additional error information from SQL Server is included below.

In Central Admin SharePoint listed in “Stopped” content database called “WSS_Content_ba49ed16-9131-4e70-ab2a-4378914fd6f0″. This database didn’t exist in SQL Server.

I believe the database appeared when the SharePoint server was restarted but wasn’t able to contact the SQL Server due to an issue with DNS. A reference to the database existed but the database itself was never created.

The Get-SPContentDatabase command lists all databases except the one above. Hummm, this is going to be tricky to removed…

Here’s the process I followed to remove the database orphaned database:

  • In SQL restore a small content database into a new database and gave it the name listed in the event log error.
  • In Central Admin start the orphaned content database.
  • In Central Admin I viewed the content database properties and selected the “remove” option to delete the database.
  • Manually removed the database from SQL server.

The SharePoint environment is now back to it’s usual happy self.

New Zealand SharePoint Conference

I will be presenting at the New Zealand SharePoint Conference for the first time on the 28th and 29th of March 2012. This is a great conference and a must attend event for anyone who works with SharePoint.

My presentation will cover publishing SharePoint with Forefront UAG and TMG. Hopefully a few people come along to learn and the presentation runs smoothly!

Some details of my presentation can be found here: http://canterburybusinesssolutions.co.nz/2012/03/sharepoint-conference/

The official conference website is here: www.sharepointconference.co.nz

See you in Auckland!

Follow

Get every new post delivered to your Inbox.