0

可以在控制台中加载 $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)
}
4

1 回答 1

1

$psISE是仅在PowerShell_Ise.exe环境中可用的属性,所以简短地说:没有
但是,打开两个文件对我有用 - 它会打开一个包含该文件的新选项卡。

于 2010-08-05T14:32:32.300 回答