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

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-11-30 10:32:40 | 显示全部楼层 |阅读模式
<?xml version="1.0" encoding="utf-8"?>: l& D3 I) }# s( Q( w% |# n* w5 T, \
<unattend xmlns="urn:schemas-microsoft-com:unattend">
) V2 |/ W# _$ b' J1 y3 O+ _5 U    <settings pass="windowsPE">6 v0 c, z* x( Z5 R' D+ }. c
        <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">
' f- `4 s: ~# u4 V3 g+ L2 I            <SetupUILanguage>7 v, v& D" s& _% D0 N" p9 X
                <UILanguage>en-US</UILanguage>
# s& F1 H! c0 a+ c            </SetupUILanguage>
* v% _+ Q# \7 h! M% Z) ]  s            <InputLocale>en-US</InputLocale>
) x$ G8 B0 Z. L7 D, _; h            <SystemLocale>en-US</SystemLocale>
/ s( h+ T/ E( Z4 _, r            <UILanguage>en-US</UILanguage>
1 r2 I, W1 F% q- C: L' ]            <UserLocale>en-US</UserLocale>. n* G8 y! y& T# @0 v  T: K
        </component>
% s) b: i2 |1 |( s        <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">
# [- p& M+ o: k7 M1 @# {            <DiskConfiguration>
- f. {0 b: [) L' j- Y/ Y                <Disk wcm:action="add">
1 X4 C( U4 b* a! o6 B  C                    <CreatePartitions>
( L4 A% z# B! K5 c0 v* H' K0 J7 {; `2 C                        <CreatePartition wcm:action="add">& O% a/ H: h0 @+ Y3 o
                            <Order>1</Order>3 e. a8 @8 i  r/ j
                            <Size>250</Size>
' A$ L( i5 `! [& p                            <Type>Primary</Type>
! F# G) H0 K$ p1 @                        </CreatePartition>: e7 N+ s! w  G2 \1 V& b
                        <CreatePartition wcm:action="add">0 x7 U# I1 ]2 h) D4 }! k9 Q0 G
                            <Order>2</Order>- I; ~- n# K$ c/ R. u
                            <Extend>true</Extend>
; Y( q# u2 W+ l" J$ E# t; A6 Q                            <Type>Primary</Type>
! x$ S) P9 ^& a/ e# V3 i8 D) H5 }                        </CreatePartition>" i+ i+ [) g0 n3 `5 `9 x
                    </CreatePartitions>
  B" }5 ?3 X2 f% k7 d5 f% I" ~                    <ModifyPartitions>
9 C' R* w7 J8 Z: D4 N  t! g0 i                        <ModifyPartition wcm:action="add">5 y. J& {/ T% D2 K
                            <Order>1</Order>' q' `* e9 G7 I1 Y
                            <PartitionID>1</PartitionID>
4 K( y- p: m+ C. _# X/ a( ?                            <Format>NTFS</Format>& \* `. m" v. F. ~1 a
                            <Label>Boot</Label>
% j  T+ ~- {$ _                            <Active>true</Active>
' c9 n# c" e: @/ H) i' X6 `                        </ModifyPartition>
$ s, w- J  Q1 X3 d! P. w; x( N                        <ModifyPartition wcm:action="add">
: n3 N5 [  F$ Y7 f' [' s                            <Order>2</Order>  ~! X- P4 A9 T
                            <PartitionID>2</PartitionID>
) r5 K- e; X: K! R+ A2 I4 q9 v                            <Format>NTFS</Format>
( `" G5 ~5 ~0 {4 ~$ Z: [. H: a/ [9 w                            <Label>System</Label>
' q# _9 Z, b# b9 f' H                        </ModifyPartition>
( V1 |! r2 i7 {) {& T2 e# P! B6 G1 F                    </ModifyPartitions>& d6 }4 P' w" B. d2 V7 i
                    <DiskID>0</DiskID>4 q6 D. L  y5 z; C# ?
                    <WillWipeDisk>true</WillWipeDisk>& `5 a6 E6 \; }7 P. ]
                </Disk>
2 n* ~0 y$ j. H! T0 d1 t  w- O            </DiskConfiguration>; \8 M( }9 v0 A$ p2 _$ m' [
            <ImageInstall>
7 y5 i" i$ j1 J/ c' s: g& C. T3 p: O                <OSImage>" h4 b/ V3 H3 R# ^! B" D/ ?
                    <InstallFrom>
- u' R+ _/ ?) I1 w( T4 z% b                        <MetaData wcm:action="add">1 t* y$ h1 E' b9 J
                            <Key>/IMAGE/NAME</Key>8 k4 j8 ]7 t' |+ L$ Q  X. x' m
                            <Value>Windows Server 2019 SERVERSTANDARD</Value>1 s$ S+ ?2 Q( |' `2 ]2 U  k7 X
                        </MetaData>- W. B0 \0 {( U3 o1 M0 \/ @
                    </InstallFrom>% f% k1 D1 m+ A# n+ U1 F, \( E2 V
                    <InstallTo>/ j9 H5 g6 u1 W! y
                        <DiskID>0</DiskID>( [. o( |5 i; S" |+ v
                        <PartitionID>2</PartitionID>& w9 ]* }% w6 r2 o: z
                    </InstallTo>3 ]5 Y6 J3 J* ^6 E; [' G+ Z4 }; n. M
                    <WillShowUI>OnError</WillShowUI>  X' g! [! T3 R4 `; C9 j
                    <InstallToAvailablePartition>false</InstallToAvailablePartition>
% [; Z3 S+ ?* t! E9 `) D                </OSImage>  r( h  e3 a0 E- U, |
            </ImageInstall>
4 }& A1 {) H5 j" r( {( t, S            <UserData>
# Z: e/ g% `3 K& D+ Z5 U! S                <AcceptEula>true</AcceptEula>5 R- ^7 P5 ?2 G7 M# {8 w0 V3 U
    <ProductKey>/ K" n/ J% b8 S9 ~( M( g$ x  Q
                  <Key>11111-22222-33333-44444-55555</Key>
, p2 b) m2 o1 D( P, s  {                  <WillShowUI>Never</WillShowUI>
0 D, t6 l' J4 M" c) I( S3 S  W               </ProductKey>
" H4 F! l1 t' [' _! [            </UserData>
. X9 i( E6 t' N/ Z: I        </component>
5 @3 \) c; Z' E" r  t% y& _2 B    </settings>3 n4 T. {  M3 F, N
    <settings pass="specialize">
. r/ O/ _, j; i& r! E# o        <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">
1 K' F) k, ~8 ~' e/ Y( _" k! H            <TimeZone>Central Standard Time</TimeZone>
7 `  l" W- M8 R& c        </component>- \  \# }2 J: F/ q2 e
        <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">
2 i" t; u& a6 @( |# t/ _            <RunSynchronous>- {- a" {* K4 K
                <RunSynchronousCommand wcm:action="add">0 {# Z3 N, W) t7 U; @8 Q* Y
                    <Path>a:vmtools.cmd</Path>2 |# Q4 ~8 v  r' F
                    <Order>1</Order>1 L. I: k* R1 }( t4 B; O  v
                    <WillReboot>Always</WillReboot>
$ K7 `6 z( V* o2 d                </RunSynchronousCommand>
$ n) ]3 T' @5 S/ ^) E  W            </RunSynchronous>
* B) f' c; h% U$ l2 d" Q        </component>- o# Y. {  [/ T2 T
    </settings>
! a8 l  u$ u1 s6 `, ]* X+ Y    <settings pass="oobeSystem">
3 {) c+ v' L+ L, F  H- W        <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">
2 q5 o" J: A4 z) f$ R4 J            <AutoLogon>
9 P, D+ a3 x2 D7 [8 [5 m) O# N' w                <Password>
$ q' [) p# v, x  A/ D7 Y                    <Value>"your password"</Value>
0 S* R; p0 `. s2 t& J6 C4 a                    <PlainText>true</PlainText>  Y: B+ J4 q& a- y7 H
                </Password>+ {$ }; O4 f8 [% M5 x
                <LogonCount>2</LogonCount>9 N% I* |! r1 N0 G" W# @
                <Username>Administrator</Username>2 y% O6 [# Z' b8 j/ [/ O$ H
                <Enabled>true</Enabled>
7 W% f# J7 s# R5 `  t            </AutoLogon>! H9 T0 o0 o8 |" r4 c: R3 A
            <FirstLogonCommands>
- f1 I9 B8 m7 {" m5 j8 W8 q                <SynchronousCommand wcm:action="add">
( j* C, c0 U6 M6 A6 U; x                    <Order>1</Order># Z# v3 \* N5 a0 X/ `4 ?: n3 _+ R
                    <!-- Enable WinRM service -->
9 a$ N0 g4 ~* w8 D2 W7 R                    <CommandLine>powershell -ExecutionPolicy Bypass -File a:configureVM.ps1</CommandLine>0 W9 t: U# i# b# ^; N3 u- Q, Z
                    <RequiresUserInput>true</RequiresUserInput>
3 x" ]4 P  }; v" ~3 [8 Q5 Z                </SynchronousCommand>( F6 ^9 w" ]+ Q8 y* N; Z2 i0 t
            </FirstLogonCommands>* z0 d# J1 M) S
            <UserAccounts>4 K7 [" m! F( }2 b
                <AdministratorPassword>
3 k) l% K$ K( V                    <Value>"your password"</Value>/ v/ y4 L/ I1 ~1 o3 j2 c
                    <PlainText>true</PlainText>8 d: F: l) e1 h. P$ c
                </AdministratorPassword>
: S, N# m: v/ o6 C            </UserAccounts>
; p$ Z# T2 G- v7 G! B        </component>. N7 f$ a4 M" j( p9 P
    </settings>
2 U2 X) f! G; V* ?6 Y    <cpi:offlineImage cpi:source="wim:c:/users/administrator/desktop/win2019/install.wim#Windows Server 2019 SERVERSTANDARD" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
8 `: B5 A; U' K4 L4 Y* v; Y</unattend>
* m/ U* a: f: Y0 k
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 00:07 , Processed in 0.019277 second(s), 25 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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