Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

Problem with deploy batch/powershell

I built a script that elevate permission as administrator, they work good, when I execute manual, but but when I sent for computer via deploy OCS this not work. What can I make?
in OCS Inventory NG server for Unix by (340 points)

3 Answers

0 votes
The (Windows) agent is installed as service, generally as system account = local admin.

So deployement package run naturally as system account = no need to elevation.

(This is a security risk : an OCS super admin can do anything on windows  or linux computer !)
by (20.1k points)
0 votes
But when I execute a script dont execute because permission.
by (340 points)
0 votes
make a .bat contain

powershell -executionpolicy bypass -noprofile -command "&{ .\yourscript.ps1}"

the bat launch yourscript.ps1

zip bat and ps1

its working

willy
by (660 points)
 
Powered by Question2Answer
...