Author: techrevmarrell

Use PowerShell to create new SharePoint Workflow History List – (Works with Nintex)

I recently had an issue where I’ve needed to create move a large and active workflow to write to a new history list. If the list already exists I can simply point the Workflow to the new list using the GUI. There is an option using the GUI to create a new workflow list, but when it creates the list, it’s based off of the name of the Workflow. So lets say may list hits a million items and I need to create another list. If I use the gui and select create a new workflow list, I’ll get an error that the list name basically already exists. Using SharePoint Designer I could edit my workflow, create a new list, but then I’d need to republish it to the site. So the easiest method in my particular case, is to simply create a new workflow using PowerShell, then associate the workflow to that new list. The PowerShell to generate the new list is Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue $spweb = Get-SPWeb “http://mysitecollection” $SPTemplate = $spweb.ListTemplates[“Workflow History”] $spweb.Lists.Add(“WrkFlowHistoryListName”,”Workflow History List Description”,$SPTemplate)...

Read More

A Better Way to redirect a site collection in SharePoint using IIS URL Rewrite

Have you every written a blog post, and got some helpful comments from folks who have a better way to do something? Well that’s exactly what this is! My last blog post http://www.techrevmarrell.com/create-a-sharepoint-vanity-ish-shortened-url-and-redirect-to-a-site-collection/ Was about a requirement I had to create a shortened URL that they could provide to users and this shortend url would automatically redirect a user to another site collection. Well the method I ended up using was to create an explicit Managed Path to create the shortened url. Some asked why I just didn’t use a DNS entry, and for my particular requirement, it wasn’t available to me, nor was a redirect at the load balancer level. So for the URL shortner explicity Managed Path. Again to see how I did it, you can check out the link above. Now the second thing I did was create a webpart page, and add a JavaScript redirect (really just meta tag redirect) to the homepage of the site collection that I wanted to redirect. I mentioned this wasn’t the cleanest option and I’d already tried to utilize IIS URL Rewrite to solve my issue, and I had, (will come back to this shortly) but when my users did some testing on my solution, everything was great on the Desktop side, but on the mobile device side the solution failed. And this was because I used a web...

Read More

Create a SharePoint Vanity-ish / Shortened URL and redirect to a site collection

Update!!!!! 1/26/2017 I was wrong. I found a much better way to redirect a user to a site collection actually using IIS URL Rewrite. The Managed Path shorten method below is still great, and if you don’t have the ability to use IIS URL Rewrite, then perhaps the script redirect method here will help, but if you have access to IIS URL Rewrite, check out my new post here. http://www.techrevmarrell.com/a-better-way-to-redirect-a-site-collection-in-sharepoint-using-iis-url-rewrite/     I’ve recently ran into a requirement where a user wanted basically a Vanity URL and use it for a SharePoint site. Not for SEO purposes, but because they wanted to make an easier url for users to remember how to get to a common site collection. Most of the time a SharePoint site collection that is not the root site will have a url such as http://Contoso.com/sites/teamA or worse if it’s a subsite, http://Contoso.com/sites/teama/wheredidmysubsitego. When what you may really want is a simple shorten url like http://contoso/HR. My Requirement In my requirement the page’s url was something like http://contoso.com/sites/videos/pages/helpfulvideos.aspx and they really wanted the user to type in something like http://contoso.com/videos, and get redirected to the actual page above. So I needed 2 things. A way to create a “Vanity-ish” URL in SharePoint. I say “Vanity-ish”, because it’s not truly ReWrite that you would use in SEO, where the appliance rewrites the original urls so any pages...

Read More

Twitter Posts