You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set-DbaAgentJobStep -Job and -StepName parameters should be able to accept pipeline input
Summary of new feature
The -Job parameter and -StepName parameter of Set-DbaAgentJobStep should be able to accept pipeline input, such as piped from Get-DbaAgentJobStep and/or Get-DbaAgentJob.
They also do not accept $variable input, throwing "Cannot convert value to type System.String" errors.
For example, this does not work and I expected it to:
Set-DbaAgentJobStep : Cannot process argument transformation on parameter 'StepName'. Cannot convert value to type System.String.
At line:1 char:70
+ ... qlInstance MYSERVER -Job $agentjobs -StepName $agentjobsteps -Databa ...
+ ~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Set-DbaAgentJobStep], ParameterBindingArgumentTransformationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Set-DbaAgentJobStep
Proposed technical details (if applicable)
I am not smart enough to know how to technically solve this :( :) :(
But the only way I could figure out to get this to KIND OF work (while throwing a bunch of warnings for every cartesian product possible combination) was to:
Sorry for the delay but the function should not accept pipes from Get-DbaAgentJobStep.
The command allows to get the job steps from get-DbaAgentJobStep and get those changes and push those to other servers and jobs and eventually job steps.
Set-DbaAgentJobStep -Job and -StepName parameters should be able to accept pipeline input
Summary of new feature
The
-Job
parameter and-StepName
parameter of Set-DbaAgentJobStep should be able to accept pipeline input, such as piped fromGet-DbaAgentJobStep
and/orGet-DbaAgentJob
.They also do not accept $variable input, throwing "Cannot convert value to type System.String" errors.
For example, this does not work and I expected it to:
This also did not work:
This also did not work:
which throws red error:
Proposed technical details (if applicable)
I am not smart enough to know how to technically solve this :( :) :(
But the only way I could figure out to get this to KIND OF work (while throwing a bunch of warnings for every cartesian product possible combination) was to:
Latest version of dbatools as of writing
0.9.490
The text was updated successfully, but these errors were encountered: