Saturday, 23 March 2013

Batch file: STSADM backup for MOSS


@SET stsadm="c:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm.exe"
@SET DIR=D:\Backups\
@SET Log=D:\Backups\Backup_VSSR.txt

Echo Backing up- VSSR>>%LOG%
%stsadm% -o backup -url "http://servername/" -filename "%DIR%VSSR.bak" -backupthreads 5 >>%LOG%
time /t >>%LOG%

Pause

è Save as .bat

UNC path


A UNC path describes the location of a volume, directory, or file.

The format for a UNC path is \\server\volume\directory\file and is not case-sensitive. For example:
\\Shared1_svr\Shared1\WGroups\Network\Orders.xls

PowerShell - AD for SP2010

Can't remember where I got this from but it's useful:

When creating SharePoint test environments, one of the prerequisites is to have the necessary SharePoint service accounts. The powershell script below will enable you to create the AD accounts and ready for use when configuring the SharePoint farm. These accounts relate to SharePoint farm configuration, web application pool accounts, service application accounts, search service and content access accounts, user profile synchronisation accounts and object cache accounts. By all means you can modify the values to suit your requirements.
# Get the logged-on user's domain in DN form
$mydom = (get-addomain).distinguishedname
# Specify the OU we want to create the users in
$ouName = "SP Service Accounts"
# Build the full DN of the target OU
$oudn = "OU=$ouname,$mydom"
# Check if the target OU exists. If not, create it.
$OU = get-adorganizationalunit -Filter { name -eq $ouname }
if($OU -eq $null)
{New-ADOrganizationalUnit -Name $OUName -Path $mydom}
else
{write-host "The OU" $ou "already exists."}
# Create users
New-ADUser –Name "SP_Farm" –SamAccountName "SP_Farm" –DisplayName "SP_Farm" `
-Path $oudn –Enabled $true –ChangePasswordAtLogon $false `
-AccountPassword (ConvertTo-SecureString "pass@w0rd" -AsPlainText -force) -PassThru
New-ADUser –Name "SP_ServiceApp" –SamAccountName "SP_ServiceApp" –DisplayName "SP_ServiceApp" `
-Path $oudn –Enabled $true –ChangePasswordAtLogon $false `
-AccountPassword (ConvertTo-SecureString "pass@w0rd" -AsPlainText -force) -PassThru
New-ADUser –Name "SP_Portal" –SamAccountName "SP_Portal" –DisplayName "SP_Portal" `
-Path $oudn –Enabled $true –ChangePasswordAtLogon $false `
-AccountPassword (ConvertTo-SecureString "pass@w0rd" -AsPlainText -force) -PassThru
New-ADUser –Name "SP_MySites" –SamAccountName "SP_MySites" –DisplayName "SP_MySites" `
-Path $oudn –Enabled $true –ChangePasswordAtLogon $false `
-AccountPassword (ConvertTo-SecureString "pass@w0rd" -AsPlainText -force) -PassThru
New-ADUser –Name "SP_Search" –SamAccountName "SP_Search" –DisplayName "SP_Search" `
-Path $oudn –Enabled $true –ChangePasswordAtLogon $false `
-AccountPassword (ConvertTo-SecureString "pass@w0rd" -AsPlainText -force) -PassThru
New-ADUser –Name "SP_SearchAccess" –SamAccountName "SP_SearchAccess" –DisplayName "SP_SearchAccess" `
-Path $oudn –Enabled $true –ChangePasswordAtLogon $false `
-AccountPassword (ConvertTo-SecureString "pass@w0rd" -AsPlainText -force) -PassThru
New-ADUser –Name "SP_UPSync" –SamAccountName "SP_UPSync" –DisplayName "SP_UPSync" `
-Path $oudn –Enabled $true –ChangePasswordAtLogon $false `
-AccountPassword (ConvertTo-SecureString "pass@w0rd" -AsPlainText -force) -PassThru
New-ADUser –Name "SP_SuperUser" –SamAccountName "SP_SuperUser" –DisplayName "SP_SuperUser" `
-Path $oudn –Enabled $true –ChangePasswordAtLogon $false `
-AccountPassword (ConvertTo-SecureString "pass@w0rd" -AsPlainText -force) -PassThru
New-ADUser –Name "SP_SuperReader" –SamAccountName "SP_SuperReader" –DisplayName "SP_SuperReader" `
-Path $oudn –Enabled $true –ChangePasswordAtLogon $false `
-AccountPassword (ConvertTo-SecureString "pass@w0rd" -AsPlainText -force) -PassThru
#End

Optimize SQL FOR SP2010


MOSS upgrade issue - SPAdmin service cannot start


Cannot start service SPAdmin on Computer

Cannot start service "SPAdmin" on computer after running SharePoint Product and Technologies Wizard

Step 1
On the machine where psconfig failed to start the SPAdmin service run:
%commonprogramfiles%\Microsoft Shared\Web Server Extensions\12\BIN\psconfig -cmd upgrade -inplace b2b -wait -force
Step 2
Modify the service timeout values in the Registry:
HKLM\SYSTEM\CurrentControlSet\Control add/modify DWORD value ServicesPipeTimeout to 60000 (60 seconds)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control add/modify STRING value WaitToKillServiceTimeout to 120000 (120 seconds)

http://blogs.technet.com/b/wbaer/archive/2007/10/15/kb934525-troubleshooting.aspx

sample SharePoint site quotas

Level 0 = 500MB (Warning 450MB)
Level 1 = 1GB (Warning 900MB)
Level 2 = 2.5GB (Warning 2.4Gb)
Level 3 = 5GB (Warning 4.9Gb)
Level 4 = 7.5 GB (Warning 7.4Gb)
Level 5 = 10GB (Warning 9.75Gb)

How to customize the new,edit and display list forms with InfoPath



·         Open list in SPD
·         List settings à Design forms in IP
·         Design the form and Quick Publish
·         Newifs.aspx, editifs.aspx and displayifs.aspx are created
·         Set defaults

Advantages of doing creating list forms with IP:
·         Add validation
·         Add conditional formatting
·         Can surface IP forms on any SP page using IP web part

SharePoint Information Architecture Diagram

Here is the template I use for Information Architecture designs. It's built using Mindjet and I flesh the nodes out with the low level d...