• Andy,

    I'm not very familiar with SMO or DMO, but you can only work with what portions of the object model are exposed. BackupDirectory is an exposed property, with warnings not to use it. I didn't see any properties for ports. Of course, SMO and DMO have the advantage that they are documented and supported better than registry keys.

    For me, I'm comfortable with Perl and the registry so this was my way to solve the issue. I can see that others might prefer a SMO approach.