Friday, October 31, 2014

Delete a Timer Job in SharePoint

I was looking for a custom timer job that was having two instances. Second instance got created after another deployment. Feature deactivation did not delete the existing job. I wanted to delete old timer job but there is not option to delete that in central Admin. PowerShell help me out on that. PowerShell’s Get-SPTimerJob command provides listing of all the timer jobs.

When I run this command it was truncating the name and ids. To see all jobs with full name we need to change the buffer Size property of PowerShell window to 250+

Get-SPTimerJob |Format-Table id,name

To narrow down the results I used where clause with name with these properties to distinguish old job.

Get-SPTimerJob | where { $_.name -like "<JobName>" }| Format-Table  -autosize -Property LastRunTime,id,name,DisplayName,Status,ErrorMessage

After finding the id of correct Job, run these commands to delete the job.


$job = Get-SPTimerJob -id <Job's GUID>
$job.Delete()

Job will be deleted. you can confirm running above Get-SPTimerJob PowerShell command or in CA. 

Monday, October 6, 2014

SharePoint Designer - Run as different user

Recently I need to run SharePoint designer as different user. 'Run as different user' option is not available on SharePoint Designer shortcut.

Follow these steps to start SharePoint Designer 2010/ SharePoint Designer 2013 as another SharePoint user

1.      Search for SPDESIGN.exe in windows explorer. you will find this under these locations based on version of SharePoint Desginer you have. 
               SharePoint Designer 2013(64bit) - C:\Program Files\Microsoft Office\Office15
               SharePoint Designer 2013(32bit) - C:\Program Files (x86)\Microsoft Office\Office15
               SharePoint Designer 2010(32bit) - C:\Program Files (x86)\Microsoft Office\Office14
2.      Press and hold the Shift key, right-click SPDESIGN.exe, and then click Run as different user.
3.      Type the credential of the user and then click OK.

Or

You could Log on to Windows by using another user account, and then run SharePoint Designer.