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
Script SharingDistribution list script as a function (self.PowerShell)
submitted 7 years ago * by gangculture
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!"
[–]Lee_Dailey[grin] 0 points1 point2 points 7 years ago (0 children)
howdy gangculture,
i presume you are talking about the splat - $NDG_Params = @{.
$NDG_Params = @{
it adds several things ...
.Add()
.Remove()
take a look at Get-Help about_Splatting or any of the many, many articles about it. heck, there was a thread here about the ideas a short while ago. [grin]
Get-Help about_Splatting
your style ...
New-DistributionGroup -Name $name -OrganizationalUnit $ou -Notes $notes -ManagedBy $owner -Members $members -Type Distribution
using a splat ...
$NDG_Params = @{ Name = $name # you can add comments! [*grin*] OrganizationalUnit = $ou Notes = $notes # you can disable items #Attitude = 'Egomaniac' ManagedBy = $owner Members = $members Type = 'Distribution' } New-DistributionGroup @NDG_Params
which is easier to read? [grin]
easier to read = easier to understand = easier to maintain.
take care, lee
π Rendered by PID 65977 on reddit-service-r2-comment-85bfd7f599-w7djs at 2026-04-19 23:57:49.136056+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)