• I'm pretty sure it's because that reference is incorrect. Microsoft.SqlServer has two other classes. Server and Management, in PowerShell. I suspect you'll have to create the object a different way.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning