Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


mr.wallstrom last won the day on May 9 2018

mr.wallstrom had the most liked content!

Community Reputation

2 Neutral

My Information

  • Agent Count
    Less than 100

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. If I set my script line to manually: SELECT ComputerId FROM `plugin_vm_hvhosts` WHERE fqdn = 'hostname.domainname.xyz'; But then replace the FQDN with a variable that contains exactly the same FQDN (pulled from powershell command, that pulls it from registry,) the SQL query fails. SELECT ComputerId FROM `plugin_vm_hvhosts` WHERE fqdn = '@VMHostFQDN@'; Note, that the SQL query with written out FQDN works fine in SQLYog as well - so I know the query is OK. I am suspecting maybe something like where the documentation says you must use @= instead of @? It's driving me nuts, because @VMHostFQDN@ = 'hostname.domainname.xyz' !! (This whole thing goes around your elbow ... because I'm trying to capture the VM HOST of a Guest. There will be a monitor that runs on the GUEST, but triggers a script that must run partially on the HOST - powershell commands - to restart said GUEST.) I have captured the Host's name, FQDN and if this gets working, the computerID, into EDF fields - so that it can function as an offline script when the GUEST is offline...
  2. mr.wallstrom

    Running a script on another host from a script

    I know this is old, but my question is directly following - and this seems to be a powerful tool, that isn't often discussed. If both scripts being run are set as offline scripts, and the actions being taken are database or Automate server side, would this prevent the script from hanging, if either machine went offline?
  3. mr.wallstrom

    Run script against computer 2, from script running on computer 1?

    Woot! Disregard... I found the answer here:
  4. I'd swear I saw this in here before, but can't find it. I need to setup an alert, that will run an offline script on the target (ie; when it goes offline,) gather the computerid of this machine, as well as some EDF values (one of which is the computerID of another machine,) and then call a 2nd script to run against the 2nd machine. VMGuest stores Host's name, computerID and FQDN as EDF's. VMGuest goes offline; triggers alert template Template triggers script to collect details needed, then fires script on host, to test connectivity and issue restart vm commands... Can anyone point me back in the right direction for this?
  5. mr.wallstrom

    Pass parameters from LT script to Powershell script

    Within your Automate script, use Execute Script, set to Powershell (Powershell Bypass if required,) and then click the square box to the right of the script entry field. This pops up a larger window where you can paste your Powershell code. In THIS area, all normal Automate script variables, can be dropped directly into your Powershell code. It'll expand everything at run time. Works pretty slick.
  6. mr.wallstrom

    Back to basics? How to run script even when agent is offline?

    Thanks, Bobs16! I knew it had to be right in front of me somewhere.
  7. I'm still learning up on my SQL. I need a list of serial numbers for machines that were just taken offline yesterday, and are still in the database. I threw together a script that can pull this via an SQL query, then run the script on the appropriate machines... but it won't run on the ones that are offline, even with unchecking 'skip offline'. I never really thought about it before, but is it possible to run it anyway? The script itself isn't actually doing anything with the agent - just grabbing the %computername% variable, and then using that to pull data from the tables. (I'd rather just export from advanced search, but can't seem to find an option in there for serial numbers?)
  8. I'm working on a concept still, that seems like we should be able to do... unless the new Virtualization Manager is entirely it's own ecosystem? Scenario: VManager HyperV PowerStatus monitor alerts on PowerOff. This monitor captures the %vmname% variable (only to message body?) Alert fires Alert Template, with script setup to use %vmname% as a replacement variable within a Powershell execution, to restart-vm. Is this possible, or is there a better method I haven't thought of yet? The full concept will be a little more complex, with some safety checks, but the gist of it is what I need to work out first.
  9. mr.wallstrom

    Bitlocker Enabled

    Sounds like you have an issue with the other script, probably not this here. I'd suggest ignoring that other script for a bit, and make sure you setup the steps in my earlier comment. That at least gives you a way to test whether the bitlocker role detection is working, before you add another layer of complexity (that other script.)
  10. mr.wallstrom

    Sophos Removal Script

    The batch file I put together comes from a combination of what the Sophos in-house engineers use to remove it from their own machines, plus additional discoveries of other registry entries left behind, etc... It also self elevates, as long as you're running it from an admin user (ie; use LT's as {location} admin, and not the default which runs as SYSTEM.)
  11. mr.wallstrom

    Sophos Removal Script

    Take a look at my post in this thread from May 8th:
  12. mr.wallstrom

    Gathering information after PowerShell Comand

    I'm having mixed results with this myself literally right now, but.. In your PS command, end the command with " | Out-File c:\ltsvc\PSWindowsUpdate.log". Then, in Automate script, use Set Variable function, with Type "File Contents", and the path to your file. Provide a name for the variable in the last box. Now, you can call the variable anytime you want the results of the PS command shown. Should also be able to use Execute Script for your PS command, with the variable named in that same function. In my case above, I need to run my Powershell commands from an elevated prompt, so an actual PS1 file, with header code to self elevate, was all I could come up with so far. (Related to my forum question above yours this morning!)
  13. mr.wallstrom

    Script Sleep question

    If Automate script fires off a powershell PS1 file on the local host, will the next line in the Automate script wait for that PS1 file to finish executing, or will it move to the next Automate script line right after that PS1 was launched? I need my Automate script to 'sleep' until the PS1 file completes its' task (which creates a local log file.) Problem is, that PS1 file could take anywhere from a few minutes, to several hours, to finish. (The PS commands need to be run elevated, which is why I am using a local file; couldn't figure out how to elevate from Automate, but was able to find code I can put in the local PS1 script head, that will automatically re-launch itself into elevated session.) Thanks, Michael
  14. mr.wallstrom

    Changing Server Address in LT

    I can't speak to the SSL details, but I would stress a point that is not super clear in that document, that can be a huge help. When you are ready to add in the NEW address, keep the OLD one right where it is, use a | <-- symbol, and then the NEW address. Your agents will failover through all the addresses you list in there, like this. Once you are comfortable that they are checking in with the new address (ie; heartbeats working, etc,) then go back in and remove the old address. It's also not a bad idea to include | IP Address as well, in case DNS issues knock your systems offline.
  15. mr.wallstrom

    Run script function as location admin?

    Just thinking out loud. Could use File Copy as admin perhaps, to copy it from the %temp% to windows\temp, and then just pick it up from there, perhaps.