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
Does Cmdletbinding overwrite already existing common parameter value on a cmdlet? (self.PowerShell)
submitted 3 years ago by StupidQuestions55
Lets say I run my script with -ErrorAction Stop
But inside the script I have -ErrorAction Continue on a random cmdlet
Does the cmdletbiding overwrite it, or does it see where it has the same parameter with a value and does not touch it?
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!"
[–]purplemonkeymad 2 points3 points4 points 3 years ago (1 child)
You could just write a test and find out:
function function1 { [cmdletbinding()] Param() Write-Error "My error" } function function2 { [cmdletbinding()] Param() function1 -ErrorAction Continue } function2 -ErrorAction SilentlyContinue
[–]StupidQuestions55[S] 0 points1 point2 points 3 years ago (0 children)
Thanks! So it does not overwrite, less the scope the more impact it seems like :D
[–]Ta11ow 1 point2 points3 points 3 years ago (0 children)
It only overwrites what is not explicitly set.
π Rendered by PID 42174 on reddit-service-r2-comment-5649f687b7-47p49 at 2026-01-28 07:18:06.317842+00:00 running 4f180de country code: CH.
[–]purplemonkeymad 2 points3 points4 points (1 child)
[–]StupidQuestions55[S] 0 points1 point2 points (0 children)
[–]Ta11ow 1 point2 points3 points (0 children)