so - i'm using a pretty... unsupported lab here
6.7 U1 vCenter with ESXi on 6.7 U1.
For one VM i enabled HW-Passtrough to put a GPU and USB-Controller trough it (using this ESXi as a Workstation ). Ofcourse i can't snapshot a VM to which i passtrough stuff. Therefore i need to shut it down and afterwards reboot the whole ESXi or else i can't start the workstation VM due to the GPU Passtrough.
So i decided to create two Powershell Scripts and imported the following into my powershell profile under my veeam service account:
Code: Select all
Write-Host "Hello my friend, come in and listen for a while...."
Import-Module VMware.PowerCLI
Connect-VIServer vcsa-01.lab.local
my pre-job script contains the following:
Code: Select all
Connect-VIServer vcsa-01.lab.local
get-vm ol-workstation | stop-vm -Confirm $false
the same with my reboot skript.
Is there something missing or should i load the whole stuff in each script and not in the powershell profile variable?