Server Management - Systems Insight Manager
cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting removal from SIM

Scott Pollack
Occasional Visitor

Scripting removal from SIM

I want a script that I can pass the parameter of server name and have it purged from SIM
3 REPLIES
David Claypool
Honored Contributor

Re: Scripting removal from SIM

See http://www.hp.com/go/hpsim --> Information Library for information (at the bottom) for the 'mxnode' command.

mxnode -r systemname|ipaddress
Pootch
Frequent Advisor

Re: Scripting removal from SIM

Hi.

 

how to perform this with multiple servers from a text file?

 

server1

server2

...

Tushar Bajpai
Trusted Contributor

Re: Scripting removal from SIM

USAGE:
Place the nodes.txt file containing node names in the same folder as
deletenode.bat, and just run  deletenode.bat from the command prompt

 

Copy paste the below into a deleteNode.bat file.

 

@echo off & setlocal

echo =============================================

echo deleting nodenames from nodes.txt file.

echo =============================================

For /F "tokens=1*" %%i in (nodes.txt) do call :deletenodes "%%i"

echo no more node left to delete.

goto :eof

:deletenodes

echo deleting node with nodename "%~1" ...

mxnode -r -x force "%~1"

echo ---------------------------------------------------------------------

goto :eof

if it helped, award me Kudos or Points. Thanks :)

\T Bajpai
HP Employee