You can use mssql.server in your scripts for that purpose.