Please note that the Men & Mice command line is no longer being maintained and will be deprecated in a future version of the Men & Mice Suite.

The script below is intended to help you get started using the Men & Mice CLI. You can use it as a starting point when writing your own scripts.

###############################################
# Demo script for Men & Mice command line interface
###############################################
# start by logging in to Men & Mice Central
login server.acme.com. user password 

# print out all zones available
zones 

# import a zone file 'zonefile.txt' as the zone 'test.zone.com.' 
# on master server 'server.acme.com.'
import test.zone.com. server.acme.com. zonefile.txt 

# print the zone
print test.zone.com. 

# view the change history for a single zone
history zone=test.zone.com user=administrator from=2005.2.25 

# add one record to it 
# NOTE: we can use '-' to refer to the last used zone and -1 means at the end of the zone
add - -1 test.record 1d A 10.2.3.4 ; this is comment for the new record 

# Disable the third record
disable - 3 

# then save it with comments
save - imported this new zone from a file and added one record 

# print out all history for the zone, which should of course only be the last save comment
history - 

# Then quit and we should be back at the OS command prompt # NOTE: we could skip this 
# command and return to the command prompt of the Men & Mice CLI
quit