|
|
|
|
Use the Posts list for posts in this blog.
| Todd Klindt | 7/1/2008 10:06 AM | Sharepoint | 0 | | Thankfully my MVP status was renewed for another year. Thanks to everyone that's contributed to my blog or let me speak at their gatherings. I really appreciate it.
tk | | Todd Klindt | 7/1/2008 9:20 AM | Sharepoint | 0 | | I'll be presenting at the Iowa Dot Net UG tomorrow night. If you're local, come on down. I'm trying to spin up some SharePoint excitement there, so come on down and help out.
tk | | Todd Klindt | 6/21/2008 12:26 PM | Sharepoint | 0 | | Sorry for the late post, but here are the slide decks from TechEd '08 in Orlando. I had a great time, and met a lot of great people. Thanks guys.
(this has the SharePoint conference template, but it's the same slides.)
Again, thanks for the great times everyone. I hope to see you all again.
tk | | Todd Klindt | 6/7/2008 10:49 PM | Sharepoint | 2 | | Tomorrow I'm flying to Orlando for TechEd IT Pro. Here's a rundown of the sessions I'll be presenting:
If you see me in the crowd, say Hi. I'm this goofy looking guy:

See you in Orlando.
tk
| | Todd O. Klindt | 6/4/2008 4:42 PM | | 6 | | A reader asked in a comment how to script STSADM backups and be able to keep multiple copies. He's using a command like this:
Stsadm.exe –o backup –url http://www.toddklindt.com –filename tk.stsadm -overwrite
Or
Stsadm.exe –o export –url http://www.toddklindt.com/blog -filename tk-blog.cmp –overwrite
He wants to keep more than one instance of the backups, in case someone deletes something and they don't get back to you right away. I have a great way to work around this. Windows has an environment variable that is equal to the date. We can start with this. It's not in a good format, so we'll have to tweak it some:
For one, the backslashes will cause us problems in the file system. Second, leading with the day of the week will not sort very well. What we want is something along the lines of YYMMDD. Fortunately there is a way to parse through variables to get snippets of the information. While this is documented in the SET command, it works fine without it. To get the full skinny type set /? at a Command Prompt to get the full usage. Set has a lot of usage, but here's the part we care about:
We can use this approach to pull out the parts of the %date% variable that we want. Here's what the command would look like:
The string "%date:~-2%%date:~4,2%%date:~7,2%" turns into YYMMDD. The first part "%date:~-2%" says 'start at the end and take the last two characters.' The next part, "%date:~4,2%" says 'skip the first four characters and give me the next 2'. The last part, "%date:~7,2%" says 'skip the first seven characters and give me the next 2.' You put all that together and you get YYMMDD. Now just couple that with your STSADM command and you're all set. It would look something like this:
I included a filename with spaces to demonstrate how to take care of that. Pretty slick, huh? I can hear some people out there saying, "That's great, but now my drive is going to get full of backups. Some help you turned out to be!" Settle down, I've got the fix for that too. Another built in command FORFILES will fix that right up. Add the following line to your scheduled script:
forfiles /d -7 /m *.stsadm /c "cmd /c del @file"
That command will delete all files that end in .stsadm that are more than seven days old. Now you can keep exactly as many backups of your sites or webs as you want.
Handy?
Thanks to the reader that asked.
tk
| | Todd O. Klindt | 4/22/2008 11:13 AM | | 0 | | I'll be presenting a few sessions at TechEd IT Forum in Orlando this summer. This is your chance to see me in the flesh. I'll be doing some sessions on administration and helping Shane Young with a pre-conference class. There's an early bird discount if you sign up before May 2nd, so head over to the TechEd Site and get signed up. | | Todd O. Klindt | 4/18/2008 5:09 PM | | 0 | | As some of you know I've been pretty busy the last couple of weeks traveling. Because of that I haven't been able to share some great news with you all. I've changed jobs, now I'm working with some buddies at Solanite Consulting. I worked with three of the four other employees at UGS and they're a lot of fun. We do SharePoint consulting, so if you need some extra SharePoint muscle, let me know.
tk
| | Todd Klindt | 4/8/2008 6:42 PM | Sharepoint | 1 | | Wow, has it been a busy and exciting two days. First off, I'd like to thank everyone that I talked to while at the conference. You made me feel very welcome and at home. I look forward to hearing from you again. I had a wonderful time here and I'm so glad I was asked to come over. This was a time I won't soon forget. A special shoutout goes to to Mo, Bander, Alex, Mohammad, Adnan, and the guy from Avepoint whose name escapes me at the moment. We did a lot of funs things in the last few days.
Tomorrow the gang is off to Istanbul to spread the good word about SharePoint there. If it's half as much fun as Dubai was it will be amazing.
Oh, I almost forget. Here are the slides for my STSADM session as well as the scripts. Here is the slides for my SQL session. A few people were asking for them. Enjoy.
tk | | Todd O. Klindt | 4/5/2008 7:19 AM | Sharepoint | 0 | | In a moment I'll be shutting this laptop off, throwing it in my bag and heading to the airport. I'm flying to Dubai to speak at the Microsoft SharePoint Conference. If you're in the area, stop by and say Hi. I'll be spending three days there, and four days in Istanbul speaking at the SharePoint conference there too. I usually take advantage of those long, long flights by writing up some content for my blog. Hopefully once I get over there I'll have some new stuff to post for you all.
I'll hopefully be posting some pictures, too, so be on the lookout for them.
tk | | Todd O. Klindt | 3/24/2008 9:19 PM | Sharepoint | 4 | |
As I've been working through some Incoming E-Mail issues I realized there is no easy way to find out which lists and libraries are enabled for Incoming E-Mail or what addresses are being used. I decided to try my hand at writing a little something to address that issue. It's a small console app that walks through the lists and libraries and reports the ones that have email addresses. It's pretty simple. Go ahead and download it and let me know what you think.
tk | | Todd O. Klindt | 3/3/2008 4:51 PM | Sharepoint | 6 | | I made it to Seattle for the 2008 SharePoint Conference. It's sold out and the number of attendees is huge. My STSADM session is Wednesday at 2:30 in room 6ABC and my SQL session is Thursday at 10:30 in room 6E. I'd love to have you drop by if you're at the SPC. I'll also be at the Ask the Experts lunch on Wednesday. Swing by and say hi.
tk | | Todd O. Klindt | 2/24/2008 9:54 PM | | 36 | |
SharePoint 2007 has a great interface. Those of us that used SharePoint 2003 can really appreciate the improvements that have been made. However in some situations SharePoint needs a little boost. Users need a little more than a web interface can offer. This blog post will explain some of the ways you can use Outlook 2007 as a SharePoint client. We'll cover how it can used online and offline to work with SharePoint content.
Like I said, the regular web interface is great in SharePoint. If it's so great then why would you want to use Outlook as a SharePoint client? There are two main reasons. The first reason is a matter of preference. Some people work out of Outlook 90% of the time and are very comfortable there. If they can use that same program to access SharePoint data, it makes them more likely to use SharePoint. The second reason is practical. Outlook can be used to take SharePoint content offline. This gives users the flexibility to work with SharePoint contact at home or while traveling. Another benefit of this is users that have slow connections to SharePoint. It might be easier for VPN users to work with SharePoint offline than live. Or maybe you have a remote office that doesn't have a good connection to the SharePoint servers. It's always good to have options. Let's find out what those options are.
SharePoint 2003 offered some integration with Outlook 2003, but it really wasn't useful. You couldn't sync in both directions. Things have changed. With SharePoint 2007 and Outlook 2007 you can sync data both ways. Changes made in SharePoint show up in Outlook, and now changes made in Outlook are synced back to SharePoint. And when I say SharePoint I mean that this works with both WSS v3 and MOSS 2007.
When you choose to sync a list or library with Outlook a new data file is created in Outlook. This file is a standard PST file and it is used to store all the content cached from SharePoint. This is important to understand because it means that if you use Exchange none of your SharePoint data is stored in your Exchange mailbox, so it won't fill your mailbox up. This also means that your SharePoint data won't be available outside of Outlook in places like Outlook Web Access or mobile devices that you sync with Exchange. I don't have any ideas of good ways to get your SharePoint data to either of those places. Once you've added a SharePoint list to Outlook you can view the properties of the SharePoint data file by clicking Tools > Account Settings in Outlook.
Then click Data Files. Notice there's also a tab that lists all the SharePoint lists themselves.
So how do we actually get SharePoint data into Outlook? The process is incredibly easy. First, the list or library must be one that can be synced to Outlook. That means it must be one of the following types: document library, picture library, form library, contacts, calendar, discussion lists, tasks or project tasks. Open any list or library based on one of those templates. Click the Actions button and choose Connect to Outlook.
Outlook will pop up a dialog box asking you if you want to connect this to Outlook and allow you to tweak some settings, like the name as it's displayed in Outlook. Once you hit Okay the connection will be made and Outlook will open up the list or library. If you switch back to your folder list you'll see the new data store that's created and you'll see the list or library you've added.
If at any time you want to remove the list you can right click on it and choose Delete.
Since I used a Calendar in the example, let's cover what you can do in Outlook with a SharePoint Calendar. First, like I said before you can add appointments either in Outlook or SharePoint and it will get synced. You can also edit appointments in one and the change will be visible in the other. While you can't view a SharePoint Calendar via OWA or a Windows Mobile device, you can manually drag an appointment from a SharePoint Calendar to your Exchange Calendar. Using Outlook's Overlay Mode you can combine the results of your Outlook Calendar and a SharePoint Calendar.
Whether you combine the calendars or not you'll also get reminds in Outlook for Appointments in SharePoint.
Contacts lists can also be synced to Outlook. You set the sync up the same way. SharePoint Contacts lists make a great way to share contacts with a group. After the Contact list has been connected to Outlook it can be added as an Outlook Address Book so that the addresses can be used when sending email. To do this right click on the SharePoint Contacts list and open up the Properties. Open the Outlook Address Book tab and verify it is checked.
If you want to give the list another name you can do it here.
You can also sync Task Lists with Outlook. You connect them up the same way you do Contacts and Calendars. Like Contacts and Calendars you can edit SharePoint tasks in Outlook and the changes will sync in both directions. The tasks assigned to you will also show up in your To-Do Bar in Outlook along with your Outlook Tasks. You can also view all of the Tasks if you'd like.
Probably the most handy way to use Outlook as an offline SharePoint client is with Document and Picture libraries. Connecting a document library to Outlook allows you to work with your documents when you do not have access to your SharePoint server. While you can read and edit files from your document libraries, you can't use your Outlook folders to add files. You have to enable Incoming E-mail on the document library in order to add files. Files that haven't been synced back up to SharePoint will show up in your SharePoint Drafts Search Folder.
If you do decide to connect a document library to Outlook you'll probably want to enable version control. That will protect the work that you and others do on a document when you're offline. While you're online and Outlook can contact SharePoint any changes you make to documents will be synchronized immediately in the background. While you're offline of course the documents won't be synchronized until you connect again. You can use the Send/Receive button to synchronize changes once you get back online.
I hope this blog has shown you some options for accessing SharePoint offline, or on slow links. Outlook can bridge the online and offline gap.
There are other methods of accessing SharePoint offline. If there is interest in it I can write about it later.
tk | | Todd O. Klindt | 2/5/2008 11:41 AM | Tech Stuff; Sharepoint | 0 | | The next few months are shaking up to be very busy. I thought I'd let you all know where I'm going to be in case you didn't know about any of the events.
First is the Microsoft SharePoint Conference. It's March 3rd through the 6th in Seattle. Unfortunately it's recently sold out, so if you haven't already signed up you won't be able to attend. I'll presenting two sessions. One on STSADM and another on SQL. April 7th through the 11th I'll also be attending the SharePoint conferences in Dubai and Istanbul.
Microsoft will be having their combined Windows Server 2008, SQL Server 2008, and Visual Studio 2008 launch event starting in February. I'll be attending the one in Des Moines on April 24th.
I'll also hopefully be attending the TechEd IT Forum in Orlando June 10th through the 13th. I don't know yet if I'll be presenting there or not.
Hope to see you at some of these events.
tk
| | Todd O. Klindt | 12/11/2007 11:17 AM | Sharepoint | 0 | |
Service Pack 1 for MOSS and WSS v3 have just been released. Get them while they're hot!
You do need to install the WSS SP1 before installing the MOSS SP1.
Of course you'll want to install these in a test environment before you put them into production. There are patches for all your favorite Office 2007 clients as well. You can grab them here.
Happy service packing.
tk | | Todd O. Klindt | 12/11/2007 9:26 AM | Sharepoint | 0 | | If you used MOM or are using SCOM to monitor you'll want to check out the new SCOM Management Packs. Shane Young and I worked with Luis to define the different kinds of alerts SCOM will send you. So make sure and leave a nice comment if you like how it comes out of the box. If you don't like it, it's all Shane's fault, blame him. :)
tk | | Todd O. Klindt | 12/6/2007 11:51 AM | | 0 | | Every year my friends and family pester me for a list of gifts I would like. A couple of years ago, being the SharePoint nerd I am I created an online Christmas list for them on WSS v2. I had a picture of the item I wanted with a short description, an approximate price and a link to buy it from an online retailer. Very considerate of me, I know. I upgraded my site to WSS v3 after last Christmas some time. Well, the most wonderful time of the year came around again and with it came more requests from people wanting to shower me with gifts. I went to my trusty list and started uploading pictures and URLs. I was surprised to see that my links to www.amazon.com and www.bestbuy.com were being replaced with links to MY server. For instance, if some generous soul wanted to buy me a copy of Smokey and the Bandit in glorious HD DVD the URL to buy it from Amazon would be http://www.amazon.com/gp/product/B000NVL1Y0/ref=s9_asin_image_1?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-5&pf_rd_r=0Z371DHGV5B58Q17QZAA&pf_rd_t=101&pf_rd_p=278842001&pf_rd_i=507846 . When I put that URL into my list it got magically changed to http://www.klindt.org/gp/product/B000NVL1Y0/ref=s9_asin_image_1?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-5&pf_rd_r=0Z371DHGV5B58Q17QZAA&pf_rd_t=101&pf_rd_p=278842001&pf_rd_i=507846 when I viewed the page. Same relative URL but my server name instead of Amazon's. How could this be? Sure enough, every single URL I added did this whether it was from http://www.amazon.com , http://www.bestbuy.com or http://www.victoriassecret.com. I tried a few things and no matter what the list or where it was on my server, if I pasted in a URL it was changed to my server name from the original. I bounced the problem off of some of my MVP buddies and Rob Bogue suggested it might have something to do with Alternate Access Mappings (AAMs) and I should look there. For that site there were three AAMs, it looked like this:
http://www.klindt.org is the URL my friends and family use when they want to see what to buy me. Matrix is the name of the server itself and http://www was for me to use as shorthand internally. I removed http://matrix and http://www and made http://www.klindt.org the default. I checked existing URLs, they still pointed to http://www.klindt.org. I added a new one though and the Amazon URL stuck! Thank Rob! At that point I suspected I knew what the problem was, so I added http://matrix and checked it, still worked. To confirm my suspicion I added http://www and as I suspected the problem came back. When you add a URL to SharePoint it does a check to see if the URL is a link to itself, or a Base URL. If so, it saves the URL as a relative URL and when it renders it back to users it fills the server name in with the URL they used to hit the site so that the link is good. SharePoint was erroneously seeing http://www.amazon.com/ links as a base URL because it partially matched one of the AAMs, http://www. I removed http://www completely and changed one of the http://www.amazon.com links to http://matrix.amazon.com just to verify it wasn't just www. It wasn't. The http://matrix.amazon.com links were saved as Base URLs as well. I took it one step further and tried http://matrix2.amazon.com to see if it would match too, it didn't. The bug only seems to happen if the first part of the URL matches an AAM exactly.
Now that I understood the problem the fix was very easy, no more http://www AAMs on my server. I'll just have to keep an eye out to make sure my internal server names don't match any external ones the MSDN2 of http://msdn2.microsoft.com for instance.
The moral of the story is that if you have any problems with SharePoint rewriting your external URLs, verify they don't match up with an AAM.
tk
| | Todd O. Klindt | 11/29/2007 11:22 PM | | 4 | | Along with mergecontentdbs another operation has been recently added to STSADM, renamesite. KB939535 gives some guidance on how to use this new operation. At first glance, I assumed it worked like renameweb, which was nice as there is no way to rename site collections without locking them, backing them up, deleting them and restoring them with the new name. After I read the KB I was disappointed. It seems that renamesite does not work with path-based site collections. A path-based site collection is in the form of http://server/sites/sitename. 99% of the installations I see are in the form. Instead, renamesite only works with host-based site collections. Host-based site collections are site collections that are created using host header mode. Host header mode allows multiple site collections in the same web application, but all have top level names like http://host1 and http://host2. If you're using host header mode, you can use renamesite to rename them. If you're using path-based site collections like most of the SharePoint using world, then this operation is useless to you.
tk | | Todd O. Klindt | 11/25/2007 11:13 AM | | 62 | | Microsoft so very graciously provides a free version of SQL 2005, SQL Express, with MOSS. If you install MOSS using the Basic option or Single Server under Advanced you get SQL Express automatically. So what if as a budding newbie SharePoint admin you chose the Basic option, but now as a wise aged SharePoint admin you've seen the error of your ways and want to use a more respectable version of SQL for your SharePoint backend? You're in luck. In this blog post I'll walk you through upgrading SQL Express to SQL Standard or Enterprise.
First thing you need to do is get a copy of SQL 2005 Standard or Enterprise. Which version you choose depends on the redundancy and availability you want. Either will upgrade from Express. After you have your media you can start the install. This step is important as you have to pass the setup program a parameter to let it know you're doing an upgrade. To upgrade use the command setup.exe SKUUPGRADE=1. It should look like this:
The setup should kick off and it won't give you any indication that you passed it a parameter. Never fear, it will come up later. When the setup gets to the instance selection make sure you don't accept the default instance and you choose the SQL Express instance. First click Installed Instances:
Then choose the OFFICESERVERS instance from the list and hit OK:
Your next screen should confirm that it found SQL Express:
If you click the Details… button you'll see that the setup confirms that SQL Express can be upgraded. This step is optional.
At this point you can Close the box and hit OK until the setup is finished. After the setup is finished you'll want to apply SP2 for SQL 2005 and any post SP2 patches that are available. I don't know if it's required but I always do an IISRESET after this to make sure that SharePoint reconnects properly to SQL.
That's all there is to it. Once you are using full SQL you have quite a few more options available to you like log shipping, database replication, SQL Profiler and more. If you have any questions about how to leverage those tools with SharePoint, leave me a comment and let me know.
tk
| | Todd O. Klindt | 11/20/2007 5:20 PM | Sharepoint | 2 | | First I'd like to apologize. I had intended to get these posted much earlier. I lost the power cable for my laptop after my session Friday so I wasn't able to get into my computer until I got back home. Here are the scripts I used in my presentation, as well as a couple more that I threw in. For those scripts that require input files, I've supplied examples of those as well. I also included a copy of the notes I had for the session. Some points I talk about in the session aren't on the slides but are in the notes. And because of all the comments I got on it, I have also included "joke.txt" for you all.
You can download the zip file here.
Thank you so much for all the comments you put into your evaluations. There were some great suggestions and I will use them to improve the presentation the next time I do it.
Feel free to leave me comments if you have any questions.
tk
| | Todd O. Klindt | 11/19/2007 10:51 PM | | 7 | | On multiple occasions as a SharePoint administrator I have needed to move a Site Collection from one Content Database to another one. In the past this process was very painful and very manual. In this blog post I will show you how to move Site Collections between Content Databases with a single STSADM command using the "mergedbs" operation that was introduced in KB934525.
Why would I need to move a Site Collection to a different Content DB? This comes up for a variety of reasons. For instance, because of restore times, I like to keep my databases under a certain size. While I try to work with my Site Collections owners to plan accordingly sometimes they grow larger than we had imagined. When this happens I need to shuffle Site Collections around to keep my databases in harmony. There are other times when I would do it if it were more convenient. If Site Collections are not growing as expected, I may want to consolidate several into a smaller Content DB. I may also want to move less active Site Collections to Content DBs on slower discs, or move Site Collections to Content DBs that reflect geographic regions. Whatever the reason, in the past to move a Site Collection you had to go through the following steps manually;
- Lock the Site Collection
- Back the Site Collection up
- Delete the Site Collection
- Set all your Content Databases' maximum allowed sites to the number of current sites.
- Set the Content Database you want the Site Collection to go into to allow one more Site Collection.
- Restore the Site Collection
- Unlock the Site Collection
- Adjust your Content Database maximums to allow new sites to be created.
All of these steps could be done with STSADM so you could build scripts and move through the process quickly. In one of the recent security patches (KB934525) for WSS and MOSS Microsoft slipped in a new STSADM operation, mergecontentdbs. I assume this operation was added with the intention of merging Content DBs, but it can also be used to split them. This blog post will walk you through both uses. Let's start with the configuration below:
You can see in this screenshot that I have three Site Collections in two Content DBs; WSSContent and WSSContent2. Let's move http://barcelona/sites/stsadm from WSS_Content to WSS_Content2. If you get the help for the mergecontentdbs operation it looks like this:
We want to use operation 3, Read from file. STSADM has given us a clue about the file needed, it is generated from stsadm –o enumsites. I'll go ahead and run that and pipe it to a file like this:
This will produce a file, mysites.xml, that contains my site collections. To move http://barcelona/sites/stsadm we'll remove all of the other Site Collections except for that one from mysites.xml and save it. You don't need to worry about changing the Site Count at the top, or any of the other Site Collection information in the file, STSADM only grabs the URLs out. I only have two Content Databases so the decision of which database to move the Site Collection to is easy. What if I had many Content Databases? You can use the first operation, Analyze, to get an idea of how your Content Databases are laid out. Let's see how that looks:
You can see here where I got the idea to use the filename mysites.xml. The thing I love best about this screen is that you can just cut and paste the final command into your Command Prompt if you'd like. I think Microsoft did a great job with the usage on this command. One thing to note is that the –url parameter is NOT the URL of the Site Collection you want to move, it's the URL of the Web Application that the Site Collection is in. Since we've already created our file and edited it, let's go ahead and run the command.
That's all there is to it. After an iisreset we see that the Site Collection http://barcelona/sites/stsadm is now in WSS_Content2. You can confirm it by looking in Central Administration > Applications > Content Databases before and after you run the command.
I have one final thing to show you, what I imagine is the intended usage of mergecontentdbs, merging two Content Databases. If we use the second operation STSADM will simply move all the Site Collections from the Source database to the Destination database. Let's move all of the sites in WSS_Content2 back into WSS_Content.
I think that picture pretty well sums it all up. Now all the Site Collections in the http://barcelona Web Application are in WSS_Content, right where we want them. I think Microsoft did a pretty good job with this addition to STSADM. Enjoy it.
I'd like to give a special shout out to Joel Oleson for telling me to look for this little gem.
tk | | Todd O. Klindt | 11/12/2007 9:07 AM | Sharepoint | 3 | | I'm in Barcelona this week for TechEd EMEA IT Pro. It's a beautiful city. I'm presenting three sessions while I'm here. On Wednesday SharePoint Consultant Extraordinare Shane Young and I are presenting "OFF304 - Become a SharePoint Guru: Best Practices for SharePoint Administrators." We're picking this up for our friend Stephen CUmmins who had to drop out at the last minute. We'll be covering some standard and some not-so-standard admin approaches to WSS v3 and MOSS. It should be fun.
On Thursday I'm presenting "OFF301 - Administering Microsoft SharePoint Products and Technologies 2007 Using STSADM.EXE " This session is 75 minutes of discussing a single command line EXE, your friend and mine, STSADM. Despite the seeming dryness of the content, it was very well received at TechEd in Orlando this summer.
Finally, on Friday I'm presening "OFF310 - Understanding SQL Server Database Options for Microsoft Office SharePoint Server 2007." I wanted to call this one "SharePoint Admins, the reluctant DBAs." This session is for all the SharePoint admins out there that have to deal with SQL and don't know anything about it. This session will give them some understanding about how SQL makes all that magic happen.
I'll also be spending a lot of time at the SharePoint "Ask The Experts" booth. If you're in Barcelona swing by and say hi. We have some great SharePoint swag to hand out.
I will also be posting my session notes and notes I make from other sessions here.
tk | | Todd O. Klindt | 8/20/2007 3:17 PM | Sharepoint | 28 | |
Here's another question I see a lot, "Is there a way to have one document in multiple libraries, but have there be a master?" The answer is "sort of." In SharePoint 2007 there is a new concept of "Content types." A content type is kind of like a template for document types you store in libraries. In this case we're going to leverage the "Document Link" content type. You can use it to create a link to a master document in another library or to any URL in general. In this post I'll walk you through how to do it. First, notice your options when creating a new document in a standard Team site Document Library.

We're going to add another option there for your link. Click Settings and then Document Library Settings. You need to access the Advanced Settings for the library, so click that.

Since we need to add a content type, click Yes next to Allow management of content types. Then hit Ok.

Now when you go back to the Document Library settings you'll see a new section, Content Types. Click "Add from existing site content types."

The content type we want to add is "Link to a Document." Click it on the left and click Add to add it. Click Ok.

Now you should see your new content type in the Document Library settings.

Make sure it will be Visible on the New Button
Now when you create a new document in that library you'll have another option under new. Let's check it out.

Go ahead and click it and let's create one. It's just like filling out a favorite in your web browser. Give it a name and a link. In this example I'm linking it to a Word document in another library, but you can put any URL in there, SharePoint doesn't verify it's pointing to another SharePoint location.

Here's what it looks like when you're finished:

Whenever you want you can change the document that the link references without worrying about the links pointing to it. This basically replaces the old "Links Library" in SharePoint 2003.
Enjoy!
tk | | Todd O. Klindt | 8/19/2007 6:05 PM | Sharepoint | 38 | |
I see questions about redirecting users in SharePoint all the time. Usually they're in the context of "I want to redirect users, can I do this with an Alternate Access Mapping?" SharePoint admins know that if they don't set their AAMs up correctly that SharePoint will bounce their users around like a SuperBall, so they hope they can harness that power for good, instead of evil. While you can in certain circumstances most likely you will want to use a different approach. In this blog post I will show you several different to redirect users in SharePoint. Then when you find yourself needing to, you can use the method best suited for your situation.
When deciding which redirection method to employ, you need to determine what you're redirecting from and what you're redirecting to. That will determine which method to use. For each of the methods I discuss below I will provide examples of the situation you would use it in. Enough with the introduction, let's get down to it.
Vanity URLs
One of the most common requests I see is for vanity URLs. SharePoint URLs can get long and unmanageable and admins want URLs that their users can remember. They want to use something like http://software and have it forwarded to http://team/sites/software/development. To set expectations correctly, you should just come to terms with the fact that you aren't going to write SharePoint URLs down, you'll pass them along via or IM. If you do want short URLs you can have them forward to deep SharePoint sites. Of course the URL your users will eventually get to will be the long URL, but the jumping off point will be easy to remember. To do this kind of redirection I use IIS directly, I don't get SharePoint involved at all. Create a new virtual server in IIS Manager and give it a descriptive name like "Software Redirect." When you're walking through the wizard you'll take the defaults. You'll have to point it to a local directory. This is only temporary, so you can point it anywhere. After the virtual server is created, edit the properties. Open the "Home Directory" tab and click "A redirection to a URL" then type your SharePoint URL in the "Redirect to:" box. It should look like this:

Figure 1 – Redirection settings
This method works pretty well and is easy for users. It does have a couple of drawbacks you should know about. Each virtual server running takes up RAM on your IIS server. You can take steps to mitigate this. I create a new App Pool and use it strictly for the redirect virtual servers. Then I set that App Pool to timeout if idle for 1 minute. Since this App Pool does not really do much, it does not use much RAM, but this reduces that memory footprint liability to only a minute or two on your web server each time someone uses the redirect. In my experience the App Pool only used 5 or 10 MB of RAM each time someone hit it. With today's machines that's not much of a hit. Overall I've been very happy with this approach.

Figure 2 - App Pool memory settings
Server URL has changed and users have bookmarks
This can happen from time to time, a server name changes or you move your site from HTTP to HTTPS. If your users have bookmarks to the old URLs this can cause problems. One option is to tell your users they're out of luck, but this is a great opportunity to look like a SharePoint Hero. You may be able to use AAMs to work this type of redirection, but they don't work consistently. For instance, the AAM will redirect a URL without a page, but will not redirect one that does. So http://oldserver would redirect but http://oldserver/default.aspx would not. Because most bookmarks will have the page included we can't rely on this. To handle this I employ a technique similar to how I handle Vanity URLs. First you'll need to make sure your existing SharePoint virtual server no longer responds to the old URL. Normally I just change the port to an used port like 8080, so that it's easy to change back. Next create a new virtual server and make sure it responds to the old URL, so you may need to add a host header or adjust the port. Like above, after you've created the redirect virtual server edit its Home Directory property. Instead of feeding it a static URL we're going to employ some redirect variables. Before I explain them, here's what your redirect URL will look like:

Figure 3 - Redirection variables
Two changes should jump out at you. First, the URL ends in $V$Q. The $V represents the original URL the user is trying to access, but without the protocol, servername or parameters. The $Q represents any parameters the URL included. Here's a crude drawing of how the URL breaks down:

Figure 4 - URL breakdown
Since all we want from the old URL is the path and the parameters, $V$Q works well for us. You can find a list of all the supported redirection parameters here. You'll also want to check the "A permanent redirection for this resource." This gives the client back an http 301 reponse which tells it the redirect is permanent. Some clients can understand this and will fix the Bookmark to the new URL. Other clients can't understand 300 level responses at all and will fail completely regardless. Full documentation on this switch and the rest can be found in the IIS Manager help. Once the screen is up you can hit F1 to open the help. After you have this all configured any requests this virtual server handles will be forwarded with path and parameters to the URL you specified.
Redirect from Deep URL
Sometimes you aren't redirecting an entire URL, or even just the servername. Sometimes you're just moving a web and you want users to be redirected to the new location. Since you don't want to redirect the entire web application you can't use either of the previous techniques. Fortunately there is a way. There is much magic in the Content Editor Web Part (CEWP) and this is another example. You can use a CEWP to insert HTML code to send your users wherever you want them. To utilize it add a CEWP to your web part page, usually the default.aspx at the root of your web. Edit the web part properties. Click Source Editor and add a Meta Refresh tag to send your users to the new site. It will look like this:

Figure 5 - CEWP Properties
The "10" in the content tag means the page wait 10 seconds before it refreshes. A longer time is handy if you want to put a message alerting your users to the new location before you forward them. The URL is the URL your users will be sent to. Of course this will only work on the page you put it on, so you may need place it on multiple pages in your web, like your Shared Document library pages. Fortunately since it is just a web part you can export it and import on additional pages, you don't need to recreate it each time.
There are some drawbacks to this approach, and it's generally considered bad form to use a refresh tag to forward users. For one it breaks your users' Back button in their browsers. It can also confuse your users, especially if the redirect is fast and there isn't a note on the page explaining that the site has moved. Finally, make very sure the URL you're redirecting them to is valid. If not they get stuck on a dead page and no way to use Back to get out. Sometimes it is your only option though.
This blog post wouldn't be complete without a mention of MOSS' Redirect Page content type. If you're using MOSS and you're on a Publishing Site you can access to it. Go to your Pages document library and Click new. It will be in your list.

Figure 6 - Redirect Page content type
Once the Redirect Page is created you'll need to Edit its Properties and enter the URL you want it to redirect to. You'll also need to preview the page and check it in before it will work. Unfortunately this solution only works on Publishing sites.
As you can see, SharePoint and IIS provide many ways to redirect users. Each method has its benefits and drawbacks. Hopefully this blog post will provide you with one method that will work for your situation.
tk
| | Todd O. Klindt | 8/6/2007 12:52 AM | Sharepoint | 3 | |
Ever wonder what a SharePoint smarty does in his free time? We write blog entries and books. In a couple of weeks one of the books I was fortunate enough to work will hit the shelves. You should be able to pick up Real World SharePoint 2007: Indispensable Experiences From 16 MOSS and WSS MVPs in a week or two on Amazon.com. The book is filled with all kinds of great information on a wide variety of SharePoint aspects. There's something in there for admins, developers and even end users. As is in the Wrox tradition, all of our pictures appear on the cover. Here's what to look for:

Click for a full size picture
If you buy books at brick and mortar stores, please ask them to carry it. My baby's gotta eat!
After you grab the book head over to the Wrox forums or post here and let me know what you think.
tk | | Todd O. Klindt | 7/9/2007 12:21 AM | Sharepoint | 28 | | In the newsgroups I see a lot of questions about how to back up and recover SharePoint. I decided it was time to put some of my ideas out here. This blog entry will cover options that come out of the box with SharePoint, with the exception of SharePoint Designer. It will talk about the different needs that DR addresses and it will show you how to use different features to meet those needs. For the most part these features work best with small to medium sized environments, but the information will be good for enterprise admins as well.
When we start talking about disaster recovery we need to decide on just what kind of disaster we are talking about. In this paper we will cover two types of disasters; content deletion and catastrophic failure. You will want to take different measures depending on the type of recovery you want to protect your environment from. In this blog we will address catastrophic failure first, then content recovery.
If you want to protect your SharePoint farm against catastrophic disaster you have two aspects of SharePoint to keep in mind; configuration and content. In the 2007 versions of SharePoint Microsoft has added a facility for making backups with the intent of recovering from catastrophic failures. This can be found in the Central Administration web site on the Operations page under the "Backup and Restore" heading. If you click "Perform a Backup" you can see that quite a bit is covered. Since this is at the Farm level it includes any web applications you have as well as your Config and Search databases. Any of your SharePoint environment that exists in SQL is covered here, as well as some information from your WFEs. When you choose to do a backup here you are asked where you would like the backup to be saved. It is important to know that this backup process runs in two distinct steps. The first runs on the WFE that Central Admin is running on and the second runs on the SQL server. For your backup to be successful both processes, and the users they are running as must have access to the directory where you point Central Admin. That is why the example is a UNC path instead of a local path. The WFE portion of the backup process runs as the Central Admin app pool id. The SQL portion runs under the context of the account that the SQL services are running as. Both accounts must have write access to the directory for your backups to be successful.
After you have created a successful backup you can walk through the restore process. While I encourage you to practice any recovery processes you have in place be careful when walking through this, you will overwrite any content that is in place. It is a good idea to go through the restore process at least once to get familiar with it and then periodically to make sure your backups are working correctly.
If you're like me you're curious about how things work. After I ran my first backup I immediately jumped into the directory to see what was there. I found that each backup run is put into its own directory. Each of those directories has a SPBACKUP.XML file that is the table of contents for the backup. You can look through there and see which elements are being backup up. Most interesting are the entries for the objects in the "Microsoft.SharePoint.Administration.SPContentDatabase" class. These represent your Content Databases, as you may have guessed. If you continue looking at the properties for the object you will come across one that is the database's name and SQL instance. The value for that parameter is the name of the file in the backup set. Since this part of the backup is essentially just an SQL dump, you can take this file and restore it into SQL with SQL Management Studio if you would like. This makes it easy for you to restore the databases to different environments, or as difference names.
The built in backup procedure has two big shortcomings, as I see it. First, it does not get everything you probably want if you need to rebuild your environment, namely all your Configuration information. The Content is covered when your content databases are backed up. Configuration covers a wide variety of information and it is spread out so it is easy to lose track of bits of it. For instance if you have added an icon for PDF files this is part of your configuration. When you do this you copy a GIF file to the Templates\Images directory of the 12 Hive and add an entry for that image in your DOCICON.XML file. A Central Admin backup will not get this change. For this reason I recommend a few supplemental processes to round out your backup. First, use IISBACK.VBS to make a backup of your IIS settings which are stored in two files; Metabase.xml and MBSchema.xml. Use a command similar to this:
iisback.vbs /backup /b SharePointBackup
This creates a backup of your Metabase and MBSchema files and saves them in %systemroot%\system32\inetsrv\MetaBack. You will also want to backup the contents of this directory as well as a couple more. The directory C:\Program Files\Common Files\Microsoft Shared\web server extensions\12 is known as the '12 Hive'. It is the directory that SharePoint is installed in and where most of your SharePoint specific changes live. You will also want to add the Inetpub directory, normally at C:\InetPub. To package them all neatly I use a command line compression tool like 7-Zip to zip them all up nicely.
I mentioned the included backup had two shortcomings. The second is that since it is web based, it cannot be scripted to run regularly. Fortunately this is easily remedied with STSADM. STSADM can create backups that are compatible with Central Admin backups. Use backup operation but instead of giving it a URL and filename, give it your backup directory name and whether you want a full or differential backup. The command would look like this:
stsadm –o backup –directory \\server\SPBackups -backupmethod full
If you point STSADM at the same directory you point Central Admin at the backups will seamlessly be integrated. One can restore what the other backs up. Since STSADM is a command line utility it is a perfect candidate for automation. You can create a simple script file to run your farm level backups and schedule it to run every night or however often you want.
These methods work well for restoring from catastrophes and they also work well for moving content or settings between test environments and production environments, or vice versa.
The previous methods work great if you want protection against a hardware failure. What if you just want to have some protection against your users (or your admins!) deleting content? The methods we discussed above would work, but they might be more than you need. In this section I will cover some ways to recover content.
Your first weapon against content deletion is the Recycle Bin. New in SharePoint 2007 this gives you two layers of protection as it is two stage. The Recycle Bin is on by default and is configurable in Central Admin. Recovering items from the first stage can be done by regular site members. After they expire from there they can be recovered from the second stage by a Site Collection Administrator.
Not everything is captured by the Recycle Bin, unfortunately. When folders are deleted they do not pass 'Go', they immediately just go away. Webs and Sites are the same way. You need some way to protect against that, or you may have chosen not to enable the Recycle Bin.
SharePoint Designer (SPD) is the next version of FrontPage, and as the name suggests it is very SharePoint friendly. It have a lot of great SharePoint functionality, but this article will only its ability to backup and restore content. The beauty of this approach is that end users can take advantage of it, as a site can be backed up by farm admins as well as site members. This is a great option if you have adventurous users that like to push SharPoint to its limits. They can make a backup of their site before they make their changes. Open the site or web in SPD then go to Site in the Menu Bar. Choose Administration and finally "Backup Web Site." This will create a single CMP file backup of your site. This file can be restored back to its original location, a different location in the same site, or a different farm entirely.
Like the Central Admin backups, if you're curious you can break these backups into their elemental parts. The CMP file is just a CAB file. If you rename it as .CAB you can open it up and see inside. The MANIFEST.XML file is your roadmap to the contents. The object type "SPFile" is where you will find individual files. With this knowledge you can pull files out of your backup without having to restore it back to SharePoint, if you do not want to. Just find the file in the Manifest.XML file and copy out the file from the archive in the FileValue attribute. Rename to your original document and you have your file back.
If the Recycle Bin is not what you are looking for, and SPD does not get you where you want to go, then STSADM comes to your rescue. STSADM is a SharePoint admin's best friend. While STSADM has over 180 operations I will only cover four in this article; backup, restore, export and import. Import and Export replace the functionality that SMIGRATE had in the 2003 versions of SharePoint. Import and Export deal with subwebs. You can use them much like SPD to take snapshots of webs and restore them later if you want to. If you want to protect against accidental Site Collection deletion, use the 'backup' and 'restore' operations of STSADM. These work at the Site Collection level and will create a single file, full fidelity backup. As with any STSADM operation, if you have questions on usage, type 'stsadm –help' followed by the operation name. STSADM will give you usage for the command and maybe an example or two.
If you need to restore a single document or folder you can restore the STSADM backup of the site collection to a different URL or a different farm and retrieve the document that way. If you do restore a second instance of a site collection it cannot be in the same Content Database as the original. STSADM preserves many list GUIDs and they cannot exist more than once in a Content DB. If you try to do this, STSADM will report back that there are no databases available. If you have a recovery or test environment, you can restore your backup there as well. Just make sure both farms are running the exact same version of SharePoint, right down to the patches. You will also need to have all the same software and web parts installed.
For small to medium sized environments, it is tough to beat STSADM site collection backups. You still need to schedule the task, and you need to keep a running list of the Site Collections you need to back up. The second part is easy to address. In his book SharePoint 2007 Unleashed Michael Noel has a chapter on Disaster Recovery. In that chapter he has a script that can be scheduled to run that takes the output of "stsadm –o enumsites" and creates a backup for each site collection listed. If that were not enough, the script will email you when it is finished. He was gracious enough to let me share that script with you all here. Go ahead and download it and take it for a spin. You will need to remove the TXT extension to get CSCRIPT to execute it properly. I think you will really like it. If you do, I encourage you to consider picking up his book. That script is just one example of the vast amount of SharePoint information that is in there.
There are many disasters that can befall a SharePoint environment. Servers can burst into flames, or the CEO's administrative assistant can delete a folder full of important documents. Regardless of how you define disaster there are ways to protect yourself built in to SharePoint. I hope this blog entry has given you some ideas on how to protect your environment.
Let me know what you think. Leave me a comment below.
tk | | Todd O. Klindt | 6/28/2007 10:25 PM | Sharepoint; Tech Stuff | 0 | | |
|
| | | |