Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
Invoke-Command -ComputerName 192.168.0.1 -ScriptBlock {(TestFunc "test")}
function MyFunction () { Write-Host 'Hello, World!' } Invoke-Command -ComputerName DC1 -ScriptBlock ${Function:MyFunction}
The FilePath parameter specifies a script that is located on the local computer. The script runs on the remote computer and the results are returned to the local computer.