GlassFish CLI and JBoss AS7 CLI Commands

A rough comparison of GlassFish 3.x CLI and JBoss AS 7 CLI commands:

Tasks GlassFish 3.x JBoss AS 7
List all available commands asadmin list-commands jboss-cli.sh -c "help --commands"
Display help info asadmin --help jboss-cli.sh --help
Check version asadmin version jboss-cli.sh version
Start server or domain asadmin start-domain standalone.sh, or domain.sh
Stop server or domain asadmin stop-domain jboss-cli.sh -c :shutdown
Restart server or domain asadmin restart-domain jboss-cli.sh -c ":shutdown(restart=true)"
Start in debug mode asadmin start-domain -d
asadmin start-domain --debug
standalone.sh --debug
Deploy an app with CLI asadmin deploy ~/test.war jboss-cli.sh -c "deploy ~/test.war"
Undeploy the test.war app asadmin undeploy test jboss-cli.sh -c "undeploy test.war"
List deployed apps asadmin list-applications
asadmin list-components
asadmin list-applications -l
asadmin list-components --long
jboss-cli.sh -c deploy
jboss-cli.sh -c undeploy
jboss-cli.sh -c "deploy -l"
jboss-cli.sh -c "undeploy -l"
jboss-cli.sh -c "ls deploy"
Add a server system property asadmin create-jvm-options -Dbuzz="This is buzz" jboss-cli.sh
-c "/system-property=buzz:add(value='This\ is\ buzz')"
List all server system properties asadmin list-jvm-options jboss-cli.sh -c "/system-property=*:read-resource"
Create a string or primitive JNDI resource asadmin create-custom-resource
--property value=true resource/flag
jboss-cli.sh -c
binding-type=simple, type=boolean, value=true)"
List datasources asadmin list-jdbc-resources jboss-cli.sh -c
Create datasource using the default db config asadmin create-jdbc-resource --connectionpoolid DerbyPool jdbc/test jboss-cli.sh -c "data-source add --name=test-ds --jndi-name=java\:jboss\/datasources\/test-ds --driver-name=h2 --connection-url=jdbc\:h2\:mem\:test;DB_CLOSE_DELAY\=-1"

jboss-cli.sh -c "data-source enable --name=test-ds"
Delete a datasource asadmin delete-jdbc-resource jdbc/test jboss-cli.sh -c "data-source remove --name=test-ds"
Batch processing based on file input asadmin multimode --file /tmp/glassfish-cli-commands.txt jboss-cli.sh -c "batch --file=/tmp/jboss-cli-commands.txt"