Skip to content

Let's Document How to Use Set-DbaAgentJobOutputFile's Step Parameter #9674

@ReeceGoding

Description

@ReeceGoding

Summarize Functionality

None of the examples in the documentation for Set-DbaAgentJobOutputFile show how to use the -Step parameter. I did not find it intuitive. For example, any of the following could be reasonable choices:

  1. Pass in the name of the step.
  2. Pass in the ID of the step.
  3. Pass in the output of Get-DbaAgentJobStep.

On my first usage, I foolishly picked the third option because I could see that the desired type is <Object[]>. If you look closer at the code, you will see this

        [Parameter(HelpMessage = 'The Job Step name',
            ValueFromPipeline,
            ValueFromPipelineByPropertyName)]
        [ValidateNotNull()]
        [ValidateNotNullOrEmpty()]

which strongly suggests that it just wants the step's name.

I'm going to try to fix this myself today, but I don't have much experience with this cmdlet.

Is there a command that is similiar or close to what you are looking for?

Yes

Technical Details

It's just documentation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions