Saturday, September 29, 2012

Move a site to another location

Move a site to another location
stsadm -o renameweb -url http://spfarm/subsite -newname spfarm/othersubsite

SharePoint Content DB privileges

Grant user db_owner privileges on the content database associated with that web application.
This can be done either manually (using the UI) or via PowerShell.

PS> $w = Get-SPWebApplication("webappname")
PS> $w.GrantAccessToProcessIdentity("domain\supsvc")

SharePoint Needs Upgrade???

SharePoint Needs Upgrade???
(get-spserver $env:computername).NeedsUpgrade


Find user Profile Application GUID in Sharepoint

Find user Profile Application GUID in Sharepoint $sts = Get-SPServiceApplication | ?{$_ -match "user"}

PowerShell Editor and Secuity

Change Security Policy to Allow users to create powershells and run them
Set-ExecutionPolicy Unrestricted

To get the Powershell Editor on Win2008 R2 server…
Import-Module ServerManager
Add-Windowsfeature PowerShell-ISE

Pasted from <http://www.jonathanmedd.net/2011/02/powershell-ise-not-installed-by-default-in-windows-server-2008-r2.html>

Anonymous Site Access and Site Lockdown

If you need to lock down a SharePoint site collection for additions, but still allow updates and deletions, what do you do?


Use the following cmdlet in PowerShell:
Set-SPSite –Identity <SiteCollection> -LockState NoAdditions


If you setup anonymous access for a web app to the internet there is a way to lock down anon users from seeing allitems and editform pages while still letting them gain access to other areas.  What is this?

You must activate the ViewFormPagesLockDown feature:

To disable, run this Shell command:
$lockdown = get-spfeature viewformpageslockdown

disable-spfeature $lockdown -url http://sitecollectionURL

Tuesday, September 11, 2012

Does Taking a live VM Snapshot effect SharePoint availability or performance?

I was asked this question by a client recently...

Do you know if taking a server snapshot from a Vm will disrupt anything in production like a SharePoint Server user access?

The answer is the consulting 'drinking game' answer...It depends.
For one, if the server is being acquiesced when the snap shot is being taken. A standalone VMware snapshot won’t acquiesce, but if a snapshot is being taken as part of a backup program then all the database services on the server will be paused and the DBs on that server will be inaccessible until all pending transactions have been written and the snapshot has been committed; at [company name]I have one server where this takes almost 15 minutes.


Otherwise, no... a snapshot will not impact SQL function unless the disk with the virtual server is severely overtaxed – to that point where the guest VM is probably unusable anyway.