If you get-member in get-sqldata you will see that it returns a System.Data.DataRow and the properties related to your query. This is what you need to use :
In you query,the name of the Instance is InstanceName rigth ?
Change you script to :
$myserver = $_.InstanceName
and will work 🙂