Deleting files script
-
-
Hi,
yes, you can define action in agent (using Action or ActionShellExec entries in nxagentd.conf) and then define object tool to run it manually or server side action of type "execute action on remote agent" to run it automatically from event processing policy.
Best regards,
Victor -
Ok i'm using powershell with command:
ActionShellExec=cleandownloads:powershell -command "& ls ~\Downloads\ | remove-item -force -recurse"
and this command not working from netxms but working in powershelli have too
ActionShellExec=cleantemp:powershell -command "& ls C:\Windows\TEMP\ | remove-item -force -recurse"
and this commands works fine form powershell and from agentany ideas?
-
Hi,
I'm suppose ~ in ~\Downloads\ refers to home directory of the user - but if you run agent as a service it by default runs under local system account, so ~ points to completely different place.
Best regards,
Victor
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login