Skip to content

Support Using Class Object Method in command used in the SCriptblock #215

@Strada-EricFr

Description

@Strada-EricFr

Do you want to request a feature or report a bug?

What is the current behavior?
Is it possible to use a object class method to be used in the Scripblock ?

example:
tart-ThreadJob -ScriptBlock {
# Get Ticket Properties from database
$lv_Tems.GetItempProperties([oracleDb]$DBConnection)

Unable to find type [oracleDb].
InvalidOperation:

How is it possible to make it work ?
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

What is the expected behavior?

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?

Please provide a code example showing the issue, if applicable:

#Code goes here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions