A version of your code should run on all Shards if you have at least one owned object (creep, buildings, tombstone) on-shard. A few things to note about doing multiple shards though:
You need to assign CPU to the shard, there's a 'reassign CPU' button at the bottom of the shards menu https://screeps.com/a/#!/shards or it can be done via code: https://docs.screeps.com/api/#Game.cpu.setShardLimits
Creeps that travel though an intershard portal lose all memory and are assigned a new ID, their name & ticksToLive will remain the same. So whatever memory you had assigned will be lost, so stuff like role (if using roles) will be gone, meaning the creep doesn't know which module it should be using.