Skip to content

Strings require trimming conflicting with ease of use with PowerShell Comparison Operators #15

@leeberg

Description

@leeberg

It seems like our output needs trimming. Using an -eq against the formatted output of many of the commands will not work properly without a trim...

Example

DOESN'T WORK!: $LogonPasswords = Get-MKLogonPassword | Where-Object { $_.UserName -eq $TargetUserName

DOES WORK!: $LogonPasswords = Get-MKLogonPassword | Where-Object { $_.UserName.Trim() -eq $TargetUserName

}

This isn't horrible but can be frustrating - should clean this up.

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