import random


def passwordGen(plength):
    """
    Generate a random string suitable for use as a password. This is used later to generate a password for the
    local Administrator account on the job server. 
    """
    chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!'
    p = []
    for char in range(plength):
        p.append(random.choice(chars))
    return(''.join(p))