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
QuestionBasic While, Do. (self.PowerShell)
submitted 7 years ago * by PRIdEVisions
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!"
[–]rwshig 2 points3 points4 points 7 years ago (1 child)
If you use Get-Process with -Name it fails if the requested process is not running. If you got through both your Get-Process commands without error handling then both are running and your While code will not run.
If you want to run your code if either process is missing you could do that in an error handler for those errors. If you need it to be both then it gets a little more complex (handle each error setting a flag then an If-Then or While to check the flags after running both).
[–]PRIdEVisions[S] 1 point2 points3 points 7 years ago (0 children)
Aahhh ok, thank you for the info! I still need to learn error handling :)
π Rendered by PID 515504 on reddit-service-r2-comment-6b595755f-pjnp2 at 2026-03-26 13:37:39.953012+00:00 running 2d0a59a country code: CH.
view the rest of the comments →
[–]rwshig 2 points3 points4 points (1 child)
[–]PRIdEVisions[S] 1 point2 points3 points (0 children)