Generic Script Format - Cluster Resource Windows Server 2008

Posted on 2011-05-10
Last Modified: 2012-05-11
Hello Experts, Need your assistance on how to to add the following VB script to a generic script so I can add it as a cluster resource in one of our cluster services in Windows Server 2008. Please help. Thank you!

Dim objShell : Set objShell = CreateObject("Wscript.Shell")

With objShell
  .Run "schtasks.exe /change /tn " & chr(34) & "\Microsoft\TaskName" & chr(34) & " /enable"
  .Run "schtasks.exe /run /tn " & chr(34) & "\Microsoft\TaskName" & chr(34)
  .Run "schtasks.exe /end /s /tn " & chr(34) & "\Microsoft\TaskName" & chr(34)
  .Run "schtasks.exe /change /s /tn " & chr(34) & "\Microsoft\TaskName" & chr(34) & " /disable"
End With
Question by:mmoya

    Accepted Solution

    Fixed the issue.

    Author Closing Comment

    I fixed the issue.

    Featured Post

    Promote certifications in your email signature

    Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

    Join & Write a Comment

    Suggested Solutions

    To effectively work with Diskpart on a Server Core, it is necessary to write some small batch script's, because you can't execute diskpart in a remote powershell session. To get startet, place the Diskpart batch script's into a share on your loca…
    OfficeMate Freezes on login or does not load after login credentials are input.
    This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
    This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now