My Blog

Add User Policy using Powershell

    # This script will add to user policy for a web application in SharePoint 2010 # and will add few more things to get rid of this event in the event logs: # Object Cache: The super reader account utilized by the cache does not have sufficient permissions to SharePoint databases. #  See,… Read more

New-SPSite and New-SPClaimPrincipal

Self note: new a new site and set my account as an owner:   $web = "http://localdev/sites/site1" $user = New-SPClaimsPrincipal -IdentityType WindowsSamAccountName -Identity $(whoami) New-SPSite -Name "site1" -Url $web -OwnerAlias $user -Template "CMSPUBLISHING#0"… Read more

Check the build level status of components within your SharePoint 2010 farm

To check the upgrade status of your farm after applying the latest SP and CU:    Get-SPProduct – this CmdLet will check the build version of the binaries on all servers in the farm PS C:\> $spprod = Get-SPProduct PS C:\> $spprod.Servers | select ServerName, Products, InstallStatus   ServerName Products                           InstallStatus———- ——–                           ————-WFE2       {Microsoft SharePoint Server… Read more

Sync the user display name from the profile service down to the content dbs

this script will sync the user display name from the user profile service and update the user display name on the site collection level. all it does is to trigger the timer job: <user profile service app>-ProfSync get-sptimerjob | ? {$_.Name -like "*Profsync*"} |  start-sptimerjob   – mutaz… Read more

Reprovision service applications

when upgrading a 2010 Beta deployment to RC i ran into issues related to using office web apps. i had to reprovision the service applications to fix the issue. to do so, i ran the following ps script:   Get-SPServiceApplication | %{$s = “re-provision: “ + $_.TypeName; Write $s;$_.Provision()}   – mutaz… Read more