Aren't you getting multiple values returned because you are running in "Multiple" mode (see the Set-PowerCLIConfiguration cmdlet) ?
Instead of doing $dts[0], it would perhaps be better to select 1 connection (and use the Server parameter).
Aren't you getting multiple values returned because you are running in "Multiple" mode (see the Set-PowerCLIConfiguration cmdlet) ?
Instead of doing $dts[0], it would perhaps be better to select 1 connection (and use the Server parameter).