易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 1365|回复: 0
收起左侧

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

[复制链接]
发表于 2021-11-30 10:32:40 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
<?xml version="1.0" encoding="utf-8"?>
# O- |4 }' q: Q; d& P; n+ G" B0 R<unattend xmlns="urn:schemas-microsoft-com:unattend">7 X8 s$ i5 g) X! w8 Z  X
    <settings pass="windowsPE">; @5 o2 }: p! j
        <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">
$ O9 f+ S- N: c& B4 v9 H2 ?            <SetupUILanguage>8 M2 l  ?+ V; @( ^- n
                <UILanguage>en-US</UILanguage>
  @& j1 d; {0 T2 p9 }4 a! R            </SetupUILanguage>
3 M6 U1 m& d7 X9 V* N- H            <InputLocale>en-US</InputLocale>
- c; {# O9 a) m, X0 w            <SystemLocale>en-US</SystemLocale>
: a1 Z. I5 Z6 h5 }            <UILanguage>en-US</UILanguage>5 O, A; h7 E. X$ R6 t
            <UserLocale>en-US</UserLocale>
" p# A/ [, h6 {$ O# R        </component>; v% B4 {! Q' _
        <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">
( U1 [! o3 G, e- H, Y4 t& h' i6 W1 U            <DiskConfiguration>4 [$ H2 c% r2 e% s6 v) |0 }
                <Disk wcm:action="add">6 ~. u7 Q7 [; R/ H# [
                    <CreatePartitions>
8 `7 l. S9 u2 @4 }- b7 N                        <CreatePartition wcm:action="add">/ v1 }  }$ j2 L* y" `* u  l" M8 d
                            <Order>1</Order>
$ r  v; L* C2 }& i9 \; k                            <Size>250</Size>$ h, q4 [$ z' q4 a% t$ n* S# Q' Q
                            <Type>Primary</Type>
+ H9 o5 v- h% @  U; n                        </CreatePartition>; l' ?% l/ G; b5 _
                        <CreatePartition wcm:action="add">3 P, q9 i0 }& v) p: E
                            <Order>2</Order>
  U* d: }% e; D0 z% y2 F6 g                            <Extend>true</Extend>
2 Q! x) L' Y  R- M7 G+ Q                            <Type>Primary</Type>
, {. v5 U8 r7 ?, X; l                        </CreatePartition>6 J5 c2 b9 m# G% V- b
                    </CreatePartitions>) W  @: _# I: X% P5 ^* Y8 d
                    <ModifyPartitions>
1 M7 \5 S& \: D% o9 `                        <ModifyPartition wcm:action="add">
& ^0 e, x3 }& T& E3 h0 R3 O                            <Order>1</Order>
. J8 y* ^& M- N/ x6 \                            <PartitionID>1</PartitionID>
! }( Y' D0 H7 x                            <Format>NTFS</Format>+ X9 F. j+ b9 ~3 B5 k* T
                            <Label>Boot</Label>0 `( n& q) l) M. {
                            <Active>true</Active>& f7 x7 {, u: A* @, S4 P  x4 v
                        </ModifyPartition>: A9 M0 f: I* W  H, U+ p
                        <ModifyPartition wcm:action="add">; S1 x! i- m" \% v
                            <Order>2</Order>! G' @1 z9 N& W: x
                            <PartitionID>2</PartitionID>: l$ V5 w' W6 D$ \0 _! y
                            <Format>NTFS</Format>* d& D5 g6 \1 i7 K; w- e; ~6 i
                            <Label>System</Label>
% P. Z. W/ r0 N/ t6 m                        </ModifyPartition>
$ T0 V0 N; y9 @                    </ModifyPartitions>5 o  Q: m( g% _& i& }) m4 V
                    <DiskID>0</DiskID>- e& s, N& f4 ?6 [5 W7 ]4 ], T
                    <WillWipeDisk>true</WillWipeDisk>
# C3 p+ b/ Z% T" p                </Disk>3 A* M! K/ R" j
            </DiskConfiguration>( U, W) e( }: ~5 C; }
            <ImageInstall>
% G$ B- _3 S) [  o" k                <OSImage>; j* ~, j0 s9 B1 @$ ?! H
                    <InstallFrom>) j5 C6 f! J1 s) j& e0 b! r/ D
                        <MetaData wcm:action="add">, R' n4 @2 ?( ^' @$ M! n
                            <Key>/IMAGE/NAME</Key>
! N1 ]6 k# g7 A0 W& W+ B$ |                            <Value>Windows Server 2019 SERVERSTANDARD</Value>
: ^- z: S; N4 _3 t2 i# n9 K. ^                        </MetaData>% Z3 R' J* J! F
                    </InstallFrom>7 R4 C* ~$ B* T( I  c' P$ u
                    <InstallTo>
: Z! Y' n( `- D, Y  ^0 }8 Y                        <DiskID>0</DiskID>
% w! d+ E5 R( N6 t1 q. K: g" z                        <PartitionID>2</PartitionID>6 W( _7 F% @. I* v  [0 y* k
                    </InstallTo>
, W8 P; V+ `- X                    <WillShowUI>OnError</WillShowUI>
. d4 [+ X' E- E3 n% t- o; s                    <InstallToAvailablePartition>false</InstallToAvailablePartition>
' O! G8 a8 H4 Q$ z; [1 M2 [                </OSImage>
6 ~+ O( n; Y4 ^: H" b" K# m            </ImageInstall>
" W3 T5 m0 W$ E            <UserData>
" m* p+ T2 b& w* h+ C$ x, h                <AcceptEula>true</AcceptEula>- }+ Y! ?) d) @* F- }; \
    <ProductKey>
/ x+ s4 O+ `* R8 G                  <Key>11111-22222-33333-44444-55555</Key>7 l0 u: E6 c( i( D+ D) L
                  <WillShowUI>Never</WillShowUI>
$ ?  G& f- L0 T: I+ W1 e4 Q               </ProductKey>
5 u/ z" U# e7 k  [; U8 R( A            </UserData>
  ~8 x+ O! e8 r+ v3 u& h: \+ {2 N        </component>; p; v" u, }2 `! Z* U
    </settings>0 e3 H! ~0 Y3 t. Z) d
    <settings pass="specialize">: B8 D& V& T5 G3 M7 Z
        <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">
* k5 C0 q; c4 k" a            <TimeZone>Central Standard Time</TimeZone>8 [  B3 S8 f/ y) h0 \- a2 }
        </component>& z6 {% b# E7 `8 _; L! T  m0 C
        <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">
7 T7 l' O4 N0 ~            <RunSynchronous>7 T# b4 s! r; x) M4 r: [* R! |0 \0 L1 y, |
                <RunSynchronousCommand wcm:action="add">
) c% l- f. _- t, i1 [$ x                    <Path>a:vmtools.cmd</Path>5 S( T9 L7 |0 W
                    <Order>1</Order>
  s1 V1 U  O8 s                    <WillReboot>Always</WillReboot>0 m2 W6 y0 g8 h
                </RunSynchronousCommand>
* r) d3 n5 c. A# d. X            </RunSynchronous>3 V% U; a) C+ _. e8 z" Z3 K+ ]  S
        </component>/ `0 r+ {4 S! I
    </settings>. w8 ^  J8 K( X) Q
    <settings pass="oobeSystem">" f$ h( e2 j& |/ j
        <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">
4 d5 q' M0 H4 X& Q. H            <AutoLogon>
" P4 \+ _  |. s' E. R' Z9 T                <Password>
) v) |/ k' }  z& ~                    <Value>"your password"</Value>
' J" [4 s. F" X9 L                    <PlainText>true</PlainText>
7 b0 J3 O* j; }                </Password># k: _4 p3 S) ]6 ~7 ~! M7 }
                <LogonCount>2</LogonCount>) F" \; Y$ D4 V, u6 |/ e# `, k% m# r
                <Username>Administrator</Username>2 w2 p1 G1 F7 E$ z  J
                <Enabled>true</Enabled>9 q" g0 r7 Q3 I7 P3 v
            </AutoLogon>- W) z7 b: Z2 j" `
            <FirstLogonCommands>) Q+ ^; e7 e: ?2 y1 C3 a- m
                <SynchronousCommand wcm:action="add">8 z# w& x4 [2 G9 Q  l8 b
                    <Order>1</Order>: K& i2 A7 q. t5 F3 e* f
                    <!-- Enable WinRM service -->0 D7 d3 g) }/ |6 d. f$ @5 e
                    <CommandLine>powershell -ExecutionPolicy Bypass -File a:configureVM.ps1</CommandLine>8 N3 u* m/ ^! b: h0 ?) z- k
                    <RequiresUserInput>true</RequiresUserInput>
* w  I+ h0 t& v+ L                </SynchronousCommand>
$ H1 e4 |- ~9 u: L& \# g: P            </FirstLogonCommands>- K' B6 Z5 h, o( H2 a8 H9 l# \. Z
            <UserAccounts>) |, N) n9 R2 W& k; i' |
                <AdministratorPassword>
0 h" K9 v0 u- U5 m4 F, n6 \                    <Value>"your password"</Value>
3 i1 x. \& j: `7 o                    <PlainText>true</PlainText>' s7 i/ V( ^$ R9 n4 F
                </AdministratorPassword>3 I0 T4 R7 g: J+ V0 ?
            </UserAccounts>7 F; L1 K# J& V4 e9 Q9 ?9 t
        </component>
2 k/ o7 Q  G3 S; Q0 v# ~2 s    </settings>
5 I9 F1 L4 ~" j( a% a' W: i+ ^; }    <cpi:offlineImage cpi:source="wim:c:/users/administrator/desktop/win2019/install.wim#Windows Server 2019 SERVERSTANDARD" xmlns:cpi="urn:schemas-microsoft-com:cpi" />& B1 k. \4 @- c0 b
</unattend>
9 r# f3 L; Z1 [& g% I0 Q+ ]
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-4-8 15:20 , Processed in 0.041158 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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