My network 10.10.10.0/24
The SQL server is in other network and other domain. I connect to it via vpn
IP address sql 192.168.1.1
I have access only sql without RDP
I try to connect to SQL server from Powershell.
invoke-dbaquery -SQLInstance 192.168.1.1 -sqlcredential 'sa' -query "select @@servername"
Work fine but appear a window so that input password. If we input the password then command work and output sql verssion.
How can do so that work without input the password?