sorry for posting after a long time :( ..
Today I was reading something and found a interesting parameter named as “End-Of-Parameters” which in represented by “double hyphens” ( – – ) .
what is the usage ?
When we use End-of-Parameters in a command or in a script after it takes every thing as argument even they looks are parameters.
If you want to write –Message in Write-Warning cmdlet as a string which is also a parameter, there are two ways to do it.
1. using double quotes (“”)
Write-Warning -Message "-Message"
and we can also do the same with using “End-of-Parameters”
2. using End-of-Parameters
Write-Warning -Message -- -Message
cool isn’t :)