Powershell profile

来源:互联网 发布:编程不等于怎么表示 编辑:程序博客网 时间:2024/04/27 16:12
Powershell profiles help us predefine variables/functions we use routinely and so we have them every time we launch Powershell. Also we can distribute profile to force powershell on all machines have same behavior in a larget enterprise. 
Powershell profile is not created automatically.


You can have four different profiles in Windows PowerShell. The profiles are listed in load order. The most specific profiles have precedence over less specific profiles where they apply.
%windir%\system32\WindowsPowerShell\v1.0\profile.ps1 # This profile applies to all users and all shells.
%windir%\system32\WindowsPowerShell\v1.0\ Microsoft.PowerShell_profile.ps1 #This profile applies to all users, but only to the Microsoft.PowerShell shell.
%UserProfile%\My Documents\WindowsPowerShell\profile.ps1 # This profile applies only to the current user, but affects all shells. 
%UserProfile%\My Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 # This profile applies only to the current user and the Microsoft.PowerShell shell.



What is Microsoft.PowerShell shell? 

I actually want to know, I will be happy if you can share with me.

0 0
原创粉丝点击