-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors When AddKey Parameter Contains a Space #16
Comments
I think I found it can you try this fix 9d5a29a in Join-Object.ps1? |
That seems to have fixed it. Thanks for digging into this so quickly! I tested on PS 5.1 on WS2016. |
Merged
I have changed the fix: # from
$RowMain.'YourKey'
# to
$RowMain.$AddKey
# DataTable
# from
$RowMain['YourKey']
# to
$RowMain[$AddKey] So it will work with things like |
Released to gallery. please reopen if you find any issue |
Awesome, thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi There,
I've noticed that when I run Join-Object and specify the -AddKey parameter with a space, e.g.:
$CSVInterimResult = Join-Object -Left @($hashtableWMPInventoryComputers.Values) -Right @($hashtableSophosComputers.Values) -LeftJoinProperty 'Computer Name' -RightJoinProperty 'Name' -Type 'AllInBoth' -AddKey 'Computer Name' -ExcludeLeftProperties 'Computer Name' -ExcludeRightProperties 'Name'
I get errors:
On the other hand, if I run this same command without the space in the parameter, e.g.,:
$CSVInterimResult = Join-Object -Left @($hashtableWMPInventoryComputers.Values) -Right @($hashtableSophosComputers.Values) -LeftJoinProperty 'Computer Name' -RightJoinProperty 'Name' -Type 'AllInBoth' -AddKey 'ComputerName' -ExcludeLeftProperties 'Computer Name' -ExcludeRightProperties 'Name'
This works just fine.
The text was updated successfully, but these errors were encountered: