right click on your smartgroup and select group explorer view. you can then select all and run decomission server
create test file (servers.txt) with your target list:
set Licensing LicenseServiceURL "http://www.bladelogic.com/services/LicensingWS"
set Licensing DeregisterServiceURL "https://webapps.bmc.com/BMCBladelogicLicensingWS/services/BMCBladelogic"
set Licensing ServiceUsername portal-user
set Licensing ServicePassword portal-pass
The folowing script should take care of it and preserve the license:
for Server in `cat $ServerList`
Server=`echo $Server | tr -d '[:cntrl:]'`
echo "-- decommission: $Server"
blcli_execute Server decommissionServer $Server true
1 of 1 people found this helpful
Thanks Scott that works-s
Thanks! this looks good I will see if I can get it to work
hmm, not sure how I missed the note that you already tried the blcli approach :)
I think the reason why the blcli approach wasn't working is because it lacked a 'for loop' which would automate the decommissioning against all targets.
One suggestion for improving your script Lazar - instead of copying the server list to a text file, you could run a blcli command to output the list of servers from a group, and then loop through that list to decommission and reclaim any licenses.
decomission will not reclaim the license afaik. you also need to run one of the unrelased blcli commands that deregisters the server from the licensing site.