$guidPattern = "(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}"
[Regex]::Matches($string, $guidPattern).Value
Uses regex to return a Guid inside of a string.
PS C:\> $string = 'Find the guid 1d10da0a-88b2-4129-93a1-e4e33edb3cc5 in this string.' >> $guidPattern = "(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}" >> [Regex]::Matches($string, $guidPattern).Value 1d10da0a-88b2-4129-93a1-e4e33edb3cc5