我们可以使用通过vRealize Orchestrator安装的工具将脚本或文件命令推送到虚拟机。powershell是否也能做到这一点。
If the VMware Tools are installed you can use the Invoke-VMScript and Copy-VMGuestFile cmdlets.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
If the VMware Tools are installed you can use the Invoke-VMScript and Copy-VMGuestFile cmdlets.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
谢谢!,这个是可以的,但是我发现他只能进行单行命令。如果需要多行,怎么处理。
例如同时推送下面两行命令,需要如何书写。
xcopy \\192.168.8.125\public\download\LAPS.x64.msi C:\ttyy\ /S /E /Y
start /i C:\ttyy\LAPS.x64.msi /passive /quiet
If the target Guest OS is a Linux based OS, you can use the semi-column (;) to pass multiple commands in one line.
Or you can try my Invoke-VMScriptPlus function, which adds a multi-line option for Linux Guest OS.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference