Q. How can I check the exact command line used to launch a PowerShell instance?
A. It can sometimes be useful to know the exact parameters used to launch PowerShell, for example was -NOPROFILE used. There are a number of methods to check how PowerShell was launched. I typically use:
gwmi Win32_Process CommandLine -filter "ProcessId = $PID" | % CommandLine
If you just wanted to check on the arguments used you could use: