Kashif Nizam Qureshi


Leave a comment

Removing Top Bar Items (SharePoint, Newsfeed, Ondrive)

Remove SharePoint Text:
Run following sharepoint powershell script:

$webApp = Get-SPWebApplication http://servername:13737
$webApp.SuiteBarBrandingElementHtml = “My Heading!”
$webApp.Update()

Remove newsfeed, OneDrive and other social links:
Go to SharePoint Central Admin and then user profile application. Go to Manage User Permission and remove all permissions.


Leave a comment

Deleting Project Server Orphaned Sites

Run the following one by one.

Get-SPServiceApplication

$sa = get-spserviceapplication | ? {$_.Id -eq “33c1ead8-9721-4a24-a0aa-4a9b69915952″} // Above guid
$sa

followed by

$sc = $sa.SiteCollection
$sc

$a = $psi.Sitecollection | where {$_.SiteID -eq “9c601a96-0a44-4bb7-9911-d504b79e7209″} // Above SC SiteID guid

$sc = $sa.SiteCollection // in case you have more SC
$sc

$a = $psi.Sitecollection | where {$_.SiteID -eq “cdeeb69f-6858-46a6-bd2a-99fe2d2b3f7c”} // Above SC SiteID guid

then

$a.Delete()

Note the above once didn’t work for removing one of the instance, it did work well for other once ( I had two). Use the following to delete.
$svApp = Get-SPServiceApplication -Name “Project Web App Service Application”
$svApp.SiteCollection

// First use SITEID, if that doesn’t do anything try with ID from what you get from the above command

$svApp.SiteCollection.Remove(“a09c6964-efc2-4917-9448-ce86d0bc95d3″)

//Lastly,

Remove-SPServiceApplication $svApp -RemoveData


Leave a comment

Migrating Project Server 2013 to Another Server Using PowerShell

  • Delete existing PWA instance

Dismount-SPProjectWebInstance -SiteCollection  “http://hqoepmapp01:85/PWA”
Dismount-SPContentDatabase AM_Content


  • Delete any old dbs and restore new DBs, backed up from source server
  • Run the following commands one by one, to mount content db and PWA db. And create PWA instance in the last.

Mount-SPContentDatabase AM_Content -DatabaseServer HQOEPMDB01\StagingEPM –WebApplication http://hqoepmapp01:85/

Mount-SPProjectDatabase -Name AM_ProjectWebApp –WebApplication http://hqoepmapp01:85/ –DatabaseServer HQOEPMDB01\StagingEPM

Mount-SPProjectWebInstance –DatabaseName AM_ProjectWebApp –SiteCollection http://hqoepmapp01:85/PWA –DatabaseServer HQOEPMDB01\StagingEPM


  • I had to run the following command as well in order to make the site accessible.

Sync-SPProjectPermissions -Url http://hqoepmapp01:85/PWA -Type “Full”
Set-SPPRojectPermissionMode -Url http://hqoepmapp01:85/PWA -AdministratorAccount am\epmfarm -Mode ProjectServer


Leave a comment

SharePoint 2013 Designer Workflow Error Access Denied

Error:

RequestorId: 675358e8-c91d-0f3a-ebaa-d663a9a1202d. Details: System.ApplicationException: HTTP 401 {“error”:{“code”:”-2147024891, System.UnauthorizedAccessException”,”message”:{“lang”:”en-US”,”value”:”Access denied. You do not have permission to perform this action or access this resource.”}}} {“Transfer-Encoding”:[“chunked”],”X-SharePointHealthScore”:[“0″],”SPRequestGuid”:[“6359f5a3-808a-4144-ace2-0fdff207809f”],”request-id”:[“6359f5a3-808a-4144-ace2-0fdff207809f”],”X-FRAME-OPTIONS”:[“SAMEORIGIN”],”MicrosoftSharePointTeamServices”:[“15.0.0.4569″],”X-Content-Type-Options”:[“nosniff”],”X-MS-InvokeApp”:[“1; RequireReadOnly”],”Cache-Control”:[“max-age=0, private”],”Date”:[“Sun, 30 Nov 2014 08:08:36 GMT”],”Server”:[“Microsoft-IIS\/8.0″],”WWW-Authenticate”:[“NTLM”],”X-AspNet-Version”:[“4.0.30319″],”X-Powered-By”:[“ASP.NET”]} at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Resolution 1:

PS C:\Users\exceed.epm> Get-SPTimerJob “RefreshMetadataFeed” | Start-SPTimerJob

Resolution 2 (In my case it worked):

Activate site feature “Workflows can use app permissions

Site actions > Site Settings > Site features > Workflows can use app permission

Follow

Get every new post delivered to your Inbox.