Windows PowerShell Home
Square brackets in property names not handled correctly by select-object
7/8/2013 1:17:03 AM
User(s) can reproduce this bug
Using select-object to filter based on property names that have square brackets in their name fails.
The following blog post describes the context in more detail and a comment from Jeffrey Snover:-
How often does this happen?
Have you seen this problem before in this product?
Yes, this happens in previous released versions
Create a simple .csv file with the following two entries (e.g. Customers.txt):-
Now try and select the columns with select-object:-
C:\> PowerShell "import-csv Customers.txt | select '[FirstName]','[LastName]'"
The column names come out correctly but no data appears.
to post a comment.
Please enter a comment.
to post a workaround.
Please enter a workaround.
© 2014 Microsoft