I'm going to create all the components that are needed
in order to make an answer file.
So I'm in my Windows 2022 server, and I'm going to open up a web
browser, and I'm going to go to this particular site.
You can just do a search for Windows ADK.
The ADK is the Windows Assessment and Deployment Kit. It has a lot
of different features and uses that we can have for our Windows
Server, as well as our Windows clients.
I'm going to go ahead and choose to install, and here's the
option for the ADK for Windows Server 2022.
The answer file is going to give us a comprehensive list of things
that we can answer beforehand, so we don't have to make these changes
during the actual installation itself.
And we can even do some additional things such as creating specific‑sized
format drives and hundreds of other options to automate our installation of
Windows Server 2022, as well as any other version of Windows. My download is
complete, so I'll go ahead and run the ADK setup.
This is a very large set of utilities, and you don't need
to install all the different options.
We're just going to work on the deployment tools.
I'm going to choose the default path and click Next.
You can choose whether or not for Microsoft to make a collection
of information, accept the license, and here's where we can
uncheck a lot of these options here.
It's just going to take up a lot of space, and we're just not going to be
using them all. Click Install, and I'll click Close.
Now I'll go to the Start menu, and I want to choose the Windows System Image
Manager, and that's how we can create our answer file.
I also want to make sure that we have mounted the Windows ISO
file as a DVD, or if you have a DVD player,
you can just go ahead and mount that.
And I'm going to choose to open it, and I'm going to go to the
sources folder, and I need one of the files that are in the sources
folder, and it'll be called install.wim, and there's my file. I'm
just going to right‑click and copy it.
I'm going to go back to my C drive and create a new folder.
I'm just going to call it wim, but you can call it anything that you'd like.
And I'm going to right‑click and choose to paste it in there.
It's a fairly large file, so it may take a minute.
The Windows System Image Manager program is going to need this install.wim
file in order to create a config file where we're going to create our answer
file. Although it sounds fairly complicated,
it's actually pretty easy.
So when we go through all these different steps,
you'll see how we can customize. Our install.wim file is located safely in
our wim folder, so now what we're going to do is we're going to go in the
lower‑left corner where it says Windows Image,
right‑click and choose to select a Windows image.
And now what I'm going to do is I'm going to browse to that
location and pick my install.wim file.
So I'll go to this PC, scroll down,
choose the C drive, the wim folder, and the wim file.
Now I have several different images on this particular file, so you want to pick
the one that works for you. I don't want to choose the core version because
that's going to just come up with a command prompt.
I want to choose the one that doesn't say core.
That's going to give me the graphical user
interface that we're seeing right now.
So I'll click OK, and it says that a catalog file has not been created yet.
Do you want to create it?
Yes, I do.
Now this can take a couple of minutes.
Once it's done,
we're going to see information off to the left‑hand side
that will help us create our answer file.
The configuration file is complete.
If I go back to my wim folder,
we can see the config file here. And you can copy this to another
location if you don't want this one changed in any way, so that way
you can use it again in the future because it does take a while to
create that configuration file.
Now what we need to do is create a new answer file.
So I'll go up to File, New Answer File, and there's my answer file.
So what this is going to be is the autounattend.xml file,
which will be our answer file that will drop in the
root of an installation folder.
So we're going to use these components and packages on the left‑hand side
to copy into the components on the right‑hand side.
I'm going to expand Components, and we don't need all of these different things.
What I'm going to choose is to look for the Setup one right here. I'm going
to right‑click and choose Add Setting to Pass 1 on windowsPE. There is my
file here at the top. I can expand, and you can see all the different things
that you can change ahead of time.
I'm going to go off to the right after selecting the AMD64 setup, and
take a look. There's already a few things that you can change right
here such as the firewall. We can say, yes,
we want that either enabled or disabled during installation,
so I'll set that to true. Now by default,
it's set to true anyway, but this just gives you an idea of how this works.
So I'll choose the drop‑down on the network and choose to enable that.
We can change the log‑on path, we can go to Restart,
hit the drop‑down there and choose Restart or Shutdown if we
need to. And then there's the UseConfigurationSet as well.
Here's the drop‑down for that.
Now if we go off to the left again, there's lots of
different things that we can set up.
I'm going to choose the user data as an example, and you can
add the product key during installation if you'd like. Or if
you just click on UserData,
you can choose to automatically accept the end user license agreement.
That can be helpful.
You can put in your full name here if you'd like, and that will enter it
during the installation, and you can put in your organization.
Next, I'm going to go down to where it says
WindowsDeploymentServices and choose Login and then Credentials.
Now under Credentials, I can go ahead and automatically join a
domain and put in a username and a password as well.
So under the domain, I'll just call it ps.int, and for the
password, I'll go ahead and put that in.
Pretty simple, but it does meet the minimum requirements, and
I'll put in the username is going to be administrator. On the
lower left‑hand side, I'm going to go back, and I'm going to
this time expand Packages.
There's all different types of packages that we can add in, as well as products,
security updates, all these different things.
I'm going to choose the updates.
I'll choose the package for the DotNetRollup as an example.
I'll right‑click, and I'll choose Add to Answer File, and we can see
it shows up under Packages. And on the right‑hand side, we can
change only one thing here, the primary source path. And there's
nothing here under Update itself.
So, this particular one doesn't have a lot of options, but it will
automatically install that package for me. Now that all the different
components and packages have been set the way I want them, I'm going to go up
to where it says File, and I'm going to choose Save Answer File As. Now, I'm
going to put this into the same folder. You can put it anywhere you want just
to start with. And I'll put it in my wim so I can find it more easily, and I
need to call it Autounattend, and it's got to be a .xml file, which it's going
to be by default.
If it's called anything different than autoattend.xml, it will not work as an
answer file, so we have to call it that. I'll click Save, and now I'm going to
go down to my folder, and there's my Autounattend XML. I'm going to
right‑click and choose Edit, and here we can see all the different changes
that we made to this particular file.
The next step would be to drop this in the root of any installation
folder, and we can add this to a custom image using Windows deployment
server, or we can copy it to the root of a USB bootable Windows installation drive and install it right from there.