Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New-DbaAgentSchedule contained AG fails: "value cannot be null. parameter name: newParent" #9535

Open
DorBreger opened this issue Oct 31, 2024 · 2 comments
Labels
bugs life triage required New issue that has not been reviewed by maintainers

Comments

@DorBreger
Copy link
Contributor

Verified issue does not already exist?

I have searched and found no existing issue

What error did you receive?

When trying to create a new agent job on contained availability groups using new-dbaagentSchedule we encountered a weird error:

Warning [16:02:15][New-DbaAgentSchedule] something went wrong adding the schedule.
| Value cannot be null
Parameter name: newParent
This seems to happen in every agent related command on contained availability groups.

Steps to Reproduce

# provide your command(s) executed pertaining to dbatools
# please include variable values (redacted or fake if needed) for reference

Create a contained availability group with a listener
Run New-DbaAgentSchedule -SqlInstance 'listener' -Schedule name -Force

Please confirm that you are running the most recent version of dbatools

Can confirm I'm running dbatools 2.1.26

Other details or mentions

No response

What PowerShell host was used when producing this error

Windows PowerShell (powershell.exe)

PowerShell Host Version

Name Value


PSVersion 5.1.20348.2031
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.2031
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

SQL Server Edition and Build number

Microsoft SQL Server 2022 (RTM-CU14) (KB5038325) - 16.0.4135.4 (X64) Jul 10 2024 14:09:09 Copyright (C) 2022 Microsoft Corporation Enterprise Edition (64-bit) on Windows Server 2022 Datacenter 10.0 (Build 20348: ) (Hypervisor)

.NET Framework Version

4.8.04161

@DorBreger DorBreger added bugs life triage required New issue that has not been reviewed by maintainers labels Oct 31, 2024
@niphlod
Copy link
Contributor

niphlod commented Oct 31, 2024

hum.... not sure SMO supports creating jobs in CAGs . does it work via SSMS ?

@DorBreger
Copy link
Contributor Author

hum.... not sure SMO supports creating jobs in CAGs . does it work via SSMS ?

It does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs life triage required New issue that has not been reviewed by maintainers
Projects
None yet
Development

No branches or pull requests

2 participants