Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在日志跟踪期间设置Powershell标题_Powershell_Tail - Fatal编程技术网

在日志跟踪期间设置Powershell标题

在日志跟踪期间设置Powershell标题,powershell,tail,Powershell,Tail,打开日志跟踪时需要设置powershell标题。我有每一个步骤的工作脚本,但它不工作,而俱乐部在一起 $Host.UI.RawUI.WindowTitle = "Server1 - Test.log" Get-Content "\\server1\Test.log" -tail 10 –Wait 每条线单独工作,但不能同时工作。请分享解决此问题的任何步骤 我得到了这个错误当我执行第1行时,我的标题改变了。这里显示的内容是有效的。问题出在未显示的代码中。

打开日志跟踪时需要设置powershell标题。我有每一个步骤的工作脚本,但它不工作,而俱乐部在一起

$Host.UI.RawUI.WindowTitle = "Server1 - Test.log"

Get-Content "\\server1\Test.log" -tail 10 –Wait
每条线单独工作,但不能同时工作。请分享解决此问题的任何步骤


我得到了这个错误

当我执行第1行时,我的标题改变了。这里显示的内容是有效的。问题出在未显示的代码中。(或者你按错误的顺序执行。)@T-Me你是说上面的脚本对你有用吗?是的。在Powershell和ISE中。@T-Me我更新了我在问题中使用脚本时遇到的错误。在我执行第1行时,我的标题更改了。这里显示的内容是有效的。问题出在未显示的代码中。(或者你按错误的顺序执行。)@T-Me你是说上面的脚本对你有用吗?是的。在Powershell和ISE中。@T-Me我更新了我在问题中使用脚本时遇到的错误