我想在后台运行一个函数Get_List,当它运行时,屏幕上应该显示“搜索信息”+圆点,以使其看起来像是正在完成工作。
function Get_List {
#Some basic command to run in the background
}。
function Other{
#start the Get_List function in background
while(Get-Job -State "Running")
{
#show "Searching for Information"
#no need to code this part for me
}
}我见过很多人有类似的问题,但我的(我认为)有点不同。没有参数被传递,我只想在后台运行一些东西,大约需要5-10秒,当它完成时,就是这样。
我试着尽可能的简单。任何帮助都是非常感谢的。
发布于 2016-04-29 22:21:28
简单的替代方法是使用Write-Progress来显示您的假进度或实际进度。看一看https://technet.microsoft.com/en-us/magazine/2008.03.powershell.aspx
https://stackoverflow.com/questions/36920966
复制相似问题