So, right now I'd like to just run a pre-job to stop BExec services and a post-job to start them again.
So far I have enabled remoting on the physical tape server (B&R server is a dedicated VM) and I have a powershell script on the B&R server that will successfully start/stop the services simply by executing the script in a "standard" (as opposed to "run as administrator") powershell console so I know the whole remoting side of things is working perfectly.
However, the pre/post jobs are stating the script is executed but they obviously complete too quickly for it to actually have run so I'm not sure what I need to do differently to get Veeam to execute the scripts properly.
The stop script is simply this (start scipt is identical but obviously "Start-service"):
#############################
#Stop Backup Exec Services on <TAPE-SERVER>
get-service -Name BackupExecAgentBrowser -Computername <TAPE-SERVER> | Stop-service
get-service -Name BackupExecJobEngine -Computername <TAPE-SERVER> | Stop-service
get-service -Name BackupExecRPCService -Computername <TAPE-SERVER> | Stop-service
get-service -Name BackupExecDeviceMediaService -Computername <TAPE-SERVER> | Stop-service
get-service -Name BackupExecAgentAccelerator -Computername <TAPE-SERVER> | Stop-service
#############################
Note I don't seem to need "new-pssession" in the above code?
I'm not using any Veeam-specific code so presumably I don't need to Add-VeeamPsSnap either?
Any suggestions welcome (I only occasionally dabble in PS & generally cobble stuff together based on research but haven't found anything where Veeam stops remote services as I'd concede it's probably not a common requirement!
