2016-07-13 2 views

ответ

0

Что-то вроде этого, может быть:

$restrictedServices = @(Get-Content X:\restricted.txt) -join '|' 
Get-Service example* | ?{$_.Name -notmatch $restrictedServices} | Start-Service -PassThru 
+0

Он работал фи ne, спасибо :) –

0

Вы можете сделать что-то вроде следующего:

Get-Service -Name * -ComputerName PCNameHere | Where {$_.Name -like "example*"} | Restart-Service -Force -Verbose 
Смежные вопросы