This is an unstable interface that has been evolving from release to
release. For 3.1.1 the way to enable the shell is to edit the
glassfish\osgi\felix\conf\config.properties file. Search for "shell" in
the file, and you'll see a commented out line that has to be added to
the variable definition right below it. Perform that edit and then the
OSGi shell will be active.
FYI, this is going to change again in 3.1.2 so that there will be a
simple JVM option that can turn it off/on again.
Tom