可以在控制台中加载 $psise 对象吗?我想在 ISE 中打开几个文件,但在做
>ise filename
>ise filename2
只打开第一个。在 ISE 内部我没有这个问题,因为我使用 $psise 对象打开文件
function qwe($file){
if(-not (Test-Path $file)){
New-Item -Name $file -ItemType file
}
$filepath = Resolve-Path $file;
$psISE.CurrentPowerShellTab.Files.Add($filepath)
}