Skip to content

Invoke-Script command should support arguments #360

@michaellwest

Description

@michaellwest

Use case: Pass data to script for execution.

$props = @{
    Path = "License Expiration\Tasks\License Expiration Notification"
    Arguments = $to,$from,$subject,$body
}
Invoke-Script @props

Content of the script:

param(
    [string[]]$To,
    [string]$From,
    [string]$Subject,
    [string]$Body
)

Send-MailMessage @PSBoundParameters

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions