/build/static/layout/Breadcrumb_cap_w.png
09/11/2018 154 views
I am trying to run an Online Kscript to restart the NLaSvc Service on several devices. I have the task set as shown in the picture below.
jFsL0k.png

I think that the problem that the service has dependent services which require additional commands. I am using an administrator Profile to run this KScript. Any advice would be helpful. Thank you!  
0 Comments   [ + ] Show comments

Comments


All Answers

0
We do it via Powershell Script

see:
https://www.syspanda.com/index.php/2017/10/04/stop-start-restart-windows-services-powershell-script/

and:
https://support.quest.com/kace-systems-management-appliance/kb/138389/powershell-script-from-the-k1000

(I use method 2 here)
Answered 09/11/2018 by: Channeler
Red Belt

  • Thank you so much for your reply! Those are very helpful links, however I am a novice at Powershell and can't figure out how to have it run in administrator mode. I think that is the problem I am running into. Do you know of a parameter that will allow the Powershell to run as an administrator. I looked for it in the following link: https://technet.microsoft.com/en-us/library/ff629472.aspx
    but could not find anything that would allow me to run in administrator mode. Any help here would be appreciated. Thanks again "Channeler"!
    • Well, yes that code does too much things.

      To put it more simple:

      Get-Service -Name AdobeARMservice | Stop-Service -ErrorAction SilentlyContinue
      Start-Sleep -s 20
      Get-Service -Name AdobeARMservice | Start-Service -ErrorAction SilentlyContinue


      This will stop the service named "AdobeARMservice"

      Then wait 20 seconds

      and it will start that same service again.

      Change the service name, and save it as .PS1, follow method 2 on that KB article, and tell the KACE appliance to run the script with the supplied credentials. (I suggest using local admin credentials instead of domain admins, but it should work with both)

      Check the Windows Run-As section of the script, to determine if it's going to run as Local System or Logged user or a specific set of credentials.
      • Sorry for my ignorance but how will stopping and starting the AdobeARMservice reset the NLaSvc ?
      • Change the name to match the service you need to target.

        Instead of using AdobeARMservice, use NLaSvc
      • Get-Service -Name NLaSvc | Stop-Service -ErrorAction SilentlyContinue
        Start-Sleep -s 20
        Get-Service -Name NLaSvc | Start-Service -ErrorAction SilentlyContinue
      • Thank you so much!

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share