SharePoint – PreUpgradeCheck for 2010?

what would be similar to the old PreUpgradeCheck? Get-SPContentDatabase | ForEach-Object { Test-SPContentDatabase $_.ID } now what do you do to resolve anything found? some good pointers here:    


SharePoint – import a picture from AD for the user profile

Consider the following scenario.  You have JPG pictures in AD, stored with the users thumbnailPhoto attribute. You try to import pictures for a user profile from the Active Directory thumbnailPhoto attribute,  to store within the Picture attribute in Microsoft SharePoint Server 2010.  You have set up an import Picture URL mapping.  User Profile synch and mysites…


SharePoint – Powershell replacement for the old STSadm RepairContentDatabase

Powershell replacements  are extremely useful. Test-SPContentDatabase gives you much of interest. However the key item you were looking for is the .REPAIR method. Get-SPContentDatabase | ForEach-Object {$_.Repair($true)} or use $false to just report and not repair. This is the same function as the STSADM cmdlet, but better because it pipelines all the ContentDB’s.


SharePoint – Search PerformanceLevel

# you use Central Admin and click. But I was asked ‘how do you do that with PowerShell’? #SP2010Add-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinueGet-SPEnterpriseSearchService | Set-SPEnterpriseSearchService –PerformanceLevel “Maximum” #SP2007[void][System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)$SPfarm = [Microsoft.SharePoint.Administration.SPFarm]::Local$Search = $SPfarm.Services | where  {$_ -is [Microsoft.SharePoint.Search.Administration.SPSearchService]}$Search.PerformanceLevel = [Microsoft.SharePoint.Search.Administration.SearchPerformanceLevel]::Maximum$Search.Update()


SharePoint – adding list items with Powershell

# I was asked the question ‘how can I automatically add items to a List on a # Sharepoint box I cannot access locally? No, not possible to use direct# sharepoint cmdlets and do not know if it is 2007 or 2010.’ $SITE = “MYSERVERNAMEHERE/Lists”$URI = “http://$SITE/_vti_bin/lists.asmx”$listname = “TestMe” $SPService = New-WebServiceProxy -uri $uri -NameSpace SpWs…


SharePoint warmup script

#  trivial sample:#  for every site I can find, try to load  it.#  this reloads caches and loads any DLL’s etc.#  so that everything is ready for the first user#[void][System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”) function warmup-farm { $SPfarm = [Microsoft.SharePoint.Administration.SPFarm]::get_Local() $SPWebServices = new-object Microsoft.Sharepoint.Administration.SPWebServiceCollection($SPFarm) foreach ($SPWebService in $SPWebServices) {   foreach ($SPWebApplication in $SPWebService.WebApplications) {     foreach ($SPSite in $SPWebApplication.Sites) {        foreach ($SPweb…


SharePoint farm config – via powershell

"Can't I just use Powershell to dump this info? – So let's see!"  # run this from a front-end as Farm Administrator # tell powershell to load Sharepoint DLL's[void] [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")[void] [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")[void] [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search")[void] [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Administration.ServerFarm")## find the installed iFilters#function Get-iFilters { Param( [string] $Computer ) $hashtable = @{} $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $Computer) $regKey= $reg.OpenSubKey("SOFTWARE\Classes") if ($regKey.SubKeyCount) {  foreach ($rkey in $regKey.GetSubKeyNames())…