Pass a connection to a command instead of the share