PowerShell中一个分号引发的问题
今天在用start-process这个cmdlet去新开一个窗口执行powershell的时候遇到的一个问题看一下测试代码:
以下这个ps代码命名为profile.ps1,并且保存在%UserProfile%\My Documents\WindowsPowerShell这个目录下
它就相当于是运行powershell时自动加载的脚本,代码如下
function print { Param( $param1="default1" $param2="default2" ) write-host $param1 write-host $param2 Read-Host }
页:
[1]