我有以下批处理文件:
type nul>"\\gccevault\f$\EVDATA\Archives\VSG01\MailboxVS01\Ptn1\ignorearchivebittrigger.txt"
REM clear backup mode on site "C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe" -psconsolefile "f:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {clear-VaultStoreBackupMode -Name GCC -EVServerName gccevault1 -EVObjectType Site}"
REM clear backup mode on indexes in site
"C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe" -psconsolefile "f:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {clear-IndexLocationBackupMode -EVServerName gccevault1 -EVSiteName GCC}"
我需要将其转换为能够在计算机上执行它,但是从其他服务器调用它。
答案 0 :(得分:0)
您可以简单地使用PowerShell远程处理来调用像这样的批处理文件远程处理
Invoke-Command -ComputerName RemoteComputer {& {c:\ temp \ localfile.bat}}