Powershell foreach脚本保持循环

时间:2019-04-18 17:26:52

标签: powershell

我正在尝试使用dbatools获取VLF列表并准备此脚本,它给了我想要的结果,但是它从未停止,请继续运行

$servers = Get-Content "C:\test\server_lists_agents.txt"
foreach ($server in $servers) 
{
   Test-DbaDbVirtualLogFile -SqlInstance $servers | select sqlinstance, database, total 
}

$servers = Get-Content "C:\test\server_lists_agents.txt"
foreach ($server in $servers) 
{
   Test-DbaDbVirtualLogFile -SqlInstance $servers | select sqlinstance, database, total 
}

0 个答案:

没有答案