PowerShell script exchange
Post Reply
riahc3
Expert
Posts: 110
Liked: 5 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 »

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: 20270
Liked: 2252 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 »

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
Expert
Posts: 110
Liked: 5 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 »

Its a lot faster to post it on a public forum and get some answers .
riahc3
Expert
Posts: 110
Liked: 5 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 »

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: 20270
Liked: 2252 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 »

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 20 guests