I need to be able to identify the version of SQL installed, as in Enterprise or Standard. The first option I found was to use Powershell to WCI. I found the below command that will identify this for me.
invoke-sqlcmd -query "SELECT SERVERPROPERTY ('edition')" -database SCM -serverinstance Server\Instance
The issue is that I can't get the results into a single variable. The output of the above leaves in a carriage return of some type that I can't figure out how to get rid of using the normal split command. So this screws up my XML formatting. Anyone had a similar issue?