I don't even know where to begin, but what powershell cmdlet can I used that can read in a a MDT xml (OperatingSystem.xml) in the following format, and grab just the GUID value (or values) $captureGUID = "{1a65f870-2247-410a-be71-75b6b975b3d5}"
<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">
Take the captured value from earlier and replace it on another xml file in a different format (e.g. update the OSGUID here)
<?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" />