Skip to main content

Posts

Showing posts from August, 2013

SharePoint 2010 Install Step by step

SharePoint 2010_Step by Step Install NOTE : This is an older version of the install. If you want RTM steps, go here From fresh hardware to full SharePoint 2010 dev install, everything you need is right here! No Login required like some other sites! Keep in mind these steps are NOT for production (you wouldn't run your site on beta software would you, even if you did, I hope you paid for it). These steps will change at RTM. Some things to note: 1) Install is using admin account (several of us just couldn't get ALL the features to work with separate service account in Beta) 2) we don't need loopback fix as all the sites are using specific ports instead of host headers. Also, if you don't want to do a domain controller install, you could consider this route (http://bit.ly/ 4oAhpm), but steps here may not work if you do. 1. Start Hyper-V Manager on a 64bit server 2. Click “ Action->New->Virtual Machine ” 3. For Name, type “ sharepoint2010 ” ...

How to determine SharePoint database size? using Powershell

Using PowerShell to determine SharePoint database size? Get-SPDatabase | Sort-Object disksizerequired -desc | Format-Table Name, @{Label ="Size in MB"; Expression = {$_.disksizerequired/1024/1024}} Or Get-SPDatabase | ForEach-Object {$db=0} {$db +=$_.disksizerequired; $_.name + " - " + $_.disksizerequired/1024/1024} {Write-Host "`nTotal Storage (in MB) =" ("{0:n0}" -f ($db/1024/1024))}

How to change the master page of a SharePoint 2010 team site?

A specific site - $web = Get-SPWeb http://hostname/sites/test $web.MasterUrl = "/sites/collaboration/_catalogs/masterpage/v4_custom.master $web.Update() $web.Dispose() An entire site collection - $site = Get-SPSite http://hostname/sites/test $site | Get-SPWeb -limit all | ForEach-Object { $_.MasterUrl = "/sites/collaboration/_catalogs/masterpage/v4_custom.master";$_.Update() } $site.Dispose() Things to remember: In the above examples, v4_master represents your custom master page, change accordingly. In the above examples, http://hostname/sites/test represents your site's URL, change accordingly. These commands will need to be run each time a new site is created.

How to apply new master page for existing SharePoint sites using Powershell

To apply new masterpage to existing sites, then you can use PowerShell. Open SharePoint Powershell management console and run the script.? $site = Get-SPSite http://sharepoint $site | Get-SPWeb -limit all | % { $_.CustomMasterUrl = "/_catalogs/masterpage/CUSTOM.master" $_.MasterUrl = "/_catalogs/masterpage/CUSTOM.master" $_.Update() }

How to set a SharePoint Custom Master Page for all webs in a Site Collection using Powershell

How to set all webs (sub sites as some call them) in a site collection, to use a common master page? $site = Get-SPSite http://portal.somewhere.com/ $sites = @(foreach ($web in $site.AllWebs) { $web | Select-Object -Property Url Write-Debug "Setting master pages in web ($($web.Url))..." $web.MasterUrl = "/_catalogs/masterpage/your_custom_page.master" $web.Update() $web.Dispose() }) | out-File -filepath "c:\masterpagesmodifiedOutput.txt" $site.Dispose() To Run It Save the above after you have customized it as pushmasterpages.ps1 (using notepad, or whatever…) Open SharePoint 2010 Management Shell (Powershell) Launch Powershell against that file (assuming it is in the root of C:), that would be: .\pushmasterpages.ps1

To Roll out the Custom SharePoint Master Page to all existing sites using Powershell

To Roll out the Custom SharePoint Master Page: $site = Get-SPSite http://intranet foreach ($web in $site.AllWebs) { $web; $web.CustomMasterUrl = "/_catalogs/masterpage/MyCustom.master"; $web.Update(); $web.CustomMasterUrl; $web.Dispose() } foreach ($web in $site.AllWebs) { $web; $web.MasterUrl = "/_catalogs/masterpage/MyCustom.master"; $web.Update(); $web.MasterUrl; $web.Dispose() } $site.Dispose() / C Quick walkthrough: Create an file with the name ChangeMaster.ps1 with the script in this file. Log in to the SharePoint server and open SharePoint 2010 management shell. Type cd\ and hit enter. Type Get-SPSite http://NameOfYourIntranet | Get-SPWeb and verify that you can run powershell. If everthing went ok, you got an list of the sites in the collection, you can now just drag and drop the file onto the prompt.

Increase the Throttling for SharePoint 2010 List

I've been working on a list with items exceeding the 5000 default list view threshold limit.I know that I can easily go to Central Administration and bump this number up.But my goal was NOT to enable this for the entire Web application. I only wanted to make an exception to this one list. So I started digging into the SPList properties and found a property called "EnableThrottling" . Setting this property to "false", allowed me to bypass the 5000 limit for this one list. I used the following PowerShell commands to achieve this: $WebApplication = Get-SPWeb http://<SiteCollectionName> $List = $WebApplication.Lists["My List"] $List.EnableThrottling = $false $List.Update()

Powershell Script to Check Which SharePoint List has Event Receivers

You are inheriting a SharePoint site.  Are there event receivers on the list?If you have access to PowerShell and the SharePoint servers, then you can run this little PowerShell script to find out. $GC = Start-SPAssignment $Site =  $GC | Get-SPSite http://yourserver/sites/yoursite  $Web = $Site.Rootweb $Web.Lists |    Where {$_.EventReceivers.Count -gt 0} |    Select Title,EventReceivers |    Format-List Stop-SPAssignment $GC For SharePoint 2007 (or 2010) [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") $Site = New-Object Microsoft.SharePoint.SPSite $Web = $Site.Rootweb $Web.Lists |    Where {$_.EventReceivers.Count -gt 0} |    Select Title,EventReceivers |    Format-List $Web.Dispose() $Site.Dispose() You could even start at the farm ( root ) level and drill down to applications, site collections, sites and documents to see each event receivers! Hope this help...

Field names are available in the Active Directory

the list of fields along with theirName,LDAP Provider Property Name,Syntax: Name LDAP Provider Property Name Syntax First Name givenName String Initials initials String Last name sn String Display name displayName String Description description String Office physicalDeliveryOfficeName String Telephone number telephoneNumber String Other Telephone numbers otherTelephone String E-mail mail String Web page wWWHomePage String Other Web pages url String Street streetAddress String P.O. Box postOfficeBox String City l String State/province st String Zip/Postal Code postalCode String Country/region c, co, countryCode String User logon name userPrincipalN...