I'm trying to figure out how to determine the full path of files from a compare-object cmdlet.. Here's some of my code:
$LCompareXmlFile=$LHotFixes.SelectNodes("//HF") | Select -ExpandProperty File
$CompareXmlKBDiff= (Compare-object-Ref$RCompareXmlFile-Diff$LCompareXmlFile-SyncWindow 25)
A file value looks like this: File="KB974571.MSU"
The problem with the compare statement is that it lists all the files, but I don't know the path of the file so I can copy it into the right folder. For example the files will be in "c:\temp\x86" or "c:\temp\x64". How do I go about finding the file path, and then copying them into the right folder?
I do have an md5 hash of every file on the remote and local system, but not sure how to use this data to copy it to the right folder. Here's one of the commands to get hash of the local files:
Thanks for your help and suggestions. If you need more info, context or script examples please let me know. Thank you!