五、使用无人职守文件离线加入到域
首先用djoin产生计算机帐号数据元,然后建立无人职守文件unattend.xml,添加如下信息
<Component>
<Component name=Microsoft-Windows-UnattendedJoin>
<Identification>
<Provisioning>
<AccountData>Base64Encoded Blob</AccountData>
</Provisioning>
</Identification>
</Component>
其中<AccountData>Base64Encoded Blob</AccountData>中间包含计算机帐号数据元,即使用djoin产生的数据,即上面的win200701.txt文件的内容。
然后启动计算机到安装模式,或启动到windows pe,运行
setup /unattend:无人职守文件
以下是无人职守文件的示例:
- <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <Identification>
- <Credentials>
<Domain>hbycrsj</Domain>
<Password>3228272</Password>
<Username>bill.xu</Username>
</Credentials>
- <Provisioning>
<AccountData>ARAIAMzMzMyQAwAAAAAAAAAAAgABAAAAAQAAAAQAAgABAAAAAQAAAGgDAAAIAAIAaAMAAAEQCADMzMzMWAMAAAAAAAAAAAIABAACAAgAAgAMAAIADgAQABAAAgAWABgAFAACABYAGAAYAAIACnsCBQeui0WCXKbm8zXHzRwAAgAgAAIAJAACAAEAAAAKewIFB66LRYJcpubzNcfNKAACACwAAgD9MwDgMAACADQAAgAAAAAACAAAAAAAAAAIAAAASABCAFkAQwBSAFMASgAAAAoAAAAAAAAACgAAAFcASQBOADIAMAAwADcAMAAxAAAAeQAAAAAAAAB5AAAAbwBOADUAYABgADkAcwBqAFIAYQBYAHkAawBRAE4ANgAoAG4AOQAzAFQASQBvAFcAbgBKADEAIQAvACkAJAB5AEgAIQAiAEYALgA2AFkAMgAqAGwAawB3AEQAdQBfAGoARgBuAGUAZABoAHoAbABTAFkAVQBUAGUAUQBtAG8ASABEAFYASgBdAEYANQBFAFwAUQA2AFsAIwA/ACQAcgBEAD0AYgAxACwAYQAwACAAWABNAC4AQABeAFQAdQA3AC0AIwBjAFIAZwBxACEATQBLAFYAQQBsAGUAcwBfAFYAYQByAEEALwA/AEoAXQAwADgAAAAAAAgAAAAAAAAABwAAAEgAQgBZAEMAUgBTAEoAAAAMAAAAAAAAAAsAAABIAEIAWQBDAFIAUwBKAC4AQwBPAE0AAAAMAAAAAAAAAAsAAABIAEIAWQBDAFIAUwBKAC4AQwBPAE0AAAAEAAAAAQQAAAAAAAUVAAAANWK0Jw1fQz9y6uGlGgAAAAAAAAAaAAAAXABcAFcASQBOADIAMAAwADgAUgAyAEUATgAuAEgAQgBZAEMAUgBTAEoALgBDAE8ATQAAAA8AAAAAAAAADwAAAFwAXAAxADkAMgAuADEANgA4AC4AMQAuADEAMwAAAAAADAAAAAAAAAAMAAAASABCAFkAQwBSAFMASgAuAEMATwBNAAAADAAAAAAAAAAMAAAASABCAFkAQwBSAFMASgAuAEMATwBNAAAAGAAAAAAAAAAYAAAARABlAGYAYQB1AGwAdAAtAEYAaQByAHMAdAAtAFMAaQB0AGUALQBOAGEAbQBlAAAAGAAAAAAAAAAYAAAARABlAGYAYQB1AGwAdAAtAEYAaQByAHMAdAAtAFMAaQB0AGUALQBOAGEAbQBlAAAAAAAAAA==</AccountData>
</Provisioning>
<JoinDomain>hbycrsj</JoinDomain>
</Identification>
</component>