10 lines
300 B
PowerShell
Executable File
10 lines
300 B
PowerShell
Executable File
Add-Type -AssemblyName System.Data
|
|
try {
|
|
$c = New-Object System.Data.SqlClient.SqlConnection('server=10.10.10.101;database=GXWMS;uid=sa;pwd=Gx@20240111;Pooling=true')
|
|
$c.Open()
|
|
Write-Output 'DB OK'
|
|
$c.Close()
|
|
} catch {
|
|
Write-Output ('DB FAIL: ' + $_.Exception.Message)
|
|
}
|