Créer un site internet

Sharepoint Execute Job With Powershell

fredericdietrich By On 28/09/2018

In Powershell

$webApplication = Get-SPWebApplication $siteUrl
$jobName = "lmlhmohmo"
$variationsJob = $webApplication.JobDefinitions | Where {$_.Name -like "$($jobName)*"}
Get-Date
foreach($job in $variationsJob)
{
$lastRunTime = $job.LastRunTime
$job.RunNow()
Write-Host $job.Name + " - " + $job.LastRunTime + " - " + $siteUrl + " - " + $job.Title
 
while ($lastRunTime -eq $job.LastRunTime){
Write-Host -NoNewline "."
Start-Sleep -Seconds 5
}
}
Get-Date
 

powershell Sharepoint

  • No ratings yet - be the first to rate this.