Tuesday, April 19, 2011

get last app pool recycle timings

c:\Windows\System32\inetsrv\appcmd list wp  gives you all the process IDs

and on powershell  go for :

(Get-Process -Id [processID]).StartTime

You may also like:

Analyse event logs for Service Control Manager activities from windows

Sunday, April 17, 2011

Search History in SharePoint 2010

Did anyone got a chance to work on Search History?

 

We are able to get top Search Queries  , but we need to maintain log of all search keywords entered by all the users.  Is there something out of box for this?

 

Reply 1

here are some default Search Reports, but i do not recall it does keep track ALL the search keywords entered by user, the closest

You may refer http://blogs.msdn.com/b/ecm/archive/2010/05/03/web-analytics-in-sharepoint-2010-insights-into-reports-and-metrics.aspx for more information about the default search report.

 

Reply 1,1 we have tried it dear but we need to track all.Please help.Track all search keywords entered to be very specific .

Reply 1.1.1 You can create a hidden web part, place the hidden web part in the Search Result page, and the web part will retrieve the HTTP GET parameter, q=keyword, store it to a search keyword table, and make a report out of that table.




Kiat Hau, Goh http://kiatsplayground.blogspot.com/

Reply 1.1.1.1 If there is nothing out of box in SharePoint 2010 for this  , we will go for omniture - its just similar to google analytic .

 

Friday, April 15, 2011

SharePoint 2010 with IE 9

Hi

 

In IE 8 we used to have a  load bar in the browser . But in IE 9 when the page is loading a circle keeps on moving in the address bar-tab area.

 

I have a question now for my SharePoint site.

 

 

after the circle in the address  bar – tab  has stopped rotating  and when the page actually comes to the screen , there is a difference of 7 seconds!!!!!

 

 

If you have concrete explanation for this  or something like a wild guess please reply down.

 

P.S. 1 The issue is with latest version of IE 9 also downloaded today

P.S.2 One of the comment I got offline:

http://support.microsoft.com/kb/2398082

This issue can also occur if Internet Explorer 9 is running in Software Rendering mode.

By default, Internet Explorer 9 uses GPU Rendering mode. However, some outdated video cards and video drivers do not support GPU hardware acceleration. If Internet Explorer 9 determines that your current video card or video driver does not support GPU hardware acceleration, Internet Explorer 9 uses Software Rendering mode.

To determine whether Internet Explorer 9 is using Software Rendering mode, follow these steps:

Start Internet Explorer 9.

Click Internet Options on the Tools menu.

On the Advanced tab, locate the Accelerated graphics section.

Verify that the Use software rendering instead of GPU rendering check box is selected.

If this option is selected, Internet Explorer 9 is running in Software Rendering mode. If the option is greyed out, your current video card or video driver does not support GPU hardware acceleration.

Reply 1 http://social.technet.microsoft.com/profile/smidha/?ws=usercard-mini

I've experienced the same in Mozilla as well.

For IE9, also checked IE Options-> advanced -> Accelerated graphics section -> Use software rendering instead of GPU rendering check box is selected.

But no luck. A quick solution will be helpful.

Tuesday, February 22, 2011

User's Role Specific Theme - SharePoint 2010

e are digging out the possibility to give user's role specific themes in SharePoint 2010.

We are OK with going for custom coding for this.

Do you have any clues how to achieve this?

so based on:

 

http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/bc5c26e8-4a84-4120-9f44-ffb83db73836

http://efreedom.com/Question/1-2640711/Dynamically-Adding-CSS-File-ASPNET-Server-Control

 

http://stackoverflow.com/questions/2153310/user-specific-theme-in-sharepoint

http://efreedom.com/Question/1-2640711/Dynamically-Adding-CSS-File-ASPNET-Server-Control

 

we are going to override css in our custom control referred in the master page

 

Reply 1 http://social.technet.microsoft.com/profile/ishaan%20puniani/?ws=usercard-mini

take a look at :

 

http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/bc5c26e8-4a84-4120-9f44-ffb83db73836

to make it light weight you can write only those classes that modifies the Look nd feel of the site in the CSS .

Thursday, February 17, 2011

List Level backups for multiple sub sites -Poweshell

In SharePoint projects, there are scenarios, where a number of sub sites are created using a same template (now WSP).

We come across requirements where these templates require updation in due course of time.   And hence the sub sites already created may require an update. But it is not feasible to go to each and every sub site created and make the changes.

So best way could be take backup of variable components (   Lists) and then recreate all the sub sites and then restore back the lists to the newly   created sub sites.

The below mentioned   PowerShell script can be used to take backup export the content  from a specific named list in a shared folder structure, where each sub site will have a specific folder for backup in format cmp :

 

$mainBackuppath="\\abc2010\exportimport"

$File="export.txt"

Get-SPSite -Identity $spsite | Get-SPWeb -limit all| ForEach-Object {

 

 

 

if(($_.URL -eq $spsite+"/xyz") -or ($_.URL -eq $spsite+"") -or ($_.URL -eq $spsite+"/lmn") )

{

write-host -f Green  "Skipping " $_.URL

"Skipping " + $_.URL | Out-File $File -append

 

}

else

{

 

write-host -f Green "processing for "  $_.URL

"processing for " + $_.URL | Out-File $File -append

$currentSubSiteTitlewithoutspace= ""

$currentSubSiteTitlewithoutspace=$_.Title.Replace(" ","")

write-host -f Blue "Creating Directory: "$mainBackuppath"\"$currentSubSiteTitlewithoutspace

"Creating Directory: "+$mainBackuppath+"\"+$currentSubSiteTitlewithoutspace | Out-File $File -append

$error.clear()

 

[IO.Directory]::CreateDirectory($mainBackuppath+"\"+$currentSubSiteTitlewithoutspace)

if($error.count -gt 0){$error | out-file $File -append}

 

 

 

$filesystemPath=""

$filesystemPath = $mainBackuppath+"\"+$currentSubSiteTitlewithoutspace

 

if(Test-Path $filesystemPath)

{

$filesystemPath =$mainBackuppath+"\"+$currentSubSiteTitlewithoutspace+"\"+$currentSubSiteTitlewithoutspace+".cmp"

$DocLibPath=""

$DocLibPath= "/"+$_.Title+"/Shared Documents"

write-host  -f Yellow "Taking Backup for "$DocLibPath " at location " $filesystemPath "...."

"Taking Backup for "+$DocLibPath +" at location "+ $filesystemPath +"...."| Out-File $File -append

 

$error.clear()

export-spweb -identity $_.URL   -path  $filesystemPath   -ItemUrl $DocLibPath -Force -IncludeUserSecurity -IncludeVersions All | Out-File $File -append

if($error.count -gt 0){$error | out-file $File -append}

 

write-host  -f Yellow "Backup for "$DocLibPath " at location " $filesystemPath "Completed."

"Backup for "+$DocLibPath +" at location "+ $filesystemPath +"Completed."| Out-File $File -append

 

}

 

else

{

write-host  -f Red $filesystemPath  " does not exist."

$filesystemPath  +" does not exist." | Out-File $File -append

}

 

write-host -f Green "End of "  $_.URL"`n`n`n`n"

"End of "+  $_.URL+"`n`n`n`n"| Out-File $File -append

 

 

}

 

}

 

 

The below mentioned   PowerShell script can be used to restore backup /exported content  shared folder structure, where each sub site will have a specific folder for backup in format cmp, to the subsites created using new template :

 

 

$spsite= "http://abc:1104"

$mainBackuppath="\\abc2010\exportimport"

$File="export.txt"

Get-SPSite -Identity $spsite | Get-SPWeb -limit all| ForEach-Object {

 

 

 

if(($_.URL -eq $spsite+"/xyz") -or ($_.URL -eq $spsite+"") -or ($_.URL -eq $spsite+"/lmn") )

{

write-host -f Green  "Skipping " $_.URL

"Skipping " + $_.URL | Out-File $File -append

 

}

else

{

 

write-host -f Green "processing for "  $_.URL

"processing for " + $_.URL | Out-File $File -append

 

$currentSubSiteTitlewithoutspace= ""

$currentSubSiteTitlewithoutspace=$_.Title.Replace(" ","")

write-host -f Blue "Checking if directory exist for current web"

"Checking if directory exist for current web" | Out-File $File -append

$filesystemPath=""

$filesystemPath =$mainBackuppath+"\"+$currentSubSiteTitlewithoutspace+"\"+$currentSubSiteTitlewithoutspace+".cmp"

 

if(Test-Path $filesystemPath)

{

 

$DocLibPath=""

$DocLibPath= "/"+$_.Title+"/Shared Documents"

write-host  -f Yellow "Restoring  Backup at  "$DocLibPath " from  " $filesystemPath "...."

"Restoring  Backup at  "+$DocLibPath +" from  " +$filesystemPath +"...." | Out-File $File -append

 

$error.clear()

Import-SPWeb -Identity $_.URL -Path $filesystemPath  -IncludeUserSecurity  -Force -UpdateVersions Overwrite | Out-File $File -append

if($error.count -gt 0){$error | out-file $File -append}

 

write-host  -f Yellow "Backup for "$DocLibPath " at location " $filesystemPath "Completed."

"Backup for "+$DocLibPath +" at location " +$filesystemPath +"Completed." | Out-File $File -append

 

}

else

 

{

write-host  -f Red $filesystemPath  " does not exist."

$filesystemPath  +" does not exist." | Out-File $File -append

 

}

 

 

 

write-host -f Green "End of "  $_.URL"`n`n`n`n"

"End of "  +$_.URL+"`n`n`n`n" | Out-File $File -append

 

 

}

 

}

 

___________________________________________________________________________________________________________________

description of commands being used:

 

 

1.       Get-SPSite  : creates object for the spsite as given by identity parameter.

2.       Get-SPWeb -limit all  gets all the  spweb in the site collection

 

3.       Out-File $File –append   :  put entry in a log file.

 

4.       write-host -f Green "processing for "  $_.URL :  to write a text on screen

 

5.       $error.clear() : clears the current error

6.       [IO.Directory]::CreateDirectory()  : used to create a folder on the shared path

 

 

7.       if($error.count -gt 0){$error | out-file $File –append :  if the error count is greater than 0, that is logged in the log file.

 

 

8.       Test-Path $filesystemPath  : verifies if the folder has been created

 

9.       export-spweb -identity $_.URL   -path  $filesystemPath   -ItemUrl $DocLibPath -Force -IncludeUserSecurity -IncludeVersions All | Out-File $File –append

: the heart of all commands, which is actually creating the cmp file

 

10.   Import-SPWeb -Identity $_.URL -Path $filesystemPath  -IncludeUserSecurity  -Force -UpdateVersions Overwrite | Out-File $File –append

: the heart of all commands, which is actually restoring   the cmp file.

Monday, November 15, 2010

Not able to login to Claims based auth. sweb apps in sharepoint 2010

Hi till yesterday I was able to login to claim based web apps in my sharepoint 2010 server. but today they are giving below mentioned error! even though classic mode auth web apps are running fine.

Nor it allow to activate /deactivate any fature to a site collection under claims based web app with same error in event log:

Please help.

error message in event viewer:

 

Log Name:      Application
Source:        Microsoft-SharePoint Products-SharePoint Foundation
Date:          10/8/2010 1:30:59 PM
Event ID:      8311
Task Category: Topology
Level:         Error
Keywords:
User:          SHAREPOINT2010\administrator
Computer:      sharepoint2k8.sharepoint2010.com
Description:
An operation failed because the following certificate has validation errors:\n\nSubject Name: CN=SharePoint Security Token Service, OU=SharePoint, O=Microsoft, C=US\nIssuer Name: CN=SharePoint Root Authority, OU=SharePoint, O=Microsoft, C=US\nThumbprint: 85F230FF68A8107A14667844D6741A6C2199C60E\n\nErrors:\n\n UntrustedRoot: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
NotTimeValid: A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file.
RevocationStatusUnknown: The revocation function was unable to check revocation for the certificate.
OfflineRevocation: The revocation function was unable to check revocation because the revocation server was offline.
.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-SharePoint Products-SharePoint Foundation" Guid="{6FB7E0CD-52E7-47DD-997A-241563931FC2}" />
<EventID>8311</EventID>
<Version>14</Version>
<Level>2</Level>
<Task>13</Task>
<Opcode>0</Opcode>
<Keywords>0x4000000000000000</Keywords>
<TimeCreated SystemTime="2010-10-08T08:00:59.446924300Z" />
<EventRecordID>524180</EventRecordID>
<Correlation ActivityID="{87C3E3A1-1134-43A6-A06E-150BA71C73C8}" />
<Execution ProcessID="6052" ThreadID="1540" />
<Channel>Application</Channel>
<Computer>sharepoint2k8.sharepoint2010.com</Computer>
<Security UserID="S-1-5-21-2138102958-2007814619-3387492156-500" />
</System>
<EventData>
<Data Name="string0">CN=SharePoint Security Token Service, OU=SharePoint, O=Microsoft, C=US</Data>
<Data Name="string1">CN=SharePoint Root Authority, OU=SharePoint, O=Microsoft, C=US</Data>
<Data Name="string2">85F230FF68A8107A14667844D6741A6C2199C60E</Data>
<Data Name="string3">UntrustedRoot: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
NotTimeValid: A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file.
RevocationStatusUnknown: The revocation function was unable to check revocation for the certificate.
OfflineRevocation: The revocation function was unable to check revocation because the revocation server was offline.
</Data>
</EventData>
</Event>

Reply1

Hi ,

 

Your certificate is no longer valid. Please visit below link for  error details for certificate.

http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509chainstatusflags.aspx

Please follow http://technet.microsoft.com/en-us/library/cc700843.aspx for troubleshooting

 




Pathik Rawal Blog: http://pathikhrawal.wordpress.com

Thursday, October 21, 2010

custom actions on work flow suspended sharepoint 2010

Hi

 

I need few custom actions like sending emails and few logs update  using  enterprise library. What will be the best approach for this .

will SPWorkflowEventReceiver   > WorkflowPostponed  solve my pupose

 

if yes, is there any alternate solution possible?

 

Reply 1

Sending emails from the custom actions sounds like a custom application page to me.




SharePoint Solution Architect, Developer