Sql smo

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: (:slight_smile: [New-Object], PSArgumentException
ERROR: + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand

Any suggestions?

This seems to work for me, if anyone has issue with SMO.
http://msdn.microsoft.com/en-us/library/hh245202.aspx