我在远程服务器 1 上有一个 master.bat 文件,我想在位于同一网络上的 4 个远程服务器上并行运行它,并且具有相同的用户名和密码以作为服务器 1 登录。通过谷歌搜索,我探索了以下方法来做到这一点,但在我的情况下有一些限制:
1.PsExec tool : psexec \\Server1 C:\master.bat ---- But I am not allowed to install PsExec tool for security reasons.
2.Powershell : Invoke-Command -ComputerName $client -ScriptBlock { cd C:\master.bat} -Credential $(Get-Credential) -Authentication CredSSP ----But I have to enable PS Remoting (WinRM) on every remote machine on whom I need to execute scripts using PowerShell, for which I am not allowed.
还有其他方法可以在 4 个远程服务器上运行master.bat或master.ps1吗?
而且如果我没记错的话......
1.Installing PsExec tool has security drawbacks...??
2.Enabling PS Remoting (WinRM) also has chances of security threats...??