Skip to main content
added 87 characters in body
Source Link
Shane Bishop
  • 243
  • 1
  • 3
  • 14

I found one solution:

((dir resources).Name | select-string Windows | out-string).Trim()

out-string converts an input from another command to a string, and Trim() is a function that only works on strings (i.e., Trim() won't work on the output of a command that returns some non-string type).

I found one solution:

((dir resources).Name | select-string Windows | out-string).Trim()

out-string converts an input from another command to a string, and Trim() is a function that only works on strings.

I found one solution:

((dir resources).Name | select-string Windows | out-string).Trim()

out-string converts an input from another command to a string, and Trim() is a function that only works on strings (i.e., Trim() won't work on the output of a command that returns some non-string type).

Source Link
Shane Bishop
  • 243
  • 1
  • 3
  • 14

I found one solution:

((dir resources).Name | select-string Windows | out-string).Trim()

out-string converts an input from another command to a string, and Trim() is a function that only works on strings.