Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Removing Scripts from Devices

You can use Junos Space Network Management Platform to remove scripts from devices on which they are staged or enabled.

CAUTION:

If the filename of the selected script matches that of any script present on the device, then the script on the device is removed regardless of its contents.

To remove scripts from devices:

  1. On the Junos Space Platform UI, select Images and Scripts > Scripts.

    The Scripts page appears, displaying the scripts that you imported into Junos Space Platform.

  2. Select the script or scripts that you want to remove.

  3. Right-click your selection or use the Actions menu, and select Remove Scripts from Devices.

    The Remove Scripts from Device(s) page appears and lists the devices the script is associated with.

    Note:

    If you select multiple scripts for removal, only those devices that are associated with all the scripts are listed in the Remove Scripts from Device(s) page. If a device is not associated with even one of the selected scripts, it is not listed.

  4. Select the devices from which you want the script to be removed, by using one of the following selection modes—manually, on the basis of tags, or by using the comma-separated values (CSV) file. These options are mutually exclusive. If you select one, the others are disabled.

    Note:

    By default, the Select Device Manually option is selected and the list of devices that can be selected is displayed. For multiple selection, only commonly associated devices are listed.

    • To select devices manually:

      • Click the Select Device Manually option and select the device(s) that have the script staged on them. The Select Devices status bar shows the total number of devices that you selected; the status bar is dynamically updated as you select the devices.

      • To select all the devices, select the check box in the column header next to the Host Name column.

    • To select devices on the basis of tags:

      1. Click the Select by Tags option.

        The Select by tags list is activated.

      2. Click the arrow on the Select by Tags list. A list of tags defined on devices in the Junos Space system appears, displaying two categories of tags—Public and Private.

        Note:

        No tag is displayed if none of the devices is associated with any tag. You need to tag the devices on the Device Management page before you can use the Select by Tags option.

      3. To select tags, perform one of the following actions :

        • Select the check boxes next to the names of tags that you want to select and and click OK.

        • To search for a specific tag, enter the first few letters of the tag name in the Select by Tags field to the left of the OK button. If a match is found, a suggestion is made. Select the suggested match and click OK.

        As you select the tags, the total number of devices associated with the selected tags appears just above the device display table. For example, if there are six devices associated with the selected tags, then 6 items selected is displayed.

        The selected tags appear next to the Tags Selected label. An [X] icon appears after each tag name. You can click the [X] icon to clear any tag from the list. The device count is updated accordingly.

        The device display table displays the devices associated with the selected tags.

    • From Junos Space Platform Release 17.2R1 onward, when you select devices by CSV, you can choose to select all managed devices. Select the Include All Managed Devices check box to list all managed devices for selection.

      To select devices by using a CSV file:

      1. Select the Select by CSV option.

      2. Click Browse to navigate to the file location on your computer and select the CSV file containing the list of devices from which you want to remove the script.

        Tip:

        For a sample CSV file, click the Sample CSV link. You are prompted to save the file. Save the file to your computer and open it by using an application such as Microsoft Excel.

      3. Click Upload to upload the CSV file.

        From Release 16.1R2 onward, when you upload a CSV file to select devices from, Junos Space Platform verifies the devices in the CSV file. If the CSV file contains devices to which the changes do not apply, a warning message appears which says Few devices are not selected due to precondition failure. Please click "View inapplicable devices" for more details.

        You can click the View inapplicable devices link to review the list of devices that are excluded from the update. The reason for exclusion is listed as an error message against each device.

    • From Junos Space Platform Release 18.2R1 onward, you can select devices based on saved filters

      To select devices by using a saved filter:

      1. Select the Select by Filter option.

      2. Select the filter from the list of saved filters.

        The devices associated with the selected filter appears in the grid.

  5. Select the Force Remove check box to remove the script-device association from Junos Space Platform even if it is unable to remove the scripts from the devices due to connectivity issues. You need to turn this option on before you remove the scripts. The script-device association is removed regardless of whether this operation fails or not.

  6. Click Remove.

    The script is removed from the selected devices, and the Remove Scripts Information page appears, which displays a job ID link.

    Perform one of the following actions on the Remove Scripts Information page:

    • Click the job ID link to view the status of the script removal operation on the Job Management page.

      The Job Management page appears. Double-click the row corresponding to the job pertaining to the removal operation. The Script Management Job Status page appears and the Description column on this page displays whether or not the script is removed successfully and reasons for failure (if the removal of the script failed).

    • Click OK to return to the Scripts page.

From the Junos Space Platform UI, you can verify the device association details of the scripts removed from the devices. On the Scripts page, click View in the Associations column of the removed script. The View Associated Devices page is displayed, where you can verify that the device associations are removed.

If the script removal task fails, you can identify the reason for failure by viewing the job details from the Job Management page. If there is an error, the View Job Details page displays an error message. For more information about the error messages, see Common Error Messages in Device-Related Operations.

For more information about viewing job details, see Viewing Jobs .

On the Job Management page, you can export details about the removal of a script as a comma-separated values (CSV) file to your local file system:

  1. On the Junos Space Platform UI, select Jobs > Job Management.

    The Job Management page appears.

  2. Double-click the row corresponding to the script removal job.

    The Script Management Job Status page appears.

  3. Click Export as CSV.

    You are prompted to save the file.

  4. Click OK on the File Save page to save the file to your computer.
  5. After you save the file, to return to the Job Management page, click OK on the Exporting Script Job page.

    Use an application such as Microsoft Excel to open the downloaded file from your computer.

Release History Table
Release
Description
18.2
From Junos Space Platform Release 18.2R1 onward, you can select devices based on saved filters
17.2
From Junos Space Platform Release 17.2R1 onward, when you select devices by CSV, you can choose to select all managed devices. Select the Include All Managed Devices check box to list all managed devices for selection.