[electronic tones]
>>Ooh!
>>So we're gonna level with you today.
A lot of IT work is repetitive.
It's not necessarily the clicks
or it's not necessarily key strokes,
but it's this task that you do over and over again.
>>Right, okay, so password resets every day
router re-configs every day
flushing application pools, you know,
it comes down to a lot of the same stuff, different day.
>>Yeah, and that's why when we find a tool
or a trick or something that we really, really like
that helps kinda shorten that time
that we take to do these things over and over again,
we make sure we get that
and we put it into our constant toolbox
we install it on all the computers we use,
or we carry it on our tool belt with us.
>>Right, okay, so the IT life hack series that we're doing
is our effort to share some of those tricks
that we've discovered with you
so you can benefit from them also.
>>And today on the agenda,
we're gonna be talking about something
where I started my career,
and that is systems administration.
>>Same here.
So I think the first place I want to start
is the command line.
I think this is one of those foundational life hacks
that SysAdmins come to on their own time.
But get used to living and being comfortable
at the command line.
It's gonna save you time,
it's gonna lead into your ability to automate things.
All that stuff.
>>Mhmm, and when you really think about the command line,
there's some kind of shortcuts that apply to
pretty much whatever shell you're working with.
>>Yes!
>>And those are going to be, they sound like simple commands
and things you may not be aware of,
and they save so much time.
The first and easiest one
is probably up arrow.
Up arrow- >>Yeah!
>>will cycle through your history.
So if you have a bunch of stuff happening
and you're doing all kinds of things,
it doesn't matter what it is,
and then you're like, oh, I needed that thing
you can just up, up
and do it again.
>>Well, and I also think, for SysAdmins,
you know, I typed that command.
I typed it five minutes ago, like,
why do I have to type it again?
You don't have to type it again.
>>You might have to hit up three or four times,
or maybe longer,
but it's still easier than doing it again
over and over again. >>Right.
>>This is all about what we can do to shortcut things.
The other one that has to do with that
has to do with tab completion.
So most modern shells have some type of tab completion.
So if you don't necessarily know where you need to go,
or you remember it was this
but you have a directory list
and it's you know, roll scroll off the screen
and maybe you need to go into that directory,
it can be as easy as just cd, D,
and then you can tab
and is that the one you want?
No, that's not the one you want.
You want the next one, so you hit tab again.
Oh, no, I need the one after that,
so you hit tab again,
and it just cycles through all of them.
And different shells do this slightly differently,
but tab completion will save you a world of time.
Especially not just for directory management
but if you remember that executable started with something
>>Uh-huh.
>>but you can't remember what it is
you can tab, tab, tab
and get the list of them.
>>Exactly, and closely related
to tab completion is wildcards.
Now, most people are comfortable
or familiar with wildcards
for file names, right?
You know, cd, you know,
or copy start at start, or whatever.
However, you can also do that in command.
So for example here,
if I want to go to the sw files directory,
I can type cd sw*.
Now that's not gonna work because I have several things
and we can see that with that tab completion.
I have a few different options.
But what I can do is go to the thing
to the point where it couldn't be anything else.
>>Where the delta begins.
>>And at that point, when I use *,
it's just gonna take me right there.
So that's another quick shortcut.
Pivoting from command line-fu,
I think that one command
that you need to get comfortable with in Windows
is the net command, and specifically net use
where you map drives.
Get comfortable knowing how to list out
the drives that you have
map the drives, because that's gonna lead into
profile scripts, any kind of automation that you're doing.
>>Mhmm, and that's something that can be repeated
over and over again
and even better, once you script it out
if you put it in a profile script,
you're not running it over and over again
you're asking the operating system to do it on your behalf.
>>Right.
>>Which is just so much better.
Related to that is netsh.
>>Yeah.
>>Netsh is huge and deep
and gets into a million things,
mostly around the network configuration in your environment.
There's probably a small handful of commands
you just want to kinda have in either Notepad
or OneNote, or somewhere where you kinda
can quickly access them.
Just have them kinda in the back of your mind
that oh, I need this thing
you can probably get it out with netsh.
>>Perfect, okay, and you had a trick
for people who have VPN
and the VPN gets out of sync with the domain
and the local account and things like that.
So, let's wrap up this section with that.
>>Sure, so what we ended up doing,
I ended up doing this a lot,
is I would change my password while I was on VPN
and the corporate VPN and active directory
got the password change, great.
And then I would shut down, reboot my computer
turn it back on the following day,
go to log in with the new password
and it's not taking it.
It will take my old one
but it won't take my new one.
So I'm like, that's not good
'cause then all of my programs
are gonna try to use my old one
'cause that's what I logged in with.
So the way you actually get around that
is you do get on the VPN and use your old password to get on
then connect your VPN, use your new password
and then run a simple command.
And just open up the command prompt
and do runas, now this is a,
it's a slightly advanced one
but all you do is give it runas,
USER, and then the domain you're working with.
And then the name of the user account
and then any executable.
And for me, I would just normally do command prompt again,
and once you do that, it will prompt you for the password.
This is your new password.
>>Mhmm.
>>And you'll see that it opens up a new window
and says, "You are currently running this
as that account."
And what that has done is that has forced
your local Windows creds to be synchronized
with that new account.
So next time you reboot
you should be able to log in with your new password.
And since system administrators
don't kind of do their job in a closed bubble,
you have to work with other teams,
and a lot of the questions you get
when you talk to people, like, in networking teams
is like, where do I put various servers and services?
And the big one is always,
where do I put my DHCP servers?
>>Right, and the first thing is
well do I put it on the router,
do I put it on a Linux box,
do I put it on part of Windows Active Directory?
Some third-party, you know, DHCP service or whatever.
That's one, but I don't think
that's the most interesting question.
>>No, that's not the most interesting question.
It's a great question, like, what platform do I want to use?
But the better question is
where does the DHCP server actually live
within your infrastructure?
And for me, historically,
the best practice that I've always heard
is put is as close to the people making the requests,
normally these are workstation computers,
put it as close to them as possible.
Now, if you've got branch office scenarios,
that means you might have a DHCP server
in each of your branch locations.
And we get the conversation all the time
about moving stuff to a data center.
>>Right. >>And that's where
you were going.
>>And the reason for that is just to
be aware that DHCP in its natural state
doesn't jump subnets, so it doesn't cross routers.
Of course, it does.
>>Yeah, it can.
>>And that's what the ip helper concept is for.
But when you're coming across a WAN,
all of a sudden you have to back haul
all sorts of communication, and it's a WAN circuit
so it might go down and whatever,
so you don't want to do that.
There's two fallouts from this.
One, it makes monitoring DHCP tricky
because it doesn't cross routers,
so if your monitoring service,
monitoring system is in your data center,
getting monitoring data of the DHCP services
that are in all those other places can be challenging
which is why IPSLA as a protocol is really interesting,
because that will let you monitor DHCP
in the location it's at.
But the other thing is that having a
manager of managers for DDI, DHCP, DNS, and IP management
is really good, 'cause it will unify those platforms.
You know, it doesn't matter if some of the DHCP servers
are running on a router
and some of them are running on, you know, Active Directory
and some are running on a Linux box or whatever.
And also, if they're in different locations,
it will show you all of those in one place
and let you manage them as a single unified DHCP system
regardless of how distributed it is.
>>Exactly, and that's kinda the key.
We're trying to make everyone's jobs easier,
and sometimes that is just making sure
you can see everything in the same place.
So what I found that a lot of people
will actually have like, a jump box and a data center
or a place where they kind of work on things.
And they'll install the RSAT tools
which are available on Windows,
you can download them as a bundle
and then add them as features.
The problem with that,
is that they typically get bundled and hidden,
and those admin tools are buried all the way down here.
[Leon laughing]
And that's fine, if you like,
you know the MSC shortcuts for it
but no one is gonna remember all of those.
So what I did, is I kinda short-circuited this.
And in my taskbar
created myself a new toolbar.
Browse for the root folder, in this case
it will be the admin tools.
And there they all are, quick and easy access.
>>Nice.
The next tip I want to show
is something that Windows desktop admins
remember pretty easily
but server admins tend to forget.
Which is, first of all, the registry in general.
Yes, it's a thing,
just like command line, get comfortable in the registry.
But second of all, this particular registry hive.
HKEY LOCAL MACHINE or HKEY CURRENT USER,
it does the same thing.
Under software, under Microsoft,
under, all the way down,
Windows, under current version,
da da da!
Is Run.
This is where your startup,
before they added a startup program manager
or whatever it was,
this is how you knew what was gonna start up
on your machine at any given time.
If you have a program that's either misbehaving
or taking up time or memory
or you just don't want it, this is where it's gonna be.
Also RunOnce is where,
if something is supposed to run once and then die
'cause it's supposed to auto-delete but it doesn't,
you can find it there.
And again, you're gonna find that setting
both under HKEY LOCAL MACHINE and HKEY CURRENT USER,
and they can be different.
So that's another life hack about finding
why a system isn't behaving the way you think it should
or why programs are starting and you don't want them to
or things like that.
>>And one of the last things that we want to talk about
or I want to talk about
is how excited I am about Windows Terminal.
I know we talked about command prompt
and DOS prompt and whether you use Bash or all these things,
but Windows Terminal is something new.
It's in the Microsoft store.
And what it does is it basically builds
the shell of your dreams.
Whatever you want to use, if you're like me
and you collect these shells
because you know some Unix, you know some Linux
you know some Windows stuff,
and you want to bring those all together,
you can actually-
>>Shells are the Pokemon of SysAdmins. [laughing]
>>They kind of are, everyone has their favorite,
but they also have five or six
that they work with all the time.
And for me, what I really love about this
is it also supports the Windows Linux subsystem.
So you can actually have in an Ubuntu shell.
And all the Ubuntu commands work.
Or you can have separate PowerShell ones,
like PowerShell seven, oh but stuff only runs here
and PowerShell for Windows, or 5.1
so you can have that one as a separate one.
Over and over again, this is just a great
kinda mini program
and since it does these all in tabs,
and they are completely customizable,
I have not changed it,
but you can set, like, background opacity.
All the stuff you used to do for Terminal and Xterm?
You can do all of that stuff with Windows Terminal.
So if you're the Unix guy turned Windows, give it a look.
So those are just a few of the IT life hacks
that we've collected over the years.
But we'd love to hear from you
and find out which ones you've collected.
>>Meanwhile, you can look
for more IT life hacks coming soon.