[Autogenerated] when we talk about tasks,
PowerShell Sim does not provide task or
job management standard. PowerShell
commands for jobs can be executed, though,
within a SIM connection. So what does that
look like? Well, within the PowerShell
tasks and jobs, we have to regular
PowerShell commands one called Start Dash
Job, which will start a job of some
description, which could be any number of
commands. All we can pass something called
as job as a parameter, which are then
force it to be a job. So the goal here is
to use SIM commands remotely on a machine,
but then utilize standard PowerShell
commands that are not sim commands to
manage jobs and tasks. So how do we
execute a job locally? Well, first off, we
can actually rap as Sim commands with
regular PowerShell. So start dash job will
initiate a job locally on the machine that
we run that with. It has a parameter
called script block and the script block
is in the scroll are brackets and then it
can contain any kind of PowerShell that we
need to execute. Now, what we've done here
is combined the two together, so we use
regular PowerShell command to start a job,
and then we say, Go and get the instance
and get me the computer system. Another
option that we have is, of course, we
could retrieve Sim processes if we needed
to as normal I can. Then go ahead and say,
Start job and I could take that same
syntax that we use previously and drop
that into a job and then utilize what's
called receive job with that job, IDE and
that would return the values. So we can
start to take regular SIM expressions or
commands that we would use and pass those
into the job kind of architecture. So
let's go a little bit further. If I wanted
to initiate a job remotely, I could say
he's the compete to name. Here's my
script, which is why want to executes Oh,
session, which is going to create me a new
SIM session, and then I wish to retrieve
the computer system information for that
session. I can then initiate that job by
utilizing that script that was generated
and then I can retrieve the information
about that job automatically. So there's
great power that comes with combining
standard PowerShell commands with SIM
commands to be able to manage tasks on other machines