Filter
Exclude
Time range
-
Near
13 Dec 2023
And the answer, as correctly given by @MrFly72 , is that it's in the "Line" property of the $MyInvocation variable. Now to write a (simple) regex to see if it is passed or not Note that use of a breakpoint in ISE (also available in @code) so I can easily check variables, etc
12 Dec 2023
Anyone know if there's a way in Windows PowerShell to find out if a parameter to the executing script has been passed as an alias? I want the script to behave differently if an alias is used but by the time the script runs, the alias has been "converted" to the real parameter name so $PSBoundParameters doesn't help. I asked #ChatGPT 4 but it was no use
1
4
740
21 Aug 2021
Here's how I take advantage of $Myinvocation in my #PowerShell scripting. buff.ly/3ATs2mG
1
3
9
19 Aug 2021
New on the blog: Doing More with $MyInvocation and #PowerShell jdhitsolutions.com/blog/powe…

2
5
Magic of MyInvocation in PowerShell 🔥 👉 kpatnayakuni.com/2020/07/01/… #PowerShell #100DaysOfCode

3
3
"Magic of $MyInvocation in PowerShell" zpr.io/HtgeU #PowerShell

7
7
You can already get the parameters from $MyInvocation, problem is you need to stitch the values together by hand
1
2
27 Mar 2019
@James_inthe_box @JAMESWT_MHT @shotgunner101 @HONKONE_K @Rmy_Reserve #APT38 app.any.run/tasks/b2287622-c… Some interesting on the loader, the main function mlp is used for initiate the loader, after the execution, it use MyInvocation for have the path of the script to delete
1
1
4
Develop and Debug PowerShell Scripts with MyInvocation mssqltips.com/sqlservertip/5…

1
10 Dec 2018

5
2
Unravel the mystery of $MyInvocation: ow.ly/4t5230dnQWh

1
6
9
New #Petri content from Missy Januszko: Unraveling the Mystery of $MyInvocation ift.tt/2uJr8am

6
4
Using $MyInvocation to debug your #PowerShell functions ow.ly/jWQ930cSz1G

1
3