Answer the question
In order to leave comments, you need to log in
How to track the execution of PS scripts in zabbix?
Good afternoon.
Tell me how to track the execution of a PowerShell script in zabbix. Did it work or end with an error.
Answer the question
In order to leave comments, you need to log in
https://www.zabbix.com/documentation/2.4/manual/co...
$dest ="C: est"
New-Item $dest -type directory -force
$source ="c:samplefile.txt"
Copy-Item $source $dest
exit $LASTEXITCODE // или возвращайте свой код ошибки
$LastExitCode
Contains the exit code of the last Windows-based program that was run.
try {
Copy-Item -ErorAction Stop .......
}
catch {
exit 1
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question