问题
在Windows下自动化,写了输出日志的公共模块,需要在所以脚本执行前执行。就像Linux的.bashrc,.profile,启动shell之前都会执行。
Path for PowerShell profile
# c:/users/your_user_name/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1
在新的脚本里面调用
.$profile
# your code below
在Windows下自动化,写了输出日志的公共模块,需要在所以脚本执行前执行。就像Linux的.bashrc,.profile,启动shell之前都会执行。
# c:/users/your_user_name/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1
.$profile
# your code below
转载于:https://my.oschina.net/fqzhang/blog/1810723