PowerShell script exchange
Post Reply
riahc3
Enthusiast
Posts: 60
Liked: 3 times
Joined: Oct 21, 2015 10:01 am
Full Name: John
Contact:

Cannot get Pre-Job and Post-Jost Powershell scripts to work

Post by riahc3 » Aug 06, 2019 3:10 pm

In older versions of Veeam, I used Powershell scripts perfectly....But in this version, I simply cannot get it to work...

I have this:

powershell.exe -ExecutionPolicy ByPass -File C:\Scripts\PreScript.ps1 -ErrorAction SilentlyContinue

powershell.exe -ExecutionPolicy ByPass -File C:\Scripts\PostScript.ps1 -ErrorAction SilentlyContinue

If I launch that line even in a NON admin Powershell session it works perfectly.

veremin
Product Manager
Posts: 16675
Liked: 1392 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Cannot get Pre-Job and Post-Jost Powershell scripts to work

Post by veremin » Aug 06, 2019 5:14 pm

The causes might vary, so reach our support team for further investigation. Also, it wouldn't harm to search these forums - there are plenty of topics discussing similar matter. Thanks!

riahc3
Enthusiast
Posts: 60
Liked: 3 times
Joined: Oct 21, 2015 10:01 am
Full Name: John
Contact:

Re: Cannot get Pre-Job and Post-Jost Powershell scripts to work

Post by riahc3 » Aug 06, 2019 7:11 pm

Its a lot faster to post it on a public forum and get some answers .

riahc3
Enthusiast
Posts: 60
Liked: 3 times
Joined: Oct 21, 2015 10:01 am
Full Name: John
Contact:

Re: Cannot get Pre-Job and Post-Jost Powershell scripts to work

Post by riahc3 » Aug 06, 2019 10:02 pm

Example, part of the script has


Invoke-Command -ComputerName FQDN.OF.SERVER -ScriptBlock {Stop-Computer -Force}

This does not run so I have some suspects of it being a permissions issue.

veremin
Product Manager
Posts: 16675
Liked: 1392 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Cannot get Pre-Job and Post-Jost Powershell scripts to work

Post by veremin » Aug 07, 2019 12:41 pm

Without seeing the script, account, permissions, etc. it's merely impossible to suggest anything. So, having a support ticket is the recommended approach.

As to typical causes, they have been discussed multiple times on these forums - so, feel free to search them through.

Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests