Sysprep和unattend.xml:删除Windows 7上的本地用户帐户

我们正在使用WDS部署Windows 7。 我们要删除在安装过程中创build的本地用户帐户。 我们不需要这个帐户,因为机器join一个域,并在OOBE阶段创build一个域用户帐户。

Microsoft-Windows-Shell-Setup | UserAccounts | LocalAccounts文档 Microsoft-Windows-Shell-Setup | UserAccounts | LocalAccounts Microsoft-Windows-Shell-Setup | UserAccounts | LocalAccounts指出这个选项可以创build本地帐户。

有没有办法指定在unattend.xml删除帐户?

您希望在创buildSysprep映像时使用审核模式。 审计模式使您可以自定义Windows安装,而不会提示创build用户帐户并configuration您的位置和时区。

参考: http : //technet.microsoft.com/en-us/library/cc722413(v=ws.10).aspx

使用net user "user name" /delete一个cmd文件

部分Unattend.xml

  <FirstLogonCommands> <SynchronousCommand wcm:action="add"> <Description>Executing lastboot script</Description> <Order>1</Order> <CommandLine>c:\temp\lastboot.cmd</CommandLine> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <Description>logoff corrent user</Description> <Order>2</Order> <CommandLine>shutdown /l /f</CommandLine> </SynchronousCommand> </FirstLogonCommands>