Tag: SharePoint 2010

Deselect “automatically detect settings” in IE using GPP

Lately I struggled with finding a way to deselect “automatically detect settings” in IE for all users of a customer.


There are no GPO settings for this and the GPP IE settings doesn’t allow to set this for any IE versions before IE10 and the customer needs IE9 for compatibility issues with their SharePoint sites.

After much searching I found a way to set this  using GPP to set a registry setting.

  1. Create a new GPO or edit an existing one
  2. Navigate to User configuration – Preferences – Windows Settings – Registry
  3. Create a new registry item with the following values
    1. Name: DefaultConnectionSettings
    2. Action: Update
    4. Path: Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections
    5. Value Name: DefaultConnectionSettings
    6. Type: REG_BINARY
    7. Data: (make sure you copy the entire line below, it’s several hundred digits)


It should look like this then


This will always clear the “Automatically detect settings” on next logon or gpupdate

Add PDF icon on your SharePoint farm

When a new and fresh SharePoint 2010 farm is installed and you are starting to upload documents, you will find this guide very handy 🙂

  1. Download PDF icons from:
    http://www.adobe.com/misc/linking.html (16×16)
  1. Run “IISreset /stop” on the webserver and application server to shutdown the SharePoint sites.
  2. Copy the icon image into:
    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES
    (Remember to do this on web and application servers)
  1. Edit “docicon.xml” in this catalog:
    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML
    (Remember to do this on web and application servers)
  1. Add this line in the same sections as the other file extensions are: <Mapping Key=”pdf” Value=”pdficon_small.gif” />
  2. Run “IISreset /start” on the webserver and application server to start up the SharePoint sites again.


Folders for SharePoint 2003 and 2007:

SharePoint Portal Server 2003 – Drive:\Program Files\Common Files\Microsoft Shared\Web server extensions\60\Template\Xml
SharePoint Server 2007- Drive :\Program Files\Common Files\Microsoft Shared\Web server extensions\12\Template\Xml

SharePoint 2010 Backup

First off you need to have a service account that is “sysadmin” on the SharePoint databases and is an SharePoint admin service account.
Second,  create two PowerShell script , two batch files and a scheduled task on the SharePoint Application server:

number 1:
Add-PsSnapin Microsoft.SharePoint.Powershell
Backup-SPFarm -Directory \\P1SPAPP01\Backup -BackupMethod full

Save it as backupsharepointfarm.ps1

number 2:
# Location of spbrtoc.xml
$spbrtoc = “D:\Backup\spbrtoc.xml”

# Days of backup that will be remaining after backup cleanup.
$days = 14

# Import the Sharepoint backup report xml file
[xml]$sp = gc $spbrtoc

# Find the old backups in spbrtoc.xml
$old = $sp.SPBackupRestoreHistory.SPHistoryObject |
? { $_.SPStartTime -lt ((get-date).adddays(-$days)) }
if ($old -eq $Null) { write-host “No reports of backups older than $days days found in spbrtoc.xml.`nspbrtoc.xml isn’t changed and no files are removed.`n” ; break}

# Delete the old backups from the Sharepoint backup report xml file
$old | % { $sp.SPBackupRestoreHistory.RemoveChild($_) }

# Delete the physical folders in which the old backups were located
$old | % { Remove-Item $_.SPBackupDirectory -Recurse }

# Save the new Sharepoint backup report xml file
Write-host “Backup(s) entries older than $days days are removed from spbrtoc.xml and harddisc.”

Save it as: “cleanbackups.ps1”

then create two batch files thats executing the Powershell scripts:

number 1:
powershell -command D:\Backup\Script\BackupSharePointFarm.ps1

Save it as “backup.bat”

number 2:
powershell -command D:\Backup\Script\cleanbackups.ps1

Save it as “clean.bat”

Then create a “Sheduled task” on the application server that runs both the batch files and under the user that is your SharePoint service account.

Woila! you now get an backup evry day at 22:00 (10PM) and stores the backup for 14 days.