►
Description
Gathering information from remote computers is common task for system administrators. This discussion highlights how to gather data remotely using PowerShell. Our speaker, David Stiemle is a packaging and deployment expert for the USPS. He shares his tips for pulling information from large sets of computers and the challenges involved in doing that as efficiently as possible.
David also offers tips on how he handles different situations that can be challenging and repeated requests for data. Join us for an eye opening look into how admins in big environments perform their daily workloads from the command line.
A
And
good
evening,
welcome
to
the
research
triangle.
Powershell
user
group
today
is
july,
15th
and
hope
you
got
your
taxes
in.
We
want
to
say
thank
you
to
david
steimle
for
deciding
to
join
and
share
with
us
some
great
information
that
he's
developed
over
his
course
of
action
in
his
I.t
career
and
I'm
looking
forward
to
it
so
david.
Take
it
away.
B
Okay,
thank
you
very
much
all
right,
remote
information
gathering
with
powershell.
This
is
just
something
I
kind
of
do
on
the
regular.
I
am
with
the
enterprise
packaging
team
for
the
united
states
postal
service
here
in
raleigh.
B
B
I've
been
with
this
group,
maybe
two
years,
not
sure,
I'm
an
sccm
packager.
I
specialize
in
custom
script
installations
and
detection
methods,
although
now
I'm
a
little
more
managerial
I
play
with
linux,
I
got
three
raspberry
pi's.
My
wife
would
love
it.
If
you
wanted
to
take
some
away
from
me
and
I'm
a
dungeon
crawl
classic
for
a
crew
judge,
I
have
an
annoying
cat
all
right
I'll
leave
that
up
for
a
second
easiest
way
to
find
me
is
twitter.
I
have
my
link
to
my
webpage
on
there.
That's
just
the
qr
code.
B
All
right,
yeah,
I'm
just
t.b
steinle
on
twitter
davidsteinley.net,
my
discord's
right
there
and
the
github
for
what
I'm
talking
about
some
of
it's
out
of
date,
but
this
is
kind
of
what
I'm
talking
about
kind
of
an
older
version
of
this
so
anyway,
why
do
we
care
about
remote
data?
B
You
might
not,
but
you
might
someday,
so
it's
kind
of
kind
of
cool
to
know
about
how
to
get
it.
You
might
need
to
get
information
from
machines
that
you
access
or
support,
or
maybe
you
just
maybe
you
find
yourself
in
a
position
where
you
need
to
get
a
hold
of
somebody
else's
information
in
a
non-malicious
way.
B
B
B
B
Invoke
command
is
what
makes
your
script
blocks
happen
and
that's
the
mechanism
for
running
your
code
remotely
quick
disclaimer,
I'm
using
a
lot
of
wmi
examples,
mostly
because
anybody
here
is
using
windows,
can
make
a
wmi
call
that
I'm
making
and
probably
get
the
same
results
as
I
do.
Wbm
is
not
the
best
thing,
but
if
we
start
talking
about
sim
instance,
then
we're
talking
about
getting
into
remotes
a
whole
different
way.
B
So
I
avoided
that
I'm
primarily
using
powershell
5.1,
because
windows
or
powershell
7,
of
course,
does
not
have
wmi
at
least
out
of
my
linux
boxes.
I
use
it
on.
I
don't
have
one
rm
environment,
so
I'm
going
to
be
doing
everything
locally,
but
you
could
include
anytime,
you
see
invoke
command,
you
could
put
dash
computer
name,
computer
name,
and
it
would
run
the
same
way.
B
Last
thing
is
my
self-deprecating
disclaimer,
I'm
not
a
master
of
anything.
These
are
just
fun
little
tricks.
All
of
these
can
be
improved
upon.
B
Oh
crap,
sorry.
A
B
B
So
I
rebooted
yesterday
at
541,
didn't
help
any
I'm
still
slow.
If
I
had
rights
to
your
computer,
I
could
do
the
same
command.
Invoke
command,
dash
computer
name,
your
computer
script
block.
I
could
get
your
last
boot
time,
that's
cool,
but
I'm
probably
going
to
stop
using
my
powerpoint.
The
real
power
is
is
when
you
start
variablizing
the
stuff.
B
So
if
I
assign
the
results,
the
last
boot
time
to
a
variable,
lots
of
us
know
this.
Now
we
essentially
echoed
wmi
out.
We
got
the
same
thing
and
what
we
can
do
now,
of
course,
is
play
with
that
date.
Make
it
more
usable
you
put
that
date
into
you,
get
20
of
those
dates.
You
can't
sort
them
that's
a
sortable
date.
You
can
format
normally
like
this
one
your
year
month,
month,
day
day.
B
Good
result:
there
we
go
so
let's
go
back
and
skip
skip
ahead.
A
few
I
think,
yeah
all
right.
So
that's
that's
fun,
but
how
useful
is
it?
What
what
we
kind
of
want
to
do
is
if
we're
going
to
a
machine,
let's
get
a
few
things
from
it.
B
B
So
my
query-
one's
kind
of
nice
gives
us
our
serial
number
manufacturer,
a
bunch
of
stuff
about
the
system,
things
that
we
might
want
to
know.
A
So
can
I
stop
you
there?
I
just
want
to
make
sure
that
everybody
here
understands
what
is
happening
here
is
basically
you're
you're
executing
this
code
on
the
actual
remote
computer.
So
even
if
you
pass
this
right
now,
you're
just
doing
invoke
command
on
your
local
computer,
but
you
just
took
a
whole
bunch
of
chuckle
code
and
you're
doing
all
that
processing
on
the
remote
computer.
A
And
so,
if
you
did
computer
name
here,
you
would
do
it
on
a
remote
computer
and
so
you'd
have
the
ability
to
do
this
across
multiple
computers,
in
sequence,
in
series,
as
you
as
your
feet,
and
you
get
back
these
objects
and
also,
I
think,
one
of
the
things
that
I
think
you
mentioned
you
probably
will
later
is
that
when
you
do
it
on
a
remote
computer,
you're
going
to
get
back
a
ps
computer,
a
new
property
to
that
object.
When
it
comes
back
with
a
ps
computer
name,.
B
Yes,
yeah,
and
I
may
have
forgotten
that
that
part,
because
I
I've
been
trying
to
my
only
enterprise-
is
my
enterprise
and
I
didn't
want
to
share
too
much
information
about
our
system.
So.
B
Hey
a
fun
little
trick,
you'll
notice
this
the
system
family
equals
no.
So
it's
just,
I
skipped
a
whole
bunch
of
stuff
all
right,
so
object,
one
in
our
script.
Block
I'm
going
way
too
fast
object.
One
is,
is
an
object,
we're
making
ourselves.
B
It
starts
out
as
a
blank
object,
we're
gonna
pipe
that
through
select
object
and
we're
gonna,
give
it
the
names
of
the
objects
we
want,
so
we're
creating
our
own
object.
Select
object
gives
us
an
empty.
B
B
One
sorry
very
nervous,
so
you
notice
that
that
I
said
system
family
to
know
system
family
is
not
a
real
property
at
all
in
wmi,
so
what
we
are
doing
is
a
little
trick
from
the
guy.
I
stole
this
code
from.
B
B
A
That's
actually
cool.
I
had
never
thought
about
using
github
just
to
in
that
way,
anyway,
pretty
pretty
pretty
neat
man.
B
Thank
you
all
right,
I'll
see.
B
Yes-
and
I
I
do
use
invoke
rest
method
against
shares,
sometimes
and
works
just
as
well.
B
It
works
a
little
nicer
than
get
content,
json
file
convert
from
json,
sometimes
it's
a
little
cleaner,
plus,
it's
a
few
steps
easier
and-
and
I
will
mention
while
I'm
here
before
I
skip
over
it
again,
you
notice
I'm
doing
that
outside
of
the
script
block,
because,
if
we're,
if
we're
talking
about
running
the
script
block
against,
say
a
hundred
a
thousand
machines,
whoever
owns
this
this
json
file,
whoever
owns
that
server,
am
I
still
talking
yeah,
you're,
doing
good.
Okay,
sorry,
my
mic
just
went
crazy.
B
Whoever
owns
that
server,
they
might
not
like
us
beating
on
them
a
thousand
times
just
to
get
the
same
data
that
we
only
needed
to
get
once
so
I'm
doing
that
outside
of
my
script
block,
so
I'm
doing
it
outside
of
my
query,
essentially
in
a
more
real
sense,
this
call
probably
would
have
been
up
here
somewhere
instead
of
at
the
end.
B
We're
getting
what
seven
one
two
three
four
five,
six
we're
getting
seven
items:
one
call
is
from
an
api,
but
so
six
items
we're
making
six
wmi
calls,
but
we're
only
calling
five
classes
so
we're
making
one
call
twice
at
least
and
then
in
this
situation-
that's
not
so
bad.
But
if,
if
we
are
talking
about
a
bunch
of
machines
returning
a
lot
of
data,
then
why
make
that
call
twice?
B
That's
that
costs
you
little
something
between
processing,
power
or
just
time
the
fewer
calls
you
can
make
the
better.
Ultimately,
let's
let's
say
it
takes
two
seconds
to
query
one
machine
and
you're
acquiring
a
thousand
machines.
That's
that's
a
long
time
right,
so
script
block
two
is
a
little
more
advanced
this
time.
We're
going
to
get
everything
from
those
wmi
objects,
we're
just
going
to
spit
it
all
back
out
and
give
it
to
us.
In
my
query,.
B
B
B
B
B
My
query,
2
is
not
great
because
it's
giving
us
a
bunch
of
stuff
that
we
don't
have
any
context
for
here's
a
scenario:
urgent
email
from
your
boss
and
I
have
typo
steinle.
We
need
you
to
scan
the
field
for
these
items.
Why
are
you
still
reading
this?
Go.
C
B
So
if
you,
you
run
your
script
block
against
the
field,
you
go
to
lunch,
you
compile
the
data,
you
send
it
to
them.
I'm
done!
Let's
go
home!
Another
email,
you
didn't
put
the
bios
version
in
there,
so
get
me
that
all
right,
real,
quick
none
of
my
current
former
bosses.
Recently
former
bosses,
talk
to
me
this
way
in
case
they're.
Listening
all
right,
so
we
have
script
block
2,
but
that
one's
kind
of
ugly
I'll
have
to
get
the
data
and
then
I'll
have
to
figure
out
how
to
present
it
properly.
B
Since
we
know
how
to
do
it,
we're
going
to
get
the
powershell
version,
because
we
love
powershell
and
we're
going
to
get
the
last
security
update.
B
So
this
is
a
it's
a
little
more
complex,
we're
going
to
do
a
few
things
differently,
because
we're
getting
ready
to
really
hit
the
field.
B
Generic
lists,
if
you're
not
familiar,
they
are
much
well,
I'm
not
even
going
to
say
they're
better
than
a
raise.
If,
if
you
would
have
been
putting
all
this
into
an
array,
don't
do
it
and
just
be
fair
check
this
video
out
sometime
when
you
have
some
time
from
powershell
saturday,
oh,
come
on
really.
B
B
So
so
a
generic
list
lets
you
keep
adding
without
the
overhead
of
recreation
right,
so
we're
gonna
make
that
out
up
first
and
we're
going
to
declare
that
it's
ps
object,
list
script
block
3
we're
going
to
have
I
like
responses,
my
variable
it's
my
object
name
because
it
makes
sense
to
me
just
like
object,
one,
it's
a
new
object
and
we're
going
to
give
it
these
properties,
everything
we're
looking
for
and
then
a
little
more
right,
we're
going
to
name
our
wmi
properties
after
the
class
that
we're
grabbing
just
so
we
can
make
it
a
little
easier
on
the
other
side
when
we
need
to
find
things
if
we
know
what
class
they're
in,
we
know
which
sub
property
they're
in.
B
C
B
C
But,
but
to
be
fair,
so
you're
right,
however,
windows,
8
and
forward
it's
on
by
default,
unless
your
org
is
actively
turning
it
off.
So
remoting
is
something
that
you
can
leverage
unless
your
company
is
working
to
shut
that
off
and
that's
a
whole
other
topic,
but
I
mean
I
would
implore
anybody
to
look
into
enabling
remoting
for
the
people
that
need
to
manage
systems.
B
B
Okay,
sorry,
so
I
already
ran.
B
B
B
All
right,
so
it
would
I'm
just
going
to
leave
it
like
this.
Why
do
we
get
all
that
data,
partly
because
we've
already
been
asked
for
more
data,
and
it's
going
to
happen
again.
B
Secondly,
we
got
pretty
much
every
data
point
that
we're
interested
in
in
the
context
and
then
a
little
more.
We
maybe
spend
a
little
more
time
on
the
front
end.
I
forget
how
long
that
took
for
me
to
code.
I
think
it's
actually
easier,
but
our
run
times
between
script
block,
2
and
scroll
block
3,
which
I
haven't
really
shown
they're
pretty
similar
because
you're
making
a
lot
of
the
same
calls.
B
My
one
addendum
to
that
is
that
getting
the
last
kb
I
use
get
hotfix
and
get
hotfix
can
take
a
while.
It
is
a
little
notorious
in
my
enterprise,
at
least
in
my
former
section
of
the
enterprise
for
hanging,
so
it
can
screw
you
up.
So
if
you
don't
need
it,
don't
get
it.
I'm
just
I'm
just
putting
in
my
code
because
it's
fun.
A
You
can
actually,
as
you
kind
of
see,
you're
building
your
own
custom
object
at
the
very
end
or
in
the
code,
so
that
you
only
send
back
the
data
that
you
care
about,
and
so
some
of
the
things
that
I've
seen
other
people
do
is
do
the
remoting,
but
hey
dual.
You
can
also,
you
know,
get
wmi
that
computer
over
there
but
you're
getting
all
that
data
back
all
those
pieces.
A
I
think
that's
a
really
important
thing
to
understand
when
you're
dealing
with
some
of
this
stuff
is
that
in
this
fashion
you
know
sometimes
in
in
the
powershell
world
people
you
hear
people
talk
about
shift,
left
or
filter
left.
Well,
that's
part
of
exactly
what
this
is
doing
is
you're,
actually
shifting
all
the
way
to
the
remote
computer
and
letting
do
that
computer.
Do
all
the
work
and
do
all
the
stuff,
and
then
you
just
wait
for
it
to
come
back
into
other.
Get
you
just
the
pieces.
A
You
want
you're
only
sending
the
stuff
across
the
wire
that
you
want
and
which
is
very
important,
especially
when
you
do
it
at
scale,
and
I
know
you
guys
are
doing
a
bunch
of
stuff
at
scale,
or
at
least
you
know
you're
not
doing.
Oh,
I
need
10
computers,
no
yeah.
I
just
did
across
you
know
3
000
or
more.
So
that's
a
very
important
thing.
B
Right
and
my
my
enterprise-
I
didn't
I
didn't
mention
in
in
the
beginning-
it
kind
of
says
that
I'm
in
a
big
enterprise,
my
former
segment,
was
a
little
over
50
000
machines,
luckily
a
common
hardware
platform
for
the
most
part,
but
I'm
dealing
with,
I
think
155
000
right
now,
no
commonality
and
we've
still
got
windows.
7
windows
8.1
out
there.
So
it's
a
lot
of
things
to
play
with
I'm
still
writing
powershell
2
at
work,
which
is
disturbing
it's
very
hard
for
being
so
low
level,
I
guess
or
so
backwards.
B
It's
much
harder.
A
lot
of
tricks
in
five,
one
that
make
things
easier,
yeah
and-
and
that's
part
part
of
why
I
didn't
discuss
get
sim-
is
that
getsim
can
do
all
of
this
stuff
differently.
It
can
kind
of
do
its
own
reporting,
but
if
I
did
need
to
get
say,
registry
responses
or
something
else
in
this
same
script
blog-
I
don't.
I
think
that
would.
C
B
Anyway,
I
appreciate
that
phil.
So
the
way
I
I
tend
to
do
this
is
a
simple
loop.
I
should
go
back
here
all
right
systems
in
the
field.
There
are
two
main
ways.
One
is
the
way
I
do
it,
which
is
terrible,
which
is
just
looping
through
a
bunch
of
systems.
B
The
problem
with
that
is
it's
serial,
which
means
I
get
information
from
laptop
one
and
then
it
comes
back
to
me.
I
get
information
from
the
laptop
too.
It
comes
back
to
me
two
to
five
seconds
every
time
that
starts
adding
up.
If
my
loop
breaks
on
laptop
three,
that's
all
I
got
if
I'm
home
and
let
that
thing
run
then
tough.
You
know
in
the
morning
I
got
nothing.
B
Option
is
is
to
go
threaded,
I'm
no
good
at
this,
so
I
don't
want
to
talk
about
it.
I
don't
know
how
to
do
it.
It's
an
art.
It
is
very
much
an
art
as
well
as
a
science.
The
guys
who
are
good
with
it
are
pretty
amazing
with
it.
B
B
B
I'm
not
gonna
run
that
because
I
don't
have
laptop
one
two,
five
or
nine
on
my
network,
but
you
can
you
can
imagine
how
it
you
know
how
that
should
work
if
you're
familiar
with
loops.
B
The
kind
of
last
part
is:
who
are
you
getting
data
for
I'll?
Show
you
what.
B
C
B
My
list
right,
I
convert
to
json.
B
If
I
convert
that
to
json
that's
a
ton
of
data
right,
my
boss
does
not
want
to
see
that,
and
some
of
it
doesn't
even
make
sense
unless
you
really
start
digging
down
into
it.
So
if
the
date
is
for
me,
I
might
convert
to
json,
then
just
out
file
it
to
of
to
a
file
that
I
can
then
import.
B
B
But
what
about
the
boss
bosses
want
a
flat
table?
They
want
the
data
they
ask
you
for
and
they're
gonna
want
more
so
be
flexible.
The
other
part
I
know
about
boss
is
is
sometimes
they
get
asked
for
that
data
from
somebody
else,
so
they
may
be
techies.
They
may
be
able
to
get
it
themselves,
but
they're
asking
you,
because
they
don't
have
time
and
just
give
me
what
I
want
and
be
able
to
give
me
more.
If
I
need
it.
B
B
B
This
time,
I'm
going
to
forage
through
my
data
come
on.
Look
at
each
item,
not
sure
why
4h
for
each
method
was
not
working
for
me,
but
I
I
didn't
have
time
to
look
at
that.
B
I'm
basically
doing
the
same
thing
I
was
doing
in
earlier
script
blocks,
except
that
this
time
I've
got
an
object
that
is
going
to
be
comprised
of
results
from
previous
objects,
solving
out
my
data,
so
we're
we're
shrinking
the
data
down
to
work
for
other
people
right
now
like
like,
we
saw
from
the
convert
json.
B
This
is
complicated
where
the
heck
is
all
this
stuff.
Fortunately
it's
all
up
here
if
we
started
here,
we
probably
we
probably
know
where
these
things
are.
If
we
knew
to
look
for
them
anyway,
but
since
we
named
our
sub
objects
after
our
classes,
we
know
that
serial
number
is
in
property
in
32
bios,
as
is
manufacturer.
B
So
if
we
go
back
down
to
where
we're
selecting
data
computer
name
was
top
level
reboot
top
level
we're
going
to
grab
these
items
from
when
bios
win32
bios,
they
wanted
all
these
other
things
that
they
asked
for
we're
just
kind
of
digging
those
out.
Let's
go
ahead
and
run.
B
B
B
B
B
B
All
right,
it's
too
big
for
this
screen,
but
right
this
is
this
is
a
csv
we
can
send
to
them.
They
can
open
in
excel,
they
can
make.
You
know
they
can
make
computer
name
green
if
they
want
to,
they
can
make
american
mega
trends
pink
whatever
they
want
to
do.
You
know,
and
people
have
with
excel
and
the
other
benefit
to
this
is
if
we
would,
we
discover
that
they
actually
wanted
something
else.
They
didn't
tell
us
this
time
that
they
want
security
status.
B
A
I
just
want
to
say
that
yeah
a
bunch
of
people
talking
this
is
I
like
how
you
got
a
bunch
of
data
and
you
pulled
it
all
back
and
you
pulled
it
into
like
the
json
file
and
even
the
other
objects,
because
it
really
gives
you
the
ability
to
get
more
data
than
you
need
and
then,
when
your
boss
then
says
hey
give
me
this
other
like
well,
I
got
that
too
and
then
you
want
other
well.
I
got
that
too.
That
you'd
already
pulled
the
data
at
once
and
so
kind
of
like.
A
It's
all
inside
that
extra
object,
so
you
can
even
pull
out
the
parts
you
want,
because
I
also
saw
you
just
you
took
the
whole
class,
so
anything
comes
back
in
that
class.
It
just
gets
thrown
into
that.
You
know
subset
object.
So
I'm
like
hey
it's
easier
for
me
to
pull
all
those
extra
pieces
because
it's
already
there
and
I
didn't
have
to
think
about
what
else
is
there.
It
just
gave
me
whatever
was
there,
and
so
I
don't
have
to
pull
that
pieces.
A
B
So
like
just
just
to
that
point
like
this
win32
baseboard,
this
is
me
just
converting
it
to
json.
We
got
all
this
data
back.
B
Do
I
need
any
of
this
half
of
this
who
knows,
but
when
I
up
in
script
block
one
when
I'm
making
that
that
single
call
to
windows
baseboard
I'm
getting
all
of
this
anyway,
so
so,
why
throw
all
of
it
away?
If
I
might
need
it,
so
I
mean
you're
making
the
call
you
might
as
well
turn
return
the
data
you're,
not
you're,
wasting
more
time
by
making
the
call
twice
or
have
go
back.
God
forbid.
You
have
to
pin
a
million
machines
again
to
try
and
get
one
extra
piece
of
the
data
so.
B
Click
I'll
kind
of
wrap,
this
up
things
we
didn't
talk
about.
This
is
a
this
is
definitely
a
ryan
leap
trick
that
I
learned
test
your
connection.
If
you
can't
get
to
it,
don't
bother
trying
to
authenticate,
because
sometimes
kerberos
will
take
forever
trying
to
talk
to
a
machine
that
it
can't
even
talk
to.
B
B
I
am
using
test
connection
to
computer
name,
I'm
doing
a
count
of
one
generally
and
error
action
is
stop,
because
I
find
I
find
I
get
a
lot
of
red.
I
don't
know
if,
if
it's
something
about
the
way,
I
do
things,
but
if
I
can't
connect
to
the
machine
at
all,
I
wind
up
getting
errors
like
you
know,
just
like
a
regular
ping,
where
it
says,
request
time
down
whatever
I'm
getting
a
lot
of
red
and
powershell.
B
A
B
B
So
yeah
just
try
test
connect.
Air
action.
Stop
catch
just
keep
going.
Maybe
it's
a
good
idea
to
that's
what
I
was
looking
for.
B
So
so
this
is
something
I
did
just
the
other
day
and
I
was
like.
Oh,
this
is
what
I'm
talking
about
in
two
days.
I
should
know
all
this,
so
I'm
making
a
script
block.
I'm
I've
got
an
apex
out
in
the
field
that
we
deployed
to
cat
and
it
failed.
So
I
need
to
get
these
cat
users
back
to
the
original
version.
B
So
I'm
trying
to
figure
out
who's
got
the
old
version.
Who's
got
the
new
version.
If
you
don't
know
apex,
it's
basically,
a
phone
application
on
your
computer,
probably
candy
crush,
is
an
apex
if
you've
got
that
on
windows,
so
I'm
just
using
get
app
x.
I'm
looking
for
the
old
I'm
looking
for
the
new.
B
B
B
Usernames
yeah
so
yeah,
so
name
new
name,
because
these
these
people
are
not
team,
peter
I'm
making
a
property
for
if
I
was
able
to
ping
the
machine,
because
if
I
got
no
results
and
I'd,
if
I
can
win
rm
to
it,
then
I'm
going
to
note
that
because
then,
if
these
guys
are
empty,
then
I
know
it's
not
a
failure.
B
B
B
B
So
my
resulting
set
is
going
to
tell
me
what
machines
I
could
reach
over
the
network,
which
ones
I
could
actually
touch
and
then
which,
if
any,
have
got,
which
version
which
ones
need
remediation,
which
ones
are
in
great
shape.
Right
now,
and
this
code
is
on
my
github
also.
I
just
threw
this
up
there
as
a
as
an
example.
B
I
think
that
was
unless
you
want
to
talk
about
that
more
which
I'm
I'm
down
for,
but
I
think
that's
kind
of
it
for
it.
What
one
thing
I
like
to
do,
but
it's
a
little
hard,
is
to
record
as
you
go,
let's
say:
you've
got.
You
are
looking
at
a
thousand
machines
and
you're,
maybe
getting
a
flat
set
of
results.
A
Is
I've
written
I've
used
one
script
block
to
actually
dump
the
file,
dump
the
data
to
an
xml
file
or
to
an
object
which
then
gets
written
to
a
client
xml
onto
the
local
machine,
and
then
I
have
another
script
block
that
goes
back
behind
it
and
then
goes
and
gets
that
data.
So
if
the
script
is
running
for
a
long
long
period
of
time
and
and
could
potentially
error
out-
and
I
don't
want
to
wait
for
it-
I
just
want
to
get
the
data
when
it's
there
and
when
it's
not
there.
A
A
The
entire
contents
of
the
entire
c
drive
like
give
me
all
the
files
on
the
c
drive
and
that
takes
hours
to
run,
but
I
didn't
want
to
wait
for
every
single
machine,
and
so
I
ran
it
on
the
road
local
in
the
remote
machine
and
I
just
dumped
all
that
data
to
a
file.
And
then
I
go
got
the
file
when
the
file
was
complete,
yeah,
so
just
a
trick.
B
B
So
it
takes
a
change
request
to
reboot
a
server
generally,
so
we'll
let
that
happen.
Another
thing:
that's
kind
of
cool
is.
B
B
B
B
I
was.
I
was
casting
the
string.
I
was
expecting
as
a
date.
I
was
apparently
getting
a
error
code
of
one
which
I
was
then
passing
into
turning
into
date,
time,
which,
if
you
want,
we
can
do
that
real.
B
Quick,
so
that's
where
you
know
I
was
getting
all
these
machines
that
were
showing
that
they
were
2020
something
years
old
or
that
they
had
been
acting,
and
we
were.
My
boss
was
a
little
concerned
that
my
dates
were
that
screwed
up
on
a
package
I
wrote
so
had
I
handled
that
error
better.
I
wouldn't
have
gotten
skoofy
dates.
B
I
think
that
I
think
that's
all
I
got.
I
can
try
and
talk
about
some
more
things
if
you
want
what's
up.
A
Oh,
that
was
good.
I
actually,
I
think
I
got
a
couple
good,
you
know
tidbits
out
of
it
and
I
certainly
want
to
know
some.
Some
people
were
in
the
chat.
You
know
mentioning
some
things,
and
so
I
think
we
could
all
got
got
at
least
a
little
bit
something
out
of
it
and
that's
really
always
a
good
thing.
At
least
that's
the
the
value
of
why
we
come
to
these
groups,
and
we,
you
know
the
value
is
getting
content
out
of
it.
You
know
we're.
A
A
So
you
know
we
certainly
want
to
open
up
the
mics
and
if
you
have
a
question
or
if
you
want
to
mention
anything
or
at
least
think
of
anything
that
even
you
know,
maybe
david
hasn't
mentioned,
or
even
things
that
you
want
to
think
that
were
valuable
to
you
or
you
might
want
to
you
know,
steal,
slash,
borrow
slash,
you
know,
pilfer,
you
know
feel
free
to
mention
that
as
well.
So
I
think
you
did
a
good
job
david.
I
appreciate
your
coming
to
the
group
and
sharing.
A
Unless
anybody
has
any
questions
so
we'll
give
it
a
couple
seconds
feel
free
to
open
up
the
mics.
If
you
want
to
ask
any
questions,
if
there
are
no
other
questions
that
david
can
answer,
then
certainly
we
can
stop
recording.
C
I
have
a
something
I
want
to
share.
That's
it's
not
a
question
for
david,
but
so
I
have
been
coming
around
to
the
idea
of
invoke
command
more
and
more
and
relying
on
real
remoting,
because
when
you
do
that
you
actually
change
the
way
you
write
code
and
what
I
mean
by
that
is
I
find
myself
when
you
write
functions
or
write
tools.
C
You
know
when
you,
when
you
start
out
and
you
build
a
tool.
Maybe
you
start
out
writing
a
tool
and
you
write
some
query
to
be
able
to
grab
information,
and
then
you
have
to
say
well.
How
am
I
going
to
do
that?
If
I
want
to
do
it
for
multiple
machines
and
maybe
maybe
a
command
has
a
parameter
for
a
computer
name
or
something
like
that.
But,
generally
speaking,
when
you
do
that,
you
end
up
in
some
sort
of
loop.
You
know
where
you
do
test
connection.
C
C
You
figure
out
how
to
get
to
all
these
machines
now.
There's
the
whole
idea
of
testing
and
making
sure
connections
are
alive.
That's
a
different
story,
but
you've
taken
away
this
idea
that
test
and
machine
it's
on
run,
go
to
the
next
machine
and
go
down
the
list
iteratively.
So
I
have
been
writing
my
code.
C
That
way
where
I
write
a
block
of
code
and
then
I
pass
that
block
to
an
invoke
command,
even
if
that's
going
to
run
against
the
local
machine
and
the
cool
thing
about
that
that
I
find
that
I
didn't
appreciate
in
the
beginning
was
a
lot
of
times
when
you
output,
something
and
you
have
to
format
your
output
and
you
need
to
take
into
a
into
into
account
for
that
remote
machine
name.
How
do
I
get
that
into
my
output?
C
C
Now,
if
you
run
it
against
two
machines,
and
one
of
them
is
remote.
Invoke
command
is
automatically
going
to
append
on
the
ps
computer
name
variable
for
you,
so
it
just.
I
just
find
it
makes
it
easier
to
write
code
and
the
code
that
I
write
runs
more
efficiently,
because
I've
eliminated
all
the
tools
that
I
would
normally
use
to
connect
to
a
machine
and
try
to
connect
to
a
bunch
of
machines,
because
I'm
not
really
doing
it.
The
most
efficient
way.
A
B
B
All
my
talk
about
not
making
a
wmi
call
twice
anytime
in
that
presentation
that
I
wanted
last
last
boot
time
I
was
making
another
call,
instead
of
getting
it
from
an
existing
object,
which
I
should
have
been
doing
but
yeah,
I
think
it
I
think,
thinking
in
script
blocks
makes
you
a
little
more
efficient
or
it
helps
you
get
there.
A
Yeah-
and
I
think
one
of
the
other
things
is
that
some
people
were
mentioning
in
the
in
the
chat,
was
the
idea
of
arguments.
So
if
you
kind
of
look
like
what
mike
was
saying,
is
the
idea
that
hey
you
can
do
your
testing?
You
can
do
your
you
know
like
building
of
your
script
block
itself
by
working
with
your
own
local
machine,
so
you
have
a
local
machine,
so
I
want
to
build
this
script.
A
I
want
to
run
it
a
couple
times,
I'm
getting
the
data
I'm
looking
for,
but
if
you
do
all
that
data
and
you're
getting
it
in
the
form
that
it,
you
can
then
pass
in
variables,
but
you
can
work
with
your
local
computer
and
you
can
do
that.
So
that
is
one
of
the
things
that
that
is
valuable
is
to
pass
in
actual
arguments
into
your
script
blocks
themselves,
and
so
there
I
don't
think
you
mentioned
it.
I
didn't
really
see
it.
I
was
waiting
for
it,
but
there
is
a
specific
argument.
A
Type
is
called
using
is
you
can
pass
in
using-
or
at
least
you
can
use
the
using
and
pass
it
back
up?
The
other
way,
so
there
is
a
thing
to
play
with
that
game,
so
it's
certainly
interesting
and
can
be
used,
and
once
you
start
thinking
in
that
scale
it
once
you
think
in
that
mode
of
scripting.
In
that
fashion,
here's
my
script
block.
Here's
my
my
code,
I'm
going
to
pass
it
to
the
remote
computer.
A
B
And-
and
I
and
I
didn't
get
into
using-
because
I'm
not
very
good
with
it,
but
and-
and
I
also
didn't
mention
that,
if
I
say
x,
equals
three
outside
the
script
block
and
then
I
try
calling
x
within
the
script
block
that
doesn't
work,
especially
on
a
rope
machine.
You
did.
A
B
Job
that
would
be
where
using
would
come
in
right
or
an
argument
list.
A
You
know
some
of
those
nuances
in
which
playing
with
other
parameters
and
other
arguments
and
passing
in
data
and
passing
out
data
and
deserialized
and
serialized,
and
all
that
fun
stuff
and
that
that
is
another
rabbit
hole
that
we
don't
need
to
go
down,
but
to
know
that
it's
out
there.
This
is,
if
you're
you're
working
with
these
kind
of
problems
and
you're
going.
Why
am
I
not
getting
the
data
I'm
looking
for?
Why?
A
How
do
I
get
this
kind
of
data
well
know
that
it
is
possible,
so
feel
free
assured
be
assured
that
it
is
possible,
but
it's
just
this
is
how
you
do
it
there.
There's
just
you've
got
to
go
down
a
different
road.
We're
not
a
different
road
but
go
down
that
road
you'll
find
the
answer
and
come
back
and
continue.
C
On
all
right,
so
what
I'm
going
to
do
here
is
we're
going
to
say.
First
of
all,
let's
say
thank
you
to
david
for
presenting
tonight.
I
think
you
did
a
great
job
david.
Thank
you
for
sharing
the
information
with
us.
You
did
an
thanks
job
and
it
looks
like
we've
hit
a
little
bit
of
lull
here
in
the
question,
so
I'm
going
to
stop
our
recording.