if i run from Powershell command line on server i get results.
if i run from script body i get "not defined"
i've added invoke sqlcmd on all of our Solarwinds Servers.
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK© online community. More than 180,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.