►
Description
An intro into monitoring your Citrix environment using the Citrix PowerShell SDK. Lightning talks are opportunities for RTPSUG members to share interesting bits of code with one another.
Jermaine Ford walks through how he uses the Citrix PowerShell SDK to ensure that his Citrix servers are online and operational. He logs the script results and sends notification emails to report the actions taken.
A
So
the
problem
that
I
was
trying
to
solve
with
this
script
here
is
that
we
have
some
servers
that
reboot
on
a
on
a
weekly
basis,
so
pretty
much
every
night
of
the
week,
there's
some
set
of
services
rebooting
and
we
were
run
into
a
problem
where's
the
server's
wouldn't
wouldn't
always
come
back
up
so
problems
that
would
cause
us
up.
So
the
service
wouldn't
always
come
back
up,
and
so
these
please
no
citrix
service.
A
So
what
what
we
needed
to
do
is
want
to
say:
okay,
if
the
server
did
not
come
back
up,
find
that
server
and
essentially
just
power
to
serve
role
when
you
power
the
server
and
send
an
email
saying
that
hey
this
server
powered
on,
if
there
was
no
work
done
or
no
serving
need
to
be
power
once
in
a
just
write
that
information
to
a
textile
just
that
if
we
noted
the
script
brain
so
I'll
just
go
through
this
real
quick,
then
so
date.
So
here
I'm
just
building
the
table.
A
That's
going
to
show
the
output
of
what's
going
to
be
in
the
email
that
I
received
we're
going
to
eccentric
service.
So
we're
going
to
contact
the
delivery
control.
We're
going
to
find
out
the
machine
is
in
maintenance
mode.
Essentially,
maintenance
mode
is
just
saying
that
this
in
maintenance
mode
is
not
accessible
to
the
end-users,
but
it
spoke
to
admin.
So
if
machine
is
not
in
maintenance
mode
and
the
power
state
is
off
and
they're
tagged
as
a
near
production
machine
go
ahead
and
well
I'm.
A
After
all,
of
that
is
done,
then,
just
essentially
just
send
an
email
only
off
the
machine
or
powered
on.
So
here's
a
so
no
machines
that
was
part
on
see
the
date
and
time
just
says:
no
machines.
A
ship
are
on
command
at
the
date
and
time
this
is
set
to
run
on
up.
We
have
it
set
up
as
a
scheduled
tasks
or
runs
every
hour.
A
They
were
missed,
wasn't
machine
that
was
powered
on
and
at
the
date
and
time.
Let
me
just
say
powering
on
the
machine
now,
when
this
runs,
we
also
get
an
email,
so
I
just
copied
an
email
what
we
get
so
today
the
machine
was
power,
sent
to
power
one
instructions
and
in
this
table
this
has
a
machine
named.
The
state
header
was
in
in
this
confirm
that
wasn't
in
maintenance
mode
to
make
sure
this
doing
the
right
thing,
and
then
the
catalog
is
the
group
of
machines
that
was
hired
on
essentially.