Open 3xchaos opened 3 months ago
Sorry - hit enter and mess up the Steps to Reproduce
We first run the following to migrate the operators Copy-DbaAgentOperator -Source $SourceCS -Destination $CS -Force
We then migrate any categories that are required Copy-DbaAgentJobCategory -Source $SourceCS -Destination $CS -JobCategory $JC -Force
We then splat are variables for the job migration
$copyJobSplat = @{ Source = $SourceCS Destination = $CS Job = $_JobNames DisableOnSource = $false Force = $true Whatif = $false SourceSqlCredential = $MySQLCredential DestinationSqlCredential = $MySQLCredential Verbose = $true }
Then execute the Copy-DbaAgentJob command Copy-DbaAgentJob @copyJobSplat
Output of splat
Name Value
Source Data Source=
Whatif False
Verbose True
Destination Data Source=
Force True
DisableOnSource True
SourceSqlCredential System.Management.Automation.PSCredential
DestinationSqlCredential System.Management.Automation.PSCredential
All jobs migrate except the ones that have a operator defined that gets migrated Copy-DbaAgentOperator.
Note - I just dropped and recreated the operator using TSQL and then executed the migrate job and it functioned correctly so maybe the issue is with the Copy-DbaAgentOperator even though the operator looks correct after running this command
/** Object: Operator [
/** Object: Operator [
PS C:\Windows\system32> Copy-DbaAgentJob @copyJobSplat
VERBOSE: [12:16:25][Connect-DbaInstance] Connection string is passed in, will build empty server object, set connection string from instance
.InputObject, do some checks and then return the server object
VERBOSE: [12:16:25][Connect-DbaInstance] Server object passed in, will do some checks and then return the original object
VERBOSE: [12:16:25][Copy-DbaAgentJob] Working on job:
VERBOSE: Performing the operation "Disabling
Agent Job
I tried to reproduce the issue - but it works on my machine.
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
VERBOSE: [19:48:23][Connect-DbaInstance] Connection string is passed in, will build empty server object, set connection string from instance.InputObject, do some checks and then return the server object VERBOSE: [19:48:23][Connect-DbaInstance] Server object passed in, will do some checks and then return the original object VERBOSE: [19:48:23][Copy-DbaAgentJob] Working on job:
VERBOSE: Performing the operation "Operator(s) doesn't exist on destination. Skipping job " on target "".
VERBOSE: [19:48:24][Copy-DbaAgentJob] Operator(s) doesn't exist on destination. Skipping job
Steps to Reproduce
We first run the following to migrate the operators Copy-DbaAgentOperator -Source $SourceCS -Destination $CS -Force
We then migrate any categories that are required Copy-DbaAgentJobCategory -Source $SourceCS -Destination $CS -JobCategory $JC -Force
We then splat are variables for the job migration
Please confirm that you are running the most recent version of dbatools
PS C:\Users\bstevenson1adm> get-module | Select-object version, name
Version Name
2.1.7 dbatools 2023.9.21 dbatools.library 3.1.0.0 Microsoft.PowerShell.Management 3.1.0.0 Microsoft.PowerShell.Utility 2.0.0 PSReadline
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.17763.5458 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.17763.5458 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
SQL Server Edition and Build number
Source -> Microsoft SQL Server 2016 (SP3-GDR) (KB5029186) - 13.0.6435.1 (X64) Jul 30 2023 19:53:42 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) (Hypervisor)
Target -> Microsoft SQL Server 2019 (RTM-CU24) (KB5031908) - 15.0.4345.5 (X64) Dec 4 2023 14:44:16 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2019 Standard 10.0 (Build 17763: ) (Hypervisor)
.NET Framework Version
PSChildName Version
v2.0.50727 2.0.50727.4927 v3.0 3.0.30729.4926 Windows Communication Foundation 3.0.4506.4926 Windows Presentation Foundation 3.0.6920.4902 v3.5 3.5.30729.4926 Client 4.8.03761 Full 4.8.03761 Client 4.0.0.0