Trying to find a way to get rid of duplicate code in Get-TargetData, no joy yet. Renamed the scriptblock, removed an redundant line of code.