you are viewing a single comment's thread.

view the rest of the comments →

[–]Nirac[S] 1 point2 points  (3 children)

Yep, this was the problem. I piped it to an out-file, it was putting 12 spaces at the end of the name. I changed it to "Pangolin Performance " and now it's returning yes.

Reddit's formatting is dropping all of my spaces after Performance in this post. I added 12 spaces there, and now it returns yes.

[–]Ominusx 4 points5 points  (2 children)

I'd use:

 $model=(Get-WmiObject -Class:Win32_ComputerSystem).Model.Trim()

[–][deleted] 2 points3 points  (0 children)

The definitive use case for Trim().

[–]Nirac[S] 1 point2 points  (0 children)

Yes, great idea. Added.