dism / get-wiminfo /wimfile:c:\drivers\boot.wim
Dism / Export-Image /SourceImageFile:c:\drivers\boot.wim / SourceIndex: 1 /DestinationImageFile:c:\drivers\boot1.wim
Dism / Export-Image /SourceImageFile:c:\drivers\boot.wim / SourceIndex: 2 /DestinationImageFile:c:\drivers\boot1.wim
dism / get-wiminfo /wimfile:c:\drivers\boot.wim
dism / Mount-Wim /WimFile:c:\drivers\boot.wim / index: 2 / MountDir: c: \ drivers \ mount
dism / image: c: \ drivers \ mount / add-driver / driver: thatC::drivers\lan_drivers\E1C5232.INF »
dism / image: c: \ drivers \ mount / add-driver / driver: "C: \ drivers \ lan_drivers" / recurse / forceunsigned
dism / unmount-wim / mountdir: c: \ drivers \ mount / commit
NET USE y: \\ nmp \ oem \ <folder name> / USER: AD \ *
And enter your password.
! you need to understand what kind of disk it is, for this, using the DIR C command: (D, E, F & etc), iterate through the disks if there are several of them
Next, you need to write the image of the main installation using the ImageX program, located in Windows PE, or on another disk, to a network resource. To do this, enter the following command:e: \ imagex.exe / capture d: y: \ <name> .wim "<name>" / compress fast / verify
Where e: \ - RAM Disk, D: - OS Disc, Y: - network drive. After that, the process of creating and copying the image to the specified network resource will go.
Upon completion of creating an image and copying it to a network share, you must enter the exit command and the application closes and the computer starts to reboot.3.1.1 Manual Deployment
If you need to manually expand the image (without WDS) but over the networkThe system bit must be the same as the system we are unpacking.
After creating an image, you can deploy it to new hardware using ImageX and Windows PE.
We format a disk, for unpacking on it WMI.
To do this, enter the following commands:diskpart
select disk 0
clean
create partition primary size = 100
select partition 1
format fs = ntfs label = "system"
assign letter = c
active
create partition primary
select partition 2
format fs = ntfs QUICK
assign letter = e
exit
You can create a script for this procedure by saving the information in a text file in the image folder. To run the script from the Windows PE command line, enter the command: diskpart / s <script name> .txt
Formatting should be carried out ONLY in Windows PE. If you format a hard disk on another computer using Windows, and then insert this hard disk into the destination computer, the image with 80% probability will NOT EXPAND.
Connect to a network resource to deploy an image by entering the following command:NET USE y: \\ nmp \ oem \ <folder name> / USER: AD \ *
Enter the password.
! you need to understand what kind of disk it is, for this, using the DIR C command: (D, E, F & etc), iterate through the disks if there are several of them
We deploy the image to the hard disk using the ImageX program from a network share by entering the following command:d: \ imagex.exe / apply y: \ <name> .wim 1 e: / verify
After that, the process of image deployment to the specified hard disk from a network resource will go.
Next, using the BCDboot tool, you need to initialize the boot configuration data store (BCD) and copy the boot environment files to the system partition by entering the following command on the command line:e: \ windows \ system32 \ bcdboot e: \ windows
Upon completion of creating an image and copying it to a network share, you must enter the exit command and the application closes and the computer starts to reboot.
The customized image is deployed to the destination computer.3.2 Server
Configure the server to work with images.
Add our finished image to the “Installation Images”:
As in the case of the boot image, we indicate to the wizard the path to the wim file that we created:
The original install.wim file may contain several revisions:
But only one should be created.Part 4. Great and terrible DHCP
1) WDS and DHCP are installed on the same server.
WDS and DHCP cannot occupy UDP port 67 at the same time. By preventing WDS from listening on UDP port 67, you can provide a port for DHCP traffic and set DHCP parameter 60 (domain or server parameter) to PXEClient, eliminating the conflict.
If WDS is installed on a DHCP server, the DHCP Option 60 page appears during setup. Check the Do not listen on port 67 and Configure DHCP option 60 to PXEClient check boxes. The message received by the client from the DHCP server contains the IP address, subnet mask, and parameter 60.
As a result, it becomes clear to the client that the DHCP server is also a WDS server at the same time. If you later add DHCP to the WDS server, you can configure this setting by right-clicking on the server name in the WDS snap-in and selecting Properties. There are similar checkboxes on the DHCP tab.
2) WDS and DHCP are located on different servers, on the same subnet as the clients.
No additional configuration is required, since WDS and DHCP are located on different servers. Both services can listen on UDP port 67, and clients are on the same subnet as the WDS and DHCP servers, so broadcast traffic is available to all.
3) WDS and DHCP are installed on different servers, in different subnets.
WDS and DHCP services installed on different servers do not interfere with each other to listen on UDP port 67.
You must configure the router to send broadcast packets, because most often we see that broadcast packets cannot go to other subnets. In addition, all traffic to UDP port 4011 from client computers to the Windows Deployment Services server must be directed accordingly.
To help the WDS client find the WDS server, we need to configure DHCP option 66 and DHCP option 67.
Configuring DHCP options on an IPv4 network is done from the DHCP snap-in available from the Administrative Tools section of the Start menu.
In the DHCP snap-in, expand IPv4, and then right-click Server Options (or scope options) and select Configure Options. Scroll to 066 Boot Server Host Name, select the check box and enter the host name of the WDS server in the text box (you can use the name, but preferably IP).
Then check the box 067 Bootfile Name. In the text box, enter the path and file name of the Preboot Execution Environment (PXE) file to download on the client. Text value for parameter 67:boot \ x86 \ wdsnbp.com - 32 bit
OR
boot \ x64 \ wdsnbp.com - 64 bit
There are also recommendations from foreign sites:Configure DHCP option 67 with the right boot image file.
For 32-bits systems \ boot \ x86 \ wdsnbp.com
For 64-bits systems \ boot \ x64 \ wdsnbp.com4.1 CNP
Client Naming Policy - in the WDS server settings, select AD DS. In the Client Naming Policy, specify the format based on which computers will be given a name.
The default naming pattern is% 61Username% #, this means WDS will create a computer name using the name of the user who entered the remote name during the installation process and # this number is 1,2,3 ... up to 999 will be added after the user name.4.2 Cisco DHCP MODE
It's not as scary as it seems:BU # ip dhcp pool DATA
BU # option 66 ascii "1.2.3.4"
BU # option 67 ascii "bootfile.pxe"Part 5. A bit of afterword
Actually everything. This is a small article, and it seems to be finished.
Someone would not say, but for small grids this is a very necessary thing.
For those who want to expand the functionality, there is just a great article on Geektimes: "Add WDS universality . "
On this, I hasten to bow out, thanks to all who are interested in this article.
Giktayms Forever!
If there is a Chip in the text write in personal messages, flood and troll is not sports! If you can add something important, add to the article.
UPD. thank you darthslider and navion
There is a MDT (Microsoft Delpoyment Toolkit).
With it, you can immediately add a key to the image and install products with a quiet installation.
Also configure the admin username and password.
Requires a separate computer and installed dependencies.
darthslider
First of all, MDT is a Task Seqence support, that is, any scripts and settings at any stage of the installation.
It is also a convenient editor unattend.xml
Well, in addition, software installation, post-configuration, input to the domain, etc., as well as support for OS update scripts (capture and settings, install new OS, restore), user migration to a new PC (similar to the previous script). But the last 2 points are pretty strong shamanism.
(About setting and raising video HERE. )
Source: https://habr.com/ru/post/376531/
All Articles