SharePoint 2013 PowerShell脚本,用于激活Web应用程序的自定义计时器作业 [英] SharePoint 2013 PowerShell script to activate the custom timer jobs for the web application

查看:95
本文介绍了SharePoint 2013 PowerShell脚本,用于激活Web应用程序的自定义计时器作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请提供建议,SharePoint 2013 Powershell脚本 激活Web应用程序的自定义计时器作业。

Please suggest,SharePoint 2013 Powershell script  to activate the custom timer jobs for the web application.

脚本应执行以下操作


  1. 激活计时器作业
  2. 运行计时器作业并写入console\log作业成功运行。
  3. 要激活的计时器作业列表(例如:计时器作业1,作业2等)

谢谢

推荐答案

嗨Gayam,

Hi Gayam,

由于SharePoint无法识别计时器作业是OOTB还是自定义,我们需要指定自定义计时器作业的名称。

Since SharePoint cannot recognize if the timer jobs are OOTB or custom, we need to specify the custom timer jobs’ name.

下面是一个使用PowerShell命令激活计时器作业的演示,供您参考:

Here is a demo for activate the timer job with PowerShell command for your reference:

#Function to Enable a Timer job
Function Enable-TimerJob(


TimerJobName)
{
TimerJobName) {


TimerJob = Get-SPTimerJob | Where-Object {
TimerJob = Get-SPTimerJob | Where-Object {


这篇关于SharePoint 2013 PowerShell脚本,用于激活Web应用程序的自定义计时器作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆