Hi,
I have a PS function which schedules a script as a job by path which works fine.
However, I'd like it to popup with a message once done and remove the job.
Please advise.
This is the function so far:
function Submit-PSSCriptJob
{
[Cmdletbinding()]
Param (
[Parameter()]
[String]$Path
)
Start-Job -Name PSCriptJob -ScriptBlock {powershell.exe -file $using:Path}
}
Open in new window