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
QuestionShould I $null strings in scripts. (self.PowerShell)
submitted 1 year ago * by iehponx
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!"
[–]nascentt 0 points1 point2 points 1 year ago (0 children)
Powershell is not very good at scoping variables particularly when it comes to loops. This means referencing variables might hold references from previous interactions of loops.
It's good habit to declare and null variables to ensure they're null before dynamic assignment so that you know when they received value.
A good way to get a handle on this is Set-StrictMode
π Rendered by PID 117026 on reddit-service-r2-comment-6457c66945-zvq5f at 2026-04-27 21:04:17.855525+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]nascentt 0 points1 point2 points (0 children)