In this Nugget, we're going to be talking about configuring
Server Core.
This is really a very simple Nugget, and I just have one
white board.
So I have an introductory white board other than what we
see right here.
We'll just get right into configuring Server Core.
Let's take a look here at configuring Server Core.
Now, I mentioned in a previous Nugget, but I don't want to
extrapolate too terribly much on Core by itself, only
because a lot of what we do there is really just
PowerShell.
And anything that I show you on a full edition of 2012 will
also apply to the Core edition of 2012, unless that
commandlet has something to do with the full GUI.
So otherwise, it will all still apply either away.
And many of the commands may be available for you up there
on that PowerShell cheat sheet that I mentioned previously.
Also, some of the other commands you can use and some
of the other aliases, let's take a look at that.
What's, first of all, an alias?
Well, this is what gives us basically the functionality of
a command prompt.
So if we're at a PowerShell prompt--
let's say if I go down here to the quick launch area and I
just launch Windows PowerShell--
then I can type, of course, PowerShell
commandlets in here.
But also, notice that I can do things such a simple command
prompt items that I would have normally had from a cmd.exe.
What's an example?
How about dir?
That's just a directory listing, right?
Well, that's not a PowerShell commandlet.
It's an alias, though, that kind that points back to the
command prompt functionality, and it still gives me a good
result with that.
So most of things you can do in a command prompt, you can
still do in a PowerShell console through aliases.
And you don't need to know anything else special or
elaborate to be able to use them.
It's just that it does that for you.
Anything you already know about command prompt commands
you can still do in a PowerShell window.
Also, there's other commands.
And this is just a couple of examples, for example, the
dism, the deployment image servicing and the management
item that you can use.
I give you some examples of that in the PowerShell cheat
sheet as well.
Even though it's not a PowerShell commandlet, you can
still use that from within a PowerShell
command prompt window.
Then of course, the other thing you could do would be to
use simple remote administration.
You could get through a console, for example.
Or certain PowerShell commands will allow you to enter in the
computer name flag like that.
And then you just enter in whatever the name of the
computer is in here.
And then you can also use something like SConfig, which
I really like.
It actually debuted with Server 2008 R2.
And it's a great way to configure core machines.
Let's go ahead and take a look here first of all, though, at
a little bit of background on how I'm going to
show this to you.
This is a physical computer that we're looking at.
And this is my Hyper-V host computer.
You could see here that I've got a few Hyper-V items
running inside of this.
One of them is DC Nugget 1, which I'm going to make a
domain controller in an upcoming Nugget here.
And then I'm also going to work here, in this case, with
VMC Nugget 02.
This is a baseline configuration of server core
and I have really no configuration at all going on
with this so far.
So it's kind of pretty much right out of the box.
And I'm just going to minimize that background window so as
to be a little less distracting.
Now, how would I go ahead and configure this?
Well, there are a few ways of doing this.
And I want to point out first of all that I do have a
document available for you here.
And it's called "Server Core Configuration," and it's a PDF
for you available up on nuggetlab.com.
There's a lot of guidance here in the beginning, which I
won't elaborate on right now, but you can
take a look at that.
And then, here I'm just going to show you some things, such
as how to configure some of the basic properties.
And you can do this using NetShell.
Now of course, there might be other tools you can use well.
Nevertheless, even on a core installation that has
PowerShell, NetShell seems to still be the
preferred method here.
So how would I do this if I wanted to configure a static
IP address?
Well, the first thing I need to know is to know what the
interfaces are.
So I do a "netsh interface ipv4," which is still the
predominant version of IP that we're using here, and then
"show interfaces."
And then what that tells me is really the key
here being the index.
So I can use the index.
Or for certain other things, I can use something called just
whatever the name is.
Notice that it used to say "local area network" used to
be the name.
Now Microsoft has gratefully shortened that to just
"ethernet" in this case.
So what I would do here next is if I wanted to set a static
IP address for this machine, is I would just to
enter that in this--
or actually first, let me show you my IP configuration.
I'll do an "ip config all." And you can see that as I go
back up here my ethernet adapter, that it does have a
current IP address, but it's just issued
by DHCP server here.
And I don't really have a DNS server other than this one
configured right here.
But if I wanted to set any of that up statically, I would
have to do something different here.
Now, we already learned from our previous command here that
we are on our index 12, and it's the ethernet is the name.
So knowing that, I can enter in a NetShell command to set
up a static IP address like this.
And I just went ahead and paused recording and typed all
it in, as you can see.
But I would just use "netsh," and then "interface" is going
to be going to IP version 4.
That's what I'm trying to configure.
I'm going to set the address, and then the "name=ethernet,"
which you can see up here is ethernet.
You can also use "index=" and do an "index=12," but I just
did "name=ethernet."
"source=static address," and it wraps around, so you just
kind of have to look at the word as it wraps around here.
And then address, this is a static IP address I want,
10.10.10.82, and a subnet mask of a class C subnet mask.
Then I want a gateway address of 10.10.10.1.
Notice that in this configuration, there's no DNS
configuration.
You do that later.
So I'll go ahead and press Enter.
Now I'll do an "ip config all," and we can now see that
we have 10.10.10.82, and with a class C subnet
mask, and so on.
We could also do, again, the DNS server if I needed to,
which I'll do shortly.
Oh, I almost forgot, here's the default gateway, which I
also specified in that previous command.
Then in order to configure the DNS server's IP address on
this local client, I would enter in "netsh." And you
could type "interface," but you can also abbreviate that
one. "int" is sufficient.
I've gotten too lazy to put all the typing, so I
abbreviated.
Then "ipv4 and dnsserver name=," again, "ethernet." And
then this time, address is going to be the IP address of
my DNS server.
And "index=1" simply identifies that I want to make
it the primary DNS server.
This is not index as in what we took a look at earlier when
we saw that the local adapter was index 12.
That's not relating to the same thing.
This simply specifies that I want that to
be my primary server.
Then we press Enter.
And then know if I do an "ip config all," we see that we do
indeed have the DNS server at 10.10.10.71.
So using NetShell, you can configure your IP properties
as necessary.
And we also want to do some other things, such as changing
the computer name.
Because Windows by default will just install the computer
with a strange convoluted name.
You'll see what I mean in a moment.
First thing we want to do is to identify what the existing
name of the computer is.
And we can't really right click on My Computer and
choose properties to find that out, because obviously there's
nothing to right click on.
So we could do it a few other ways, and "ip config all" will
show that to us.
If we just go up here, we'll see that there's the name of
the computer there.
There's the host name.
But there's also a lot of other data we don't really
need to see.
We could also use "set," which shows us a lot of environment
variables for this system, plus the computer name, right
here again.
Or we could just do "host name," which gives you just
the host name.
That's probably the plainest of all of those.
But you can see how Microsoft has kind of named it some
convoluted name there.
I don't know why they do that, but I guess
they have to do something.
So let's go ahead and clear the screen here and figure out
how we would rename the computer, in this case, by
using then the "netdom" command.
So in order to rename the computer, here's how I would
use that-- "netdom," then "renamecomputer." And you
could do other things with netdom as well, such as
joining a domain--
but "renamecomputer," and then "%computername%." Now, why am
I doing that?
Because I already forgot the name of this computer.
It so convoluted, I didn't want to have to think of it.
I actually waste brain cells thinking about it anyway,
because I'm renaming the computer anyhow, and it
wouldn't matter.
So I'm just doing a variable of "%computername%," which
means that whatever the name of the computer is, we're
going to rename it to a new name here, a "VMCNugget02
/userd," and then this would be the name of the user
credentials that we're implementing here.
And then we could also do a password, then a colon, and
then that password if we wanted to.
However, I'm not going to do that in this case, because if
you do that, you to type it in in plain text.
If we leave off the actual password, then it
prompts us for it.
And then it's "reboot:0," meaning reboot in 0 seconds,
so that will accept that new computer name.
Because as you know, anytime you rename a computer, you do
have to restart it in order for that to take.
So that having been done, I'm going to go ahead and press
Enter here.
Oops, except I see a made a mistake.
Let's go back over here.
There's no space after "userd."
OK, so I'll press Enter here, and then it says, do you want
to proceed?
It's telling me that some services such as a CA, or
certification authority, would depend upon a
fixed machine name.
So if this was a CA, that would really cause a
problem with that.
It's not, so I'm just going to press Y and Enter.
And now we can see that it has gone ahead and restart.
And then once we've renamed the computer and it's
restarted here, we can use "netdom" to join the computer.
Again, you can specify the computer name or enter in the
variable, like you see here.
And then "/domain," the name of the domain--
you can also just put in "nuggetlab" here, or the flat
name of the domain, as opposed to the fully qualified domain
name, as in .com here--
and then "/userd," and then "Administrator" in my case,
but whoever has the privileges to be able to join this
computer to the domain, and then "/password." And then if
you don't enter a password there, it will
prompt you as well.
Then the reboot.
This is actually the number of seconds, by the
way, for the reboot.
So you can give it a few seconds, or if you just
entered a 0 there, then it would reboot immediately.
Now, I don't actually have this domain up and running
yet, so it's not going to give me anything if I press Enter.
I think it will just bark at me.
Yeah, it says the domain doesn't
actually exist, as I mentioned.
But if you do have one, then, of course, it will then join
it at that point.
The next thing I might want to do would be to create a user
account, because by default, I've only got the local
administrator account.
I usually use the trainer account for all my
demonstrations.
So I might want to add that account and log on with it.
And of course, you'll want to add yours as well
for your own purposes.
So I would just doing a "net user," and then the name of
the user, "trainer" in this case, and "/add." Also,
there's nothing you can do here, so I just an asterisk.
It'll prompt me for the password.
Otherwise, it will not assign a password, and I'll have to
change it at the first log-on.
So I'll enter in a password and confirm that.
You can't really see what I'm typing, of course, because it
doesn't show it on the screen.
But I entered and confirmed that password.
And then the next thing I probably need to do is to add
it to the local administrators group, in this case.
Or, of course, you would add your account to whichever
group was interesting to you.
But I would do a "net localgroup," and then the name
of the group I'm interested in adding it to, and that would
be "Administrators." I think I typed that right.
And then the name of the--
that I want to add is what I want to do here.
So I want to add to, and then I'm going to enter in the name
of the account, being "Trainer."
Now, if I do a "net user trainer," without any other
options here, except for typing correctly, then we'll
see that I'm been able to confirm that I have indeed
added to the local Administrators security group,
as well as it's already by default
anyway member of Users.
But we see we're successful in creating this account now.
Now, the next thing I want to show you here is SConfig.
And this is something I really, really like for
configuring these servers.
Let me go back and close the console there.
And then, let me go back to this VMC Nugget 02.
And I'm going to go back to the baseline, which has no
configuration to it.
So I'm going to right click on this and choose Apply.
Now, what am I doing when I do this, by clicking Apply here?
What happens is, it started off this way.
And then time went by, and I was configuring this, and I
was configuring that, and I changed the IP address, and I
changed the computer name, and so on.
Well, I can go back to a previous point in time.
That's my baseline here.
I recommend that you create a baseline of your virtual
machines, so that if you need to get back to a known good
situation with that machine, then you can do so.
This has no configuration of any kind on it.
And now I'm going to go ahead and just actually start this
virtual machine.
So I'll go over here and click Start, and then I'll go ahead
and open it up.
Now, the next thing I want to show you, though, while this
is happening, is I want to talk to about how we can use
SConfig to more easily configure your servers.
This is just a message saying that although I clicked in the
window, the mouse driver hadn't loaded yet, and so it
didn't really do anything for me at that point.
All right, so now I've rebooted this computer.
And if I do a few things here, like a "hostname," you'll see
that it's back to whatever the default name was that it came
up with when it renamed this during installation.
And then I do an "ipconfig." You see I've got just my old
DHCP assigned IP address there.
So there's nothing configured on this machine.
But one of the coolest tools you can use besides NetShell
and Netdom and others would be to use SConfig.
This actually came out with Server 2008 R2.
And it does a lot of the same things.
It's just that it does it through a menu system, which
is much easier to work with.
For example, the computer name item here, let's start with
that one, number two.
So press the number 2 and press Enter.
And then it asks you for the new computer name, which I
want to be "VMCNugget02," and press Enter.
It says you must restart.
Do you want to do this now?
No, I don't want to do that now.
How about joining it to a domain or work group?
I'll enter in 1 to join it to a domain.
I'll press D for domain, the name of the domain.
It may bark at me because I don't actually have that
domain yet.
But I would specify the name of the domain and the user,
and the password, if it's associated,
something like this.
And then as I said, it doesn't actually have that domain up
and running yet.
We're going to do that in an upcoming Nugget.
Then what we would do here is we can also configure remote
management.
Now, I actually did do that configuration so that I could
show some things remotely, just in case I wanted to.
But if I didn't, I could choose number 4, and then
choose enable, disable, or configure the
server response to ping.
Now, this is something that's actually pretty interesting.
Let me show you what I mean by that.
Let me open up a command prompt in
another machine here.
I'm going to drag the command prompt over here.
This is actually command prompt from
my Windows 7 computer.
But if I try to ping 10.10.10.40 right now, I'm not
going to get anything.
Now, we know that the IP address of this machine over
here is .40, because we saw that earlier.
So why am I not getting a ping response back?
If you're not familiar with ping, it's a good way to test
network connectivity to a destination.
This would fool me into thinking--
just by looking at this, this would fool me into thinking,
oh no, that machine's down, because I'm not getting any
answers back.
But what we can do is to enable it to respond to ping,
because right now, the firewall
actually prevents that.
So I can configure response to ping, allow machine to ping
this server, yes.
Now when I go back up here, I can run this again.
And now we can see that we can get replies back to it.
So it's a great way to test it, not a lot of security
vulnerability in allowing ping, unless you are concerned
about getting a flurry of pings in some kind of a denial
of service attack.
But there's a lot of things in place nowadays, both in
networking equipment, as well as the operating system, that
can detect that kind of an attack, and stop it short.
OK, let's see what else we've got.
I'm going to return to the main menu by
pressing number 4.
And I think you can probably figure out how to use this
whole interface, so I'm not going to elaborate an awful
lot on it, other than to also point you to Network
Settings, number 8.
And you can see here that my IP address is now 10.10.10.40.
And I can select the network adapter, which would be number
10, to change that.
You can see that was 10, because that's what
I entered in here.
And then what I would want to do now is to set the network
adapter address.
And I could set it up as a static address, in 10.10.10.--
oh, I don't even remember what I gave this one--
82, maybe, something like that--
and then my subnet mask, class C subnet mask.
We'll talk more about IP addresses and subnet masks and
default gateways and things like that at a later point in
time, but just in brief this home identified on the network
by IP address.
This is something that will help to identify which network
segment I'm on.
This will configure where network traffic goes when I'm
trying to find a host that's not on my own same network.
And then that's pretty much it for that part.
The next thing I could do then is to set the DNS server.
Of course, we want to do that as well.
So I'll enter in the new preferred DNS server.
And that will just be an IP address, 10.10.10.--
I think I have one at 70.
So then it tells me my preferred DNS server is set.
And if I have an alternate, I can do that as well.
So I'll enter in the alternate DNS server.
And that's pretty much it.
Now what I could do is just return to the main menu.
And I could actually then exit this as well, so I'll get to a
command line, and I'll do an "ip config all." And we'll see
that we were able to successfully configure all of
those things-- the DNS, the subnet mask, the IP address,
the default gateway, all those things.
The name of the host has not changed yet, because I haven't
rebooted it.
But otherwise, using SConfig is a great
way to go, very intuitive.
You don't have to worry about typos for the most part.
And I strongly recommend it for new configurations of your
core machine.
I talked to you in previous times here about remotely
connecting to a core machine using the MMC console.
This can be done through Remote Server Administration
Tools in Windows 8, or in Windows Server 2012 from a
full GUI machine.
But I need to open up the firewall in order to allow
that to happen.
Otherwise, the firewall that's turned on by default will
block the request to remotely administer.
So here's what I would do.
I would do a "netsh advfirewall firewall set rule
group=," quotations "remote administration"--
quotes because of the space there--
and then "new enable=yes." So that's how we
would enable that.
Now, I'm not going to actually turn that one on quite yet,
but I do want to show you another thing you might want
to do in some instances.
This would be the case if, number one, you have a third
party firewall--
software firewall--
that you're using instead of Microsoft's own firewall.
Normally, when you install those, it will disable the
Microsoft firewall, and it will enable its own firewall.
But if for some reason the Microsoft firewall has gotten
turned back on again, then it could cause a conflict and
some problems by having two firewalls on simultaneously.
So I might want to disable the Windows
Firewall for that reason.
The other one would be, maybe you're in an initial
configuration state, kind of like how we are right here,
and we need to do a lot of things that use kind of weird
ports over the network or something like that, maybe to
install some network applications, stuff like that.
Well, if that's the case, you might want to just disable the
firewall entirely, only temporarily, and only if
you're in a secure environment.
Maybe I have a hardware firewall that already serves
that purpose for me for the firewall.
So in those types of situations, you could do a
"netsh," and then an "advfirewall." And then "set
allprofiles state," and then "off." And then we would have
disabled the firewall.
Now, let me show you how I could take advantage of that
now by remote administration.
So for example, here I'm remotely connected to--
actually, I'm locally connected to Computer
Management.
But I want to be remotely connected, by connecting to
another computer with a right click here.
And then I would just enter in the IP address of that host,
10.10.10.82.
And now you can see I'm remotely connected to all of
those tools, and then could do whatever I needed to, whether
it's to adjust disk space, or look at event logs, or
something like that.
And then one other thing you could do here is if you want
to reset everything back to the initial configurations.
Kind of tough to follow what's going on in the firewall if
you're working strictly from a command prompt here.
So if you need to reset everything, you can do a
"netsh advfirewall"--
it must be getting late.
My typing skills are going all down south here.
So "netsh advfirewall reset," and then we're OK again.
So that should take us back to the
out-of-the-box firewall settings.
In this Nugget, we talked about configuring Server Core.
Now, this is a very important Nugget, because a lot of your
servers right now are going to be Server Core machines.
So you need to know how to administer them and how to
remotely administer them.
We showed you how to configure them locally using a command
prompt or SConfig.
And we also took a look at other things, such as opening
up the firewall, since you could use remote consoles.
Well, I hope this has been informative for you, and I'd
like to thank you for viewing.