/build/static/layout/Breadcrumb_cap_w.png

How do I use an Online Kscript to restart the NLaSvc Service?

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

Answers (1)

Posted by: Channeler 5 years ago
Red Belt
1
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)

Comments:
  • 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"! - JZeigler 5 years ago
    • 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. - Channeler 5 years ago
      • Sorry for my ignorance but how will stopping and starting the AdobeARMservice reset the NLaSvc ? - JZeigler 5 years ago
      • Change the name to match the service you need to target.

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

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

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ