找回密码
 注册
查看: 1362|回复: 0

windows2019 镜像 sysprep系统清理时 配置 Unattend.xml文件

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-11-30 10:32:40 | 显示全部楼层 |阅读模式
<?xml version="1.0" encoding="utf-8"?>
" C3 v2 r/ l. F. }! [4 q% D& R<unattend xmlns="urn:schemas-microsoft-com:unattend">5 c* a! v6 D+ y
    <settings pass="windowsPE">
5 b4 k; s$ V, e! r        <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">, a2 b  g7 V$ t) Q
            <SetupUILanguage>1 ?' X0 g  L* k
                <UILanguage>en-US</UILanguage>
2 m7 Y$ F/ R% W% o            </SetupUILanguage>
0 x7 U/ N5 B3 _! T8 o; u            <InputLocale>en-US</InputLocale>  h1 ?! b7 H9 G" Z- S( |
            <SystemLocale>en-US</SystemLocale>
- G& ^% t' j7 w. S& R            <UILanguage>en-US</UILanguage>
1 C/ Y; B- x" u0 y/ |            <UserLocale>en-US</UserLocale>
% w2 n, q: G  W; \" ?6 ^7 ~        </component>6 h" t% s! k4 A2 k
        <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
7 i$ G& v' P6 O6 V* R1 m            <DiskConfiguration>& n( G1 m/ U1 I" Q# A1 v8 b* c) ~
                <Disk wcm:action="add">
9 A1 m) |" D! f& w9 M3 d) s                    <CreatePartitions>
5 ]# h. r5 z# [# I$ b                        <CreatePartition wcm:action="add">$ t. B  F; O6 q
                            <Order>1</Order>( R1 t; R/ E, R( M0 ^1 a5 x
                            <Size>250</Size>
/ q1 y" t% u7 X) v/ _# ]2 }                            <Type>Primary</Type>
6 s+ }3 h! d7 a+ @                        </CreatePartition>) I( G7 E, g, m4 t4 D/ o8 I' B2 x
                        <CreatePartition wcm:action="add">$ j' X+ i9 ~: T# @
                            <Order>2</Order>
, R# i3 V0 ^7 [  s/ @# ]                            <Extend>true</Extend>4 k4 K( m- U" ]% b5 K/ @, i
                            <Type>Primary</Type>
8 V8 W' j! n* Z2 T. u* I                        </CreatePartition>( x; e; k5 o9 ?, s1 m2 S
                    </CreatePartitions>! e4 @! ]: B6 T- n2 B$ z( [
                    <ModifyPartitions>7 K3 n. R. W; a: Q% ^
                        <ModifyPartition wcm:action="add">
. l8 O) \9 v" t. z1 b4 r  K6 V# P, r                            <Order>1</Order>
" `: X3 f: ~$ E2 J3 N+ R                            <PartitionID>1</PartitionID>
- e) _+ W/ `* j* e                            <Format>NTFS</Format>
) ~" Q: a# k! G, R9 P                            <Label>Boot</Label>
# r/ m. {  Y4 ^' u: |0 k+ P8 s4 `                            <Active>true</Active>
) ?( N: x  c0 M                        </ModifyPartition># n  Y4 Z/ V. t
                        <ModifyPartition wcm:action="add">$ w/ |: e0 ?5 h. j3 j
                            <Order>2</Order>
& F5 Y9 C- X2 C: h! t/ O, w                            <PartitionID>2</PartitionID>
% n( O+ [+ M3 M0 u8 s  e0 X                            <Format>NTFS</Format>+ d0 A% y- X( f7 Q) M4 s  `
                            <Label>System</Label>! U8 L  I( P2 o* @+ N
                        </ModifyPartition>
0 E& A( ^# T% ]0 }" o6 U                    </ModifyPartitions>. l( B) \7 D. B) H/ `1 S$ I
                    <DiskID>0</DiskID>
: m8 G2 h- t) y* D5 l. ?' w2 ^* N& ?                    <WillWipeDisk>true</WillWipeDisk>
: e9 ~* }4 R  n; H, v                </Disk>
5 a0 A: z3 z' z  g! K) g9 D            </DiskConfiguration>
. |. ~, c. Y: u" z% G$ {            <ImageInstall>* B5 X- E7 d; V. M
                <OSImage>. C  z+ t' g+ {* u
                    <InstallFrom>5 ?# G$ e5 S5 @. D/ G9 w
                        <MetaData wcm:action="add">
2 R8 @: G4 x: t0 v6 ~7 J0 @3 n& W                            <Key>/IMAGE/NAME</Key>4 E+ y3 t( w# W5 ?, g4 I& T$ Z
                            <Value>Windows Server 2019 SERVERSTANDARD</Value>
" R: i3 N/ f$ e9 X' M                        </MetaData>
3 T7 x# \5 K5 v0 g7 J5 i$ k                    </InstallFrom>2 t+ `& |( m7 b5 O
                    <InstallTo>$ w/ g- N+ ^: M7 N+ i8 p: `
                        <DiskID>0</DiskID>* Z. ?- p! h/ m  i& Z1 D+ U: w
                        <PartitionID>2</PartitionID>% |' m/ ^) v9 d) ]0 B
                    </InstallTo>5 x+ @: m8 E' \$ S4 @
                    <WillShowUI>OnError</WillShowUI>
4 ]3 ]+ L  {0 O& ?                    <InstallToAvailablePartition>false</InstallToAvailablePartition>. |7 t$ N  N# m) q2 d/ z! R
                </OSImage>5 V5 |: I, J3 S" |
            </ImageInstall>
* X; B0 A0 Y3 L6 f            <UserData>5 i5 Y# W+ S; q. d
                <AcceptEula>true</AcceptEula>) V" w& c+ ?  Q2 a
    <ProductKey>" D' ?% \7 Q! B3 \+ E) H
                  <Key>11111-22222-33333-44444-55555</Key>" x% {; B# q( h# ?
                  <WillShowUI>Never</WillShowUI>0 g, C! E/ x. m% w
               </ProductKey>
* e$ y/ P1 [! u: b" Y# \            </UserData>
5 X) n1 G0 Q5 v7 A" f        </component>
8 [; Q6 h/ z- ]9 f1 J    </settings>
. N1 i/ n( z" w1 t0 A) ?    <settings pass="specialize">
2 d9 f8 n9 V( Q0 m2 J. n        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
) e- x$ f4 `3 {% P3 v3 Z1 I" |            <TimeZone>Central Standard Time</TimeZone>3 m5 `5 ?9 t1 q$ S7 h
        </component>
1 D1 u9 u% M2 J9 c) U  d        <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
: j5 a* R$ T5 j+ J            <RunSynchronous>
5 `. H$ M0 }+ I* h7 m( I( w                <RunSynchronousCommand wcm:action="add">
- i# ^' x; H2 ?- T. E                    <Path>a:vmtools.cmd</Path>7 q6 ?  A- `9 n8 K8 a0 G
                    <Order>1</Order>
; G1 s8 V- f- n                    <WillReboot>Always</WillReboot>9 d3 j* p! N! q
                </RunSynchronousCommand>( h$ b. I- i- A9 v! z$ G
            </RunSynchronous>; u7 x5 S, ^! u4 w. }9 F/ }2 _
        </component>2 n8 m3 ?' Z. W5 W& W- V# H$ [/ @
    </settings>
9 m% [3 a4 [0 y% T, a    <settings pass="oobeSystem">
( E, M. Z1 A3 V: X, X" s        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
, f+ Q8 e; h$ r& |: m: t            <AutoLogon>! {2 S3 X' |/ T+ F- K5 x  L
                <Password>3 w: ]0 g6 c. ^. a* G' \
                    <Value>"your password"</Value>, X# k  d% r1 F" e% \& w& }+ _$ M
                    <PlainText>true</PlainText>
6 \/ v$ k0 K; z                </Password>
6 ~# g( T7 A; z( P! i4 o                <LogonCount>2</LogonCount>
: s/ I8 ~! t9 u                <Username>Administrator</Username>
5 H* c/ L% W8 O# b5 g2 P; A                <Enabled>true</Enabled>! E# {4 B/ s* c" g
            </AutoLogon># ?) Z$ o- U. ]  v, l5 @% `
            <FirstLogonCommands>
% G6 a' X) u( D& z                <SynchronousCommand wcm:action="add">& u+ q' p9 Y* S# B" {  R9 L
                    <Order>1</Order>
. `9 ^( N6 C# J" I$ ~, X) q2 n                    <!-- Enable WinRM service -->" p- o! e* T' G* C
                    <CommandLine>powershell -ExecutionPolicy Bypass -File a:configureVM.ps1</CommandLine>6 H. M* o: D( b8 N; [
                    <RequiresUserInput>true</RequiresUserInput>" A& W2 Z% O( o3 N. ^
                </SynchronousCommand>
; j7 h. `  _9 e/ O% p/ M% g5 Z8 k# Z            </FirstLogonCommands>
) q6 Z, y( Q& w            <UserAccounts>
0 ]# o8 i# ?: J                <AdministratorPassword>! K) l& p6 }7 W
                    <Value>"your password"</Value>5 _2 t  J6 s# ?& T1 H+ A$ N
                    <PlainText>true</PlainText>
+ n+ w9 H# p# E& \) ~, n                </AdministratorPassword>& b6 [" I2 v; g) m* H
            </UserAccounts>6 l: g0 X( V% H
        </component>
, L  z7 }) h9 L9 g    </settings>
3 V& b2 f' M9 ]' N4 ^2 O* h/ Y) Z    <cpi:offlineImage cpi:source="wim:c:/users/administrator/desktop/win2019/install.wim#Windows Server 2019 SERVERSTANDARD" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
! ~& q6 ]5 [) i</unattend>
  x! c- [$ h& o
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 00:59 , Processed in 0.020462 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表