Question related to -NoProfile parameter

Hello ,

I am learning power shell and I have a quick question relating to the -NoProfile parameter. I tried to google for the term but I have not successfully found an answer yet. Could you please explain of what does it mean if you know the answer.

I have an example such as

powershell -noprofile -windowstyle hidden -file “C:\Users\umktdm\Desktop\PowerShell Script\test.ps1”

 

That I execute from my command line , and I 'd like to know what -noprofile does to my example.

 

Thank you so much in advance for the help.

Tom

That means that no Powershell profile will be loaded if there is one. If you don’t have one it does not make any difference. Run

powershell /?
to get the help.

And to add to that, this might help …

 

<p style="text-align: center;">Let you explain more broadly.</p>
A profile is a file which contains code which runs every time when powershell is loaded. A profile is not created by default. You can just create it using this:

New-Item $profile -Type file

Now you can open your $profile and add code to it.

When you add NoProfile parameter, powershell will not load the profile. Look at powershell /? As Olaf pointed.

Thank you much All for the helps on NoProfile and what I need to look for the explanation on it.