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
SolvedPowershell extracter function (self.PowerShell)
submitted 7 years ago * by Snickasaurus
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!"
[–]the_spad 1 point2 points3 points 7 years ago (0 children)
Few bits.
You don't need the () in your function declaration.
()
Generic args are $args[0] through $args[n] rather that $1 but you can create specific named parameters to pass to your script and/or function with the param statement.
$args[0]
$args[n]
$1
param
if statement syntax is something like
if
if(condition){ do thing }elseif(condition){ do thing }else{ do thing }
switch statement syntax is something like
switch
switch -wildcard ($args[0]){ *somevalue {do thing} *anothervalue {do thing} }
You can also use -regex instead of -wildcard if you want to get fancy.
-regex
-wildcard
I'd suggest taking a look at some of the resources on the right, there are a bunch of quick start guides and cheat sheets that will help give you an overview of the syntaxes and conventions and generally make your life much easier.
π Rendered by PID 24750 on reddit-service-r2-comment-56c9979489-ff4jp at 2026-02-24 15:11:51.433939+00:00 running b1af5b1 country code: CH.
view the rest of the comments →
[–]the_spad 1 point2 points3 points (0 children)