< Back

Start-ePoServerTask

Sat Jan 18, 2020 7:49 pm

NAME Start-ePoServerTask



SYNOPSIS

Starts the specified server task.





SYNTAX

Start-ePoServerTask [-TaskID] <Object> [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Starts the specified server task. Requires the taskId of the servertask to run. Uses the

scheduler.runServerTask api command.





PARAMETERS

-TaskID <Object>

The id number of the server task to run.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





Added support for -Whatif



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Start-ePoServerTask -TaskID 26



Starts the server task with an ID of 26. This is the AD Sync task in my environment.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>$RunServerTasks = Get-ePoServerTaskList | Where {$_.Name -match "DAT update"} | Start-ePoServerTask



$RunServerTasks | Get-ePoTaskLogHistory



First uses the Get-ePoServerTaskList function to find the server task(s) that have name(s) that match DAT update

and then pipes the TaskId to

the Start-ePoServerTask function. The result object is stored in the variable $RunServerTasks.

This variable is piped to Get-ePoTaskLogHistory, which uses the TaskID property of $RunServerTasks, to

retrieve the TaskLog history for the server task(s)

just run.











RELATED LINKS