Admin Archive

Renaming your Sharepoint 2010 Web App

Posted May 15, 2012 By Kevin Bennett

As I believe I stated in earlier posts, I am border line OCD. Myself I blame this on the 14 years in the military with all the inspections. So now in my civilian career I am constantly fighting with systems that I inheriting which do not conform to my (not always correct) rank and file structure.

Lately I have spent a lot of time trying to get our SharePoint Environment up to my standard since I have worked off most of the little issues. My most recent endeavor was getting the Web Applications to at least look similar and meaningful. By default SharePoint will name a web application “SharePoint – (Port Number)” and our systems had many of these. And worse it allows the creator to make changes so we had “SP – 80 – internal”, “SharePoint – 565682325”, and even a “Test” which turned out to be our Intranet Web Application.

Disclaimer – Now I take absolutely no credit in the below code but like everything else on this site I wanted to log in down so I don’t have to go somewhere else to find it. If you were the one that originally posted this Thank you thank you thank you thank you .. and my OCD thanks you as well.

Below is the PowerShell code to change the Web Application name

[code]

$a=Get-SPWebApplication | where {$_.Name -match “CurrentName”}

$a.Name

$a.Name=”NewName”

$a.Update()

Get-SPWebApplication | where {$_.Name -match “NewName”}

[/code]

To use:

  1. Simply copy the code
  2. Create a document named RenameApp.ps1
  3. Change theto the CurrentName of the application you want to change (eg “Sharepoint -80”)
  4. Change theto the NewName you want the application to be (eg “Sharepoint – Intranet”)
  5. Run the file from the PowerShell.

Now maybe I can sleep better at night knowing my IIS looks organized!

Be the first to comment

Sharepoint 2010 user AD Permissions not updating

Posted April 23, 2012 By Kevin Bennett

Needed to add a new user “immediately” to have access to a site. No it was needed immediately, but lack of planning on someone’s part made it appear to be immediate. So I added to the AD group and went home.

…. 15 minutes later I get a call that they still can’t access the site, so double checked that I put the user in the correct AD group. Well I did but when I went to permissions for the site and tested the user permission it didn’t show up.

So a quick search revealed that when using Claims based Authentication there is a default property setting called token-timeout and it is set for 1440 minutes (24 hours)

To View and change this do the following:

stsadm -o getproperty -propertyname token-timeout

This will get your default setting

stsadm -o setproperty -propertyname token-timeout -propertyvalue

I ran this on my app server

 

Be the first to comment

XSL Help

Posted April 18, 2012 By Kevin Bennett

Found this the other day when trying to create some XSL Templates. Thought I might need it in the future so I am posting it here.

To see what values are being passed to the Webpart in an XSL template

[code]

<xsl:for-each select=”@*”>
     P:<xsl:value-of select=”name()” />
xsl:for-each>

[/code]

Be the first to comment

Creating Page Layout Preview Images

Posted February 21, 2012 By Kevin Bennett

Images are located in en-us/PreviewImages from the Master Page Library. Edit a current PNG image in the en-us/en-us/Preview Images Directory (I edited BlankWebPartPage to get a starting one). Upload to this directory, check-in and approve

On your parent site go to Site Actions –> Site Settings –> Master Pages and page Layouts under Galleries

You can associate a custom Template with an image by adding the address of the png image to the Preview Image Fields in the Edit Page Properties.
http:///_catalogs/masterpage/en-US/Preview%20Images/.png

/_catalogs/masterpage/en-US/Preview Images/.png

Make sure you change the http to https if you are on a secure site (or you will get the unsecure pop-up which is very annoying)

 

Be the first to comment

New Site

Posted January 13, 2012 By Kevin Bennett

So this is my new blog, I plan on using this to post crap about sharepoint and the headaches (solutions) I find in my daily workings to run, fix, or improve it. I am in no way a Sharepoint Expert, I am just a .33 FTE Admin for a site and company.

I will do my best to be correct and use proper terminology, but feel free to leave CONSTRUCTIVE Criticisim as you see fit.

Mainly I am tired of having to look up fixes or hacks over and over and over again because I don’t log them down in a place I can get to after I leave the job. This does make me better at googling but takes time out of my other .66 FTE time

Be the first to comment
%d bloggers like this: