1102 views

Deactivate devices in Bulk

EXperts,

 

 

NA 9.20 on windows 2008.

 

I have some 200+ devices i need to set into deactivate state. Is there a command or a task through which i can achieve this in one shot without creating a device group for this purpose.

 

-Abhi

0 Likes
6 Replies
Micro Focus Expert
Micro Focus Expert

Hi Abhi,

 

You can select all the 200+ devices in NA and select from the Actions Drop Down Menu the option Deactivate. 

Let me know if this answers your question.

 

Best regards,

Paul

0 Likes

HI Paul,

 

THanks for your reply again!

 

I do know this option, but its tedious to search/select 200 devices. I was wondering i can input the device names in a txt/csv and execute a task/command on the iist to deactivate them.

 

-Abhi

0 Likes
Micro Focus Expert
Micro Focus Expert

Hi Abhi,

 

Sure you can do this also via a script/NA Proxy command. Here is a part of this CLI/API command:

 

deactivate device

Mark a device as deactivated.

Synopsis

deactivate device [-ip <IP address>] [-host <Hostname>] [-fqdn <Fully Qualified Domain Name>] [-deviceid <Device ID>]

Description

  • -ip - a.b.c.d where 0 <= a,b,c,d <= 255. You may optionally prefix the IP with SITE: where SITE is the name of the Site the device is in.
  • -host - A valid hostname
  • -fqdn - A valid Fully Qualified Domain Name
  • -deviceid - A device ID

Return Type

STATUS

 

Examples

  • deactivate device -host rtr5.vfm.lab

 

Regards,

Paul

PAul, i will try this now and update you shortly.

 

Thanks Again.

 

-Putta

0 Likes

HI Paul,

 

I am able to de-activate the device with this command via NA proxy. As the list of devices to be de-activated are scattered or not in same subnet, i have to now run the command on each IP Address at a time. I guess if i have scattered IP's to be de-activated in NA i will have to run this command each time and there is no easy way to do it in bulk, right?

 

-Abhi

0 Likes
Absent Member.
Absent Member.

Hi Abhi;

 

If I understand your question, you would like to be able to bulk deactive devices that aren't specifically grouped by subnet, group, etc.

 

If you create an API script like Paul suggested above, you can put the devices in the CSV file with the IP address.  Then, in the API command that you use will be;

deactivate device [-ip <IP address>]

 

As you process the CSV file in the script, you'll bring in the IP address and then plug it into the variable name in the script.

 

I hope that helps answer your question.

 

 

Joe

Online outReach Resource
HP Support

The views and opinions expressed in my contributions are my own and do not necessarily reflect the views and strategy of HP

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.