我甚至不知道從哪裏開始,但可以使用哪些powershell cmdlet可以在MDT xml(OperatingSystem.xml)中讀取下面的格式,只是搶GUID值(或值)$ captureGUID =「{1a65f870-2247-410a-be71-75b6b975b3d5}」PowerShell命令在xml文件中選取一個值並將其替換爲另一個xml
<oss>
<os guid="{1a65f870-2247-410a-be71-75b6b975b3d5}" enable="True">
<Name>Windows 7 ENTERPRISE in Windows 7 Ent x64 install.wim</Name>
<CreatedTime>7/21/2014 8:51:10 PM</CreatedTime>
<CreatedBy>W2K8R2\Administrator</CreatedBy>
<LastModifiedTime>7/21/2014 8:51:10 PM</LastModifiedTime>
<LastModifiedBy>W2K8R2\Administrator</LastModifiedBy>
<Description>Windows 7 ENTERPRISE</Description>
<Platform>x64</Platform>
<Build>6.1.7601.17514</Build>
<OSType>Windows IBS</OSType>
<Source>.\Operating Systems\Windows 7 Ent x64</Source>
<IncludesSetup>True</IncludesSetup>
<SMSImage>False</SMSImage>
<ImageFile>.\Operating Systems\Windows 7 Ent x64\Sources\install.wim</ImageFile>
<ImageIndex>1</ImageIndex>
<ImageName>Windows 7 ENTERPRISE</ImageName>
<Flags>Enterprise</Flags>
<HAL>acpiapic</HAL>
<Size>11566</Size>
<Language>en-US</Language>
</os>
<os guid="{67ee1204-ba8f-47d4-9e6c-34a7bb24dd4d}" enable="True">
從以捕獲值早,更換上另一個XML文件以不同的格式(例如,在此更新OSGUID)
<?xml version="1.0" encoding="utf-8" ?>
<sequence version="3.00" name="Standard Client Task Sequence" description="A complete task sequence for deploying a client operating system">
<globalVarList>
<variable name="OSGUID" property="OSGUID">{bc8e6992-5890-4be2-88af-29208f9ab0d5}</variable>
<variable name="DestinationDisk" property="DestinationDisk">0</variable>
<variable name="DestinationPartition" property="DestinationPartition">1</variable>
<variable name="DestinationOSVariable" property="DestinationOSVariable" />