CLI or Script for removing Server in HPSA (310 Views)
Reply
Occasional Visitor
heckenbichler
Posts: 1
Registered: ‎11-28-2013
Message 1 of 2 (310 Views)

CLI or Script for removing Server in HPSA

Hello,

 

I have to realize a decommission workflow and I have to make the automation for this workflow step.

 

So I'm looking for a script (Perl, Python, ...) or a CLI Command (Powershell or anything else) which allows me to deactivate and remove a Server from HPSA.

 

Can anybody help me or give me a hint?

 

Best regards

Robert

Trusted Contributor
DBR
Posts: 211
Registered: ‎07-29-2010
Message 2 of 2 (298 Views)

Re: CLI or Script for removing Server in HPSA

Use OGFS API commands.

 

cd /opsw/api/com/opsware/server/ServerService/method
        hpsa_device_id=`./getServerVO self:n=$hpsa_device | grep mid | awk '{print $2}' FS="\""`
        ./decommission self:i=$hpsa_device_id
        ./remove self:i=$hpsa_device_id

 

Don

 

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.