<s>[INST] I'm trying to get the current SQL Server version from remote Windows Server machine without having to manually connect to SQL Server using SSMS or any other SQL tool. I'm using PowerShell and PSRemoting.

My current approach is this:
```powershell
$svr = "MyServer"
$creds = Get-Credential
$verQuery = "SELECT CONVERT(VARCHAR(128), SERVERPROPERTY('ProductVersion'))"

Invoke-Command -ComputerName $svr -ScriptBlock {
    param($serverInstance, $sqlQuery, $creds)

    $sqlConn = New-Object System.Data.SqlClient.SqlConnection
    $sqlConn.ConnectionString = "Data Source=tcp:$serverInstance;Integrated Security=True"
    $sqlConn.Open()

    $sqlCmd = New-Object System.Data.SqlClient.SqlCommand($sqlQuery, $sqlConn)
    $result = $sqlCmd.ExecuteScalar()

    $sqlConn.Close()
    $sqlConn.Dispose()
} -ArgumentList $svr, $verQuery, $creds
```
I'm getting an "Access is denied" error when I try to connect to the SQL Server instance. I've already verified that the credentials I'm entering are correct and that they do have the proper permission to connect to the SQL Server instance.

The issue seems to be related to the "Integrated Security=True" part of the connection string. This is because the credentials that are entered are not being passed to the SQL Server instance. I've tried setting the `SqlClient.SqlCredential` property to the credential object, but it still doesn't work.

How can I modify my code to properly pass the credentials to the SQL Server instance without having to refresh the Kerberos ticket cache with `klist.exe` utility on the target machine?[/INST]