so your idea seemed to have worked, kind of…
Let me try to explain…
in this example, below, the ending result was what I expected, but see the comments in the script…
PS SQLSERVER:\> $QueryResult = Invoke-Sqlcmd -ServerInstance 'DBSERVER' -Database 'AdminDB' -Query "SELECT * FROM [dbo].[NuixLicenseConnectionStringGet][1, 'v5.0'];"
$NewResults = $QueryResult | Select-object -ExpandProperty ConnectionString
$NewResults = $NewResults.Split[',']
Get-NuixLicenseServer -ServerName $NewResults -Verbose
SERVER01 SERVER02 ##here is what is written after the split
VERBOSE: SERVER01 - Nuix Server 5 service is Stopped... ##shows SERVER01 is stopped, which is correct
VERBOSE: server02 - Nuix Server 5 service is Running... ##checks the service on SERVER02, however, it has it in lowercase now, when it originally was in CAPS.
VERBOSE: Loaded the Get-NuixLicenseStatus script
VERBOSE: License Status: OK
VERBOSE: The Nuix Server License Status is: OK ##Everything seem sto check out just fine and I get a return of "server02"
and even though the ending results in this case was what I expect, I also expect the CAPS to stay to upper case, because for some reason, if I have SERVER03 in there, in the place of SERVER02, it doesn’ recognize the server if it’s in lowercase, only in uppercase, which is weird…Why is that? and is there a way to force these to come back in uppercase, as that is how it will come from the DB?