I don't know if I'm missing something glaringly obvious with the One2Many functionality, but, in my searches in the forums, I found exactly one post about running Powershell scripts through One2Many.
With PS being such a powerful scripting language, I'm surprised that we're still sticking with batch and vb scripts to perform certain tasks.
1- I would think that LMI should include running native Powershell scripts directly from the task setup pages within Central.
2- Have some guidance as to how to easily trigger and run a Powershell script on Windows.
So far, I have been unsuccessful. Would anyone have a specific way that worked for them for running a PS script? (including the specific command lines)
I have tried certain ways of triggering it, using a custom command, with something like this:
"C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe" -ExecutionPolicy RemoteSigned "C:\Scripts\ControlCPU_wuapp.ps1" where the Powershell script is in that location (c:\scripts).. but I keep getting run failures, even though the script runs just fine when ran on the server workstation itself.... so, looking for guidance if anyone has any?
Yes, it is criminal that LMI hasn't added powershell. Frankly, I haven't seen any development improvements in One2Many. Makes you wonder what they are spending all the money from their constant price increases on!
I have ended up implementing most of my scripts in vbs or batch to keep it simple. I do feel like I have done a powershell script in the past through One2Many, but I can't find it now so maybe I didn't.
One thing to note is that the commands are going to run as the user account you give LMI Central to use on that computer. Are you testing on the same computer and using the same account? Also, I would google for running powershell from the commandline or from a batch file. It looks like there might be some helpful resources on Stackoverflow for that.
I have ran plenty of Powershell scripts from batch files, I even have a vb script I use for Powershell scripts in the task scheduler:
set arg = Wscript.Arguments command = "powershell.exe -nologo -command " & Wscript.Arguments.Item(0) set shell = CreateObject("WScript.Shell") shell.Run command,0
That works fine in Scheduler.. but not sure about the syntax in LMI. I guess I'll try it.
As for the user running the script. the LogMeIn service runs as LocalSystem, and the scripts that I typically run, are system related... as in, controlling a service if it meets certain conditions, etc ... so I'm not sure that this is really user dependent? (unless of course, I misunderstood what you were stating)
p.s: I completely agree with you regarding the developments on One2Many. I'm really not that impressed. I honestly think that having more functionality with One2Many would've been more important than having a whole Anti-Virus section, which, frankly, doesn't do a lot more than previously.
try right clicking on the file then click properties and see if there is an Unblock option. Uncheckit.
@Lisa_K8 Are we any closer to getting a dedicated topic heading/group for One2Many? There is a lot of useful informaion hidden in the rene2Many Script Repository trees that would allow many to use all of the power tools included in Central.
rem bye lmi by Tarcis
if %PROCESSOR_ARCHITECTURE% equ AMD64 goto amd64