Hi guys, I’m just wondering if SMO is avaiable from Powershell I’m trying to kill processes using SMO but it cant find the type
Running PowerShell script…
ERROR: New-Object : Cannot find type [Microsoft.SqlServer.Management.Smo.Server]: make sure the assembly containing this type is loaded.
ERROR: At C:\Program Files (x86)\Octopus Tentacle\Agent\testbackup123.ps1:12 char:22
ERROR: + $SQlSvr1 = New-Object <<<< Microsoft.SqlServer.Management.Smo.Server $serverInstance
ERROR: + CategoryInfo : InvalidType: ( [New-Object], PSArgumentException
ERROR: + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand
Any suggestions?