Reputation: 47
How to get the Server name, database name from ODBC DSN using PowerShell?
When I execute PS:> Get-OdbcDSN, it shows partial Attribute string. but not full string.
Upvotes: 1
Views: 2235
Reputation: 577
Here is a simple ps script to list out all "Attribute"
$dsn = Get-ODBCDSN -name "yourOdbcDsnHere"
foreach ($attr in $dsn.Attribute) {
Write-Output $attr
}
hope this help
Upvotes: 1
Reputation: 16116
Change your screen/output formatting settings and or try...
Get-OdbcDSN |
Select-Object -Property '*' |
Format-List -Force
See also:
Upvotes: 1