How to change the user and password on multiple tasks that specify a specific user.

book

Article ID: 178592

calendar_today

Updated On:

Products

Task Server

Issue/Introduction

In an environment where there are many tasks that are configure to use a specific user (instead of agent credentials or logged on user) it is necessary to update the password or user name on these tasks.

Currently this tool only works for the following task types:
Run Script on Server (7.6 and above)
Run Script on Task Server
Run Script

Environment

ITMS 7.6, 8.x

Resolution

 

Attached files:

PF3719166_75_sp1_HF5.zip - This file is for 7.5 sp1 HF5 only (do not install on previous versions). Extract the files and run the pfinstaller.exe. You can then run the command line tool

EditScriptTaskSettings_3981893_3998626.zip - This file is for 7.6, 8.0 and 8.1. Extract the zip file, you can then run the command line tool.

Command line tool information:

 

The utility provides functionality for editing the "Script" type task settings. It can only run it on the Notification Server computer.

 

EDITSCRIPTTASKSETTINGS [/NOCONFIRM] [/TASKTYPE=collection] [/TASKFOLDER=collection] [/RUNAS=[APPLICATIONUSER | LOGGEDONUSER | SPECIFICUSER]] [/MATCHEDRUNAS] [/USER=string] [/PASSWORD=string]

/NOCONFIRM Optional. Enables to ignore a user confirmation for settings editing.

/TASKTYPE=collection  Optional. The task types (comma-separated GUIDs), containing the instances to be edited.

/TASKFOLDER=collection Optional. The folders (comma-separated GUIDs), containing the tasks to be edited. Subfolders are not included.

/RUNAS=string   Use specified authentication setting for the selected tasks. If set to SPECIFICUSER then parameter /USER and /PASSWORD must be specified. The option LOGGEDONUSER is applicable only for the ScriptTask.

/MATCHEDRUNAS   Change only tasks that already have "Run As" option set to specific user. Can be used only when /RUNAS option is set to SPECIFICUSER.

/USER=string   The common setting of the task that can be edited. Must be used with parameter /PASSWORD.

/PASSWORD=string   The common setting of the task that can be edited. Must be used with parameter /USER.

Note: It is not recommended to use utility to change credentials for all script tasks in the infrastructure. Please use /TASKFOLDER and /MATCHEDRUNAS keys to reduce the amount of tasks that should be updated.

 

Supported task types:

1. ServerScriptTask (29cf22f6-b869-4dec-b101-0f5fdf99fdbf) 

2. ScriptTask (4f1b9b32-b5c6-4d83-8992-f73582217aac) 

3. TaskServerScriptTask (fbdc45bc-3f7a-49f9-93af-eb7527c05627) 

 

The utility modifies the selected settings for all tasks on Notification Server that correspond to chosen task types and folders (subfolders are not included).If task types and folders are not selected, the tasks for all supported types will be edited. 

 

Examples:

1. How to edit all user settings of the tasks

EDITSCRIPTTASKSETTINGS /RUNAS=SPECIFICUSER /USER=someuser /PASSWORD=somepassword

2. How to edit user settings of a specific task

EDITSCRIPTTASKSETTINGS /TASKTYPE=29cf22f6-b869-4dec-b101-0f5fdf99fdbf,4f1b9b32-b5c6-4d83-8992-f73582217aac /RUNAS=SPECIFICUSER /USER=someuser /PASSWORD=somepassword

3. How to edit user settings of a specific task in a specific folder (subfolders are not included)

EDITSCRIPTTASKSETTINGS /TASKTYPE=29cf22f6-b869-4dec-b101-0f5fdf99fdbf,4f1b9b32-b5c6-4d83-8992-f73582217aac /TASKFOLDER=38a1ea50-42f2-4962-b95c-4466995afff6,cf7eebc7-753b-49cc-abc7-7a81e40623c7 /RUNAS=SPECIFICUSER /USER=someuser /PASSWORD=somepassword

4. How to edit user settings of a specific task in a specific folder (subfolders are not included)

EDITSCRIPTTASKSETTINGS /TASKTYPE=29cf22f6-b869-4dec-b101-0f5fdf99fdbf,4f1b9b32-b5c6-4d83-8992-f73582217aac /TASKFOLDER=38a1ea50-42f2-4962-b95c-4466995afff6,cf7eebc7-753b-49cc-abc7-7a81e40623c7 /RUNAS=SPECIFICUSER /USER=someuser /PASSWORD=somepassword

UPDATE: The utilities for both versions 7.5 SP1 HF5 and 7.6 HF7 have been updated to cover scenario where it may fail due to orphaned tasks, e.g. tasks without any version in the database.

You may check if you have such tasks or not by using following SQL query:

select ic.Guid, i.Name, iv.VersionGuid, ivd.VersionGuid as VersionGuid2
from [dbo].[ItemClass] ic
left join Item i on ic.Guid = i.Guid
left join ItemVersions iv on ic.Guid = iv.ItemGuid
left join ItemVersionData ivd on iv.VersionGuid = ivd.VersionGuid
where ic.[ClassGuid] = '4f1b9b32-b5c6-4d83-8992-f73582217aac'
order by VersionGuid

The tasks that will have NULL values for VersionGuids, needs to be modified manually as utility will skip them.
 

Regarding ITMS 8.5

For 8.5 release, we have a help topic related to this functionality in our online documentation:

Updating settings of multiple script tasks

The Update Settings of Selected Script Tasks dialog box lets you update the settings of multiple script tasks simultaneously. For example, if you have a large number of script tasks that run under specific user credentials and you need to change these credentials for all tasks.

See About Task Management

See Creating a task

To update settings of multiple script tasks

  1. In the Symantec Management Console, on the Manage menu, click Jobs and Tasks.

  2. In the left pane, navigate to any script task that you have created, right-click the task, and then click Update Task Settings.

  3. In the Update Settings of Selected Script Tasks dialog box, enter the credentials that you want to use for running the script tasks.

  4. In the list of script tasks, select tasks for which you want to apply these settings, and then on the toolbar, click Apply.

If you want to apply the settings to all tasks, click Apply to All.

  1. To confirm the change, click OK.

  2. Click Close.

 

Additional Information

eTrack 3998626

Attachments

PF3719166_75_sp1_HF5.zip get_app
EditScriptTaskSettings__3981893_3998626.zip get_app