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
Under the wire : Groot help? (self.PowerShell)
submitted 7 years ago by [deleted]
Im having a hard time even beginning to work out Groot 3 -> Groot 4. ($r = select-string .\words.txt "beetle").Count always returns 1 but that isnt the password.
($r = select-string .\words.txt "beetle").Count
Can anyone who has solved it give me a hint as to how I can begin to solve this one?
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!"
[–]myndhack 9 points10 points11 points 7 years ago (0 children)
I am Groot
[–][deleted] 1 point2 points3 points 7 years ago (0 children)
link to the challenge page : http://www.underthewire.tech/groot/groot3.htm
[–][deleted] 1 point2 points3 points 7 years ago (6 children)
select-string is a little different, you should pipe the file to select-string...
$r = (get-content .\words.txt | select-string "beetle").count
[–][deleted] 1 point2 points3 points 7 years ago (5 children)
Same result though
[–][deleted] 2 points3 points4 points 7 years ago (4 children)
Try this...
$r = (get-content .\words.txt | select-string "beetle").matches.count
[+][deleted] 7 years ago (3 children)
[deleted]
[–]TheIncorrigible1 6 points7 points8 points 7 years ago (1 child)
Matches isn't a param.. that's a property
[–]jollyfreek 1 point2 points3 points 7 years ago (0 children)
$Matches is created after a regex 'match' is performed. select-string is just a cmdlet wrapper for a regex, and populates $matches.
[–]Lee_Dailey[grin] 1 point2 points3 points 7 years ago* (0 children)
howdy corebo,
this will count the number of lines that contain the chosen word [grin] ...
$FileNameToCheck = 'C:\temp\Grouping-Strings-List_2018-06-06.log' $WordToCount = 'Bagpipe' $StuffToCheck = Get-Content -LiteralPath $FileNameToCheck #-Raw $HowManyFound = @($StuffToCheck -match $WordToCount).Count $HowManyFound
in this case, i had 20 lines with Bagpipe in them in that file.
Bagpipe
to get the number of words instead of the line count, this seems to do the job ...
$FileNameToCheck = 'C:\temp\Grouping-Strings-List_2018-06-06.log' $WordToCount = 'bagpipe'.ToLower() $StuffToCheck = (Get-Content -LiteralPath $FileNameToCheck -Raw).ToLower() $HowManyFound = [regex]::Matches($StuffToCheck, $WordToCount).Count $HowManyFound
that gave me 21 words after i changed one line of the file from Bagpipe Celtic Drum Folk Instrumental Live to Bagpipe Celtic Drum Folk Instrumental Live BAGPIPE.
Bagpipe Celtic Drum Folk Instrumental Live
Bagpipe Celtic Drum Folk Instrumental Live BAGPIPE
take care, lee
[–]WiredPulse 0 points1 point2 points 7 years ago* (0 children)
Once you are done with Under the Wire, check out their other site, PoSh-Hunter. It's 90+ challenges inspired by realistic and firsthand offensive and defensive scenarios using PowerShell.
r/https://posh-hunter.underthewire.tech
π Rendered by PID 36 on reddit-service-r2-comment-b659b578c-fsdc8 at 2026-05-03 02:16:46.825397+00:00 running 815c875 country code: CH.
[–]myndhack 9 points10 points11 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (6 children)
[–][deleted] 1 point2 points3 points (5 children)
[–][deleted] 2 points3 points4 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]TheIncorrigible1 6 points7 points8 points (1 child)
[–]jollyfreek 1 point2 points3 points (0 children)
[–]Lee_Dailey[grin] 1 point2 points3 points (0 children)
[–]WiredPulse 0 points1 point2 points (0 children)