Jump to content

TechnicalHero

Members
  • Content Count

    25
  • Joined

  • Last visited

Community Reputation

0 Neutral

My Information

  • Agent Count
    < 500 Agents

Recent Profile Visitors

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

  1. TechnicalHero

    Transferring a file from LT Share

    @p_ern thank you much. Wish I'd though of that! $username = $env:username works a treat. Kind regards,
  2. TechnicalHero

    Mapped drive check

    Is there really no where in the Automate GUI that tells what mapped drives an Agent has? I thought there was. But I now can't find it.
  3. TechnicalHero

    Microsoft OneDrive Sync

    So using some powershell I can search the output for the work "error". But machines that are not syncing all files down to the computer are reporting they are in an error state. Anyone have any suggestions?
  4. TechnicalHero

    Transferring a file from LT Share

    Hi @p_ern I've seen that before and it has helped me out. But this time I don't think it does.
  5. Hi All, All I want to do st transfer a .dll from my LTShare to C:\Windows\LTSvc\packages\PowerShellScripts. Seemingly this is a bit tricky. I can transfer it to C:\Users\LocalUser\Downloads\PowerShellScripts using PowerShells "Copy-Item" But I am not going to know the path of "LocalUser". There doesn't seem to be a variable for "User Profile" that I can specify. If there was, then job done. Any idea how I can expose what the current logged in users profile path is and how to then cope ONE FILE to it?! Any assistance would be great appreciated 🙂 Kind regards,
  6. TechnicalHero

    Microsoft OneDrive Sync

    Hi @lgs141 I have got this working on my own laptop. In that the output of the powershell gets pushed to a variable %StatusOutput%. How do I then make the results actionable if the status contains "Error"? Kind regards,
  7. TechnicalHero

    SQL Query in Script

    Hi @rami I know it was a while ago (!). But do you happen to still have those examples? Kind regards,
  8. TechnicalHero

    Monitor for Scheduled reboots

    I would like an internal monitor that checks for the ScriptID of my Server Reboot script once and hour and if it finds one it then calls a script which emails my team with the host name that have been scheduled to restart. Maybe even the time. Creating the Internal Monitor and Alert Template is no problem. The SQL below returns a table with all the info I need. I need to pump those results into the body of an email. SELECT pendingscripts.ScriptID, pendingscripts.ComputerID, computers.Name FROM pendingscripts INNER JOIN computers WHERE scriptID = 6003 If I use the Variable Set - SQL function, it only returns the first cell in the table rather than the whole table. How can I get the who list of host names into the body of an email? Kind regards,
  9. TechnicalHero

    Script will not run properly from a Monitor

    Hi Darren, It was me....I was calling the wrong script *slaps face*. Thank you for taking the time to have a look though 🙂 Kind regards,
  10. Hi All, I have a script that starts OneDrive. I can send the script to an agent and it works wonderfully. I then want to monitor OneDrive.exe (the process) and if it is not running, I want it to run my script to start it. I have created a Remote Monitor to look for the OneDrive process. When I kill and start the process on my laptop I can see the Monitor picking it up. All works. But I cannot get my script to run properly from the monitor. On the agent it says it has run, but OneDrive has not started. I have created an Alert Template to run the script which the Monitor is using. Any suggestions as what to check next? Kind regards,
  11. TechnicalHero

    Domain Join

    Hi JosephM Thank you for the reply! Script Step 1: Under System Dashboard - Config - Configurations - Additional Fields - I added DOMAINNAME. Field Type: Text. Is that what you mean? Then the statement is: GET: @myDomain@ = [EXTRAFIELD DOMAINNAME] Script Step 2: For testing purposes I have created JoinDomain.ps1 in the packages folder on the computer (I'll copy the file down once I have this working). I also will add renaming the PC hostname later. So my second statement is: Console Shell: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -command "C:\Windows\LTSvc\packages\JoinDomain.ps1" The script then fails with this message: The reason: ScriptFunctionExtraDataGetValue failed processing query. So I am guessing it is to do with the extra field. In the statement: Extra Field: DOMAINNAME-1 ID: @DOMAINNAME@ Variable: myDomain ....where I have written "myDomain". Any more pointers?! Kind regards,
  12. TechnicalHero

    Domain Join

    Hi All, I'm trying to understand what I need to do you get a script that will join a computer to my AD. Ideally I'd like to run the script and the PC joins the domain and is restarted. I had tested a command in PowerShell (Run as Admin) that will join a computer to the domain, however I am prompted for admin credentials. When I try and run (what I believe!) to be the same command through a script it just says the command fails. Here is what I have: Console Shell: net use on %consolenumber% SET: @OutputOfNetUse@ = %Shellresults% Console Shell: c:\windows\system32\windowspowershell\v.1.0\powershell.exe -noprofile -executionpolicy bypass -command "add-computer –domainname mydomain.org -Credential(Get-Credential)" Console Shell: c:\windows\system32\windowspowershell\v1.0\powershell.exe -noprofile -executionpolicy bypass -command "Restart-Computer" I think it would make sense if the credentials were actually the stored credentials within the location of LabTech. If anyone can point me in the right direction it would be greatly appreciated! Kind regards,
  13. TechnicalHero

    Run PowerShell command as admin

    Hi All, So basically the below will remove "OneNote" from Windows 10. Thought I'd share.
  14. TechnicalHero

    Run PowerShell command as admin

    I have also tried the bypass option. As admin and local. Sod all. I would have thought that any decent RMM solution would be able to handle this pretty easily. I have got support trying (not sure they know what they are doing) to setup access to the LTShare for me, the idea being that I create my one line powershell script, then transfer it to the agent and call it from there. Which does seem long winded when the functionality should work as it is in LabTech.
  15. TechnicalHero

    Run PowerShell command as admin

    Hi imurphy, thanks for having a look for me. I have swapped to "powershell command" and it takes longer to run, but the result is the same. Any other suggestions? Kind regards,
×