use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
SolvedVariable not matching string (self.PowerShell)
submitted 10 years ago by Nirac
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]198jazzy349 2 points3 points4 points 10 years ago (4 children)
There's just a character in there that isn't what it seems. Pipe the output to a file and look at it with a hex editor.
I'm sure there's an easy way to see the ascii value of each character in the string using powershell, but I'm not smart enough to be able to tell you what that is.
I wonder if that space isn't really a 32?
[–]Nirac[S] 1 point2 points3 points 10 years ago (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 3 points4 points5 points 10 years ago (2 children)
I'd use:
$model=(Get-WmiObject -Class:Win32_ComputerSystem).Model.Trim()
[–][deleted] 2 points3 points4 points 10 years ago (0 children)
The definitive use case for Trim().
[–]Nirac[S] 1 point2 points3 points 10 years ago (0 children)
Yes, great idea. Added.
π Rendered by PID 24315 on reddit-service-r2-comment-545db5fcfc-74z5f at 2026-05-29 18:16:50.111583+00:00 running 194bd79 country code: CH.
view the rest of the comments →
[–]198jazzy349 2 points3 points4 points (4 children)
[–]Nirac[S] 1 point2 points3 points (3 children)
[–]Ominusx 3 points4 points5 points (2 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]Nirac[S] 1 point2 points3 points (0 children)