Skip to content

Method invocation failed: System.Object does not contain 'Trim' #5

@c-a-l-l-a-n

Description

@c-a-l-l-a-n

I'm getting an error on one of the trims:

Method invocation failed because [System.Object[]] does not contain a method named 'Trim'.
At line:190 char:5

190: $Output = (((((cmd.exe /c $Arguments | Where-Object { $_ -like "Enabled" } | Where-Object { $_ -notlike "example" }) -replace 'Enabled', '').Trim()) -replace '^\d+', '').Trim()) | ForEach-Object { ($_ -split ' {2,}')[1] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions