21 Aralık 2016 Çarşamba

Get All Content Databases from SQL by PowerShell

[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo")
$sqlServer = new-object ("Microsoft.SqlServer.Management.Smo.Server") "test\testsqlserver"
foreach($sqlDatabase in $sqlServer.databases) {$sqlDatabase.name}

Hiç yorum yok:

Yorum Gönder