Skip to content

Instantly share code, notes, and snippets.

@DiHo78
Created April 10, 2018 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DiHo78/802b9d03442d9743cc097a7c8272d401 to your computer and use it in GitHub Desktop.
Save DiHo78/802b9d03442d9743cc097a7c8272d401 to your computer and use it in GitHub Desktop.
SMOTest
add-type -Path 'D:\Program Files\Microsoft SQL Server\130\SDK\Assemblies\Microsoft.SqlServer.Smo.dll'
$server = New-Object -TypeName Microsoft.SQLServer.Management.Smo.Server "smotest"
$server.Databases.Item("OfflineDB")
add-type -Path 'D:\Program Files\Microsoft SQL Server\140\SDK\Assemblies\Microsoft.SqlServer.Smo.dll'
$server = New-Object -TypeName Microsoft.SQLServer.Management.Smo.Server "smotest"
$server.Databases.Item("OfflineDB")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment