dataplat / dbatools

🚀 SQL Server automation and instance migrations have never been safer, faster or freer
https://dbatools.io
MIT License
2.39k stars 787 forks source link

Support OwnerLoginName in New-DbaAgentSchedule #9370

Closed david-garcia-garcia closed 3 weeks ago

david-garcia-garcia commented 1 month ago

Type of Change

C:\entrypoint\refreshenv\ConfigureMssqlJobs.ps1 : The specified
mssql-1  | '@owner_login_name' is invalid (valid values are returned by sp_helplogins
mssql-1  | [excluding Windows NT groups]).

It looks like this default account has some sort of trait that prevents it from being the owner of a Schedule. You can create jobs using other users as owners.

Approach

Allow to manually set the Ownership of the schedule during creation.

potatoqualitee commented 3 weeks ago

Tests pass, fab job. Thank you 🙇🏼