feldrim / ANUC

ANUC Active Directory User Creation Tool v1.x
4 stars 3 forks source link

Consider using json #29

Open feldrim opened 7 years ago

feldrim commented 7 years ago

Instead of XML, consider using json

feldrim commented 7 years ago

Examples:

feldrim commented 7 years ago

Sample JSON for Options file (Converted from XML)

{
  "OPTIONS": {
    "-Product": "AD New User Creation",
    "-Version": "1.4",
    "Settings": {
      "sAMAccountName": {
        "-Generate": "True",
        "Style": [
          {
            "-Format": "FirstName.LastName",
            "-Enabled": "False"
          },
          {
            "-Format": "FirstInitialLastName",
            "-Enabled": "True"
          },
          {
            "-Format": "LastNameFirstInitial",
            "-Enabled": "False"
          }
        ]
      },
      "UPN": {
        "-Generate": "True",
        "Style": [
          {
            "-Format": "FirstName.LastName",
            "-Enabled": "False"
          },
          {
            "-Format": "FirstInitialLastName",
            "-Enabled": "True"
          },
          {
            "-Format": "LastNameFirstInitial",
            "-Enabled": "False"
          }
        ]
      },
      "DisplayName": {
        "-Generate": "True",
        "Style": [
          {
            "-Format": "FirstName LastName",
            "-Enabled": "True"
          },
          {
            "-Format": "LastName, FirstName",
            "-Enabled": "False"
          }
        ]
      },
      "LowerCaseUserNames": { "-Enabled": "True" },
      "AccountStatus": { "-Enabled": "True" },
      "Password": { "-ChangeAtLogon": "True" },
      "DomainController": "YOUR.DOMAIN-CONTROLLER.COM",
      "DomainNS": "YOURDOMAIN",
      "ScriptPath": "LOGIN_SCRIPT.bat",
      "UserDirectory": "\\\\SERVER\\Users\\",
      "Subfolders": {
        "Subfolder": [
          "Temp",
          "Business"
        ]
      },
      "HomeDrive": "U:",
      "HomePage": "http://your.homepage.com/",
      "Email": {
        "-EnableHtml": "True",
        "-SendToSupervisor": "True",
        "-SendToUser": "True",
        "Administrator": "admin@anuc.com",
        "Supervisor": "supervisor@anuc.com",
        "SubjectToSupervisor": "New User Created",
        "SubjectToUser": "Welcome",
        "SMTPServer": "SMTP.awesome.local"
      },
      "Form": {
        "FileMenu": {
          "File": { "-Label": "File" },
          "CreateCSVTemplate": { "-Label": "Create CSV Template" },
          "FileExplorerDialog": { "-Label": "Create CSV Template For ANUC" },
          "CSVMode": { "-Label": "CSV Mode" },
          "SingleUserMode": { "-Label": "Single-User Mode" },
          "Exit": { "-Label": "Exit" }
        },
        "FormBody": {
          "CurrentDomain": {
            "-Label": "Current Domain",
            "-Enabled": "True"
          },
          "OU": {
            "-Label": "OU",
            "-Enabled": "True"
          },
          "FirstName": {
            "-Label": "First Name",
            "-Enabled": "True"
          },
          "LastName": {
            "-Label": "Last Name",
            "-Enabled": "True"
          },
          "Office": {
            "-Label": "Office",
            "-Enabled": "True"
          },
          "Title": {
            "-Label": "Title",
            "-Enabled": "True"
          },
          "Description": {
            "-Label": "Description",
            "-Enabled": "True"
          },
          "Department": {
            "-Label": "Department",
            "-Enabled": "True"
          },
          "Company": {
            "-Label": "Company",
            "-Enabled": "True"
          },
          "MobilePhone": {
            "-Label": "Mobile Phone",
            "-Enabled": "True"
          },
          "Site": {
            "-Label": "Site",
            "-Enabled": "True"
          },
          "OfficePhone": {
            "-Label": "Office Phone",
            "-Enabled": "True"
          },
          "OfficeFax": {
            "-Label": "Office Fax",
            "-Enabled": "True"
          },
          "StreetAddress": {
            "-Label": "Street Address",
            "-Enabled": "True"
          },
          "City": {
            "-Label": "City",
            "-Enabled": "True"
          },
          "State": {
            "-Label": "State",
            "-Enabled": "True"
          },
          "PostalCode": {
            "-Label": "Postal Code",
            "-Enabled": "True"
          },
          "DisplayName": { "-Label": "Display Name" },
          "sAMAccountName": { "-Label": "sAMAccountName" },
          "UPN": { "-Label": "userPrincipalName" },
          "Password": { "-Label": "sAMAccountName" },
          "GroupsTemplate": {
            "-Label": "Groups Template",
            "-Enabled": "True"
          },
          "DistributionList": {
            "-Label": "Distribution Groups",
            "-Enabled": "True"
          },
          "SecurityGroups": {
            "-Label": "Security Groups",
            "-Enabled": "True"
          },
          "ComboGroups": {
            "-Label": "Combo Groups",
            "-Enabled": "True"
          }
        },
        "Buttons": {
          "Submit": { "-Label": "Submit" },
          "SubmitAll": { "-Label": "Submit All" },
          "Last": { "-Label": "Last" },
          "Next": { "-Label": "Next" },
          "Previous": { "-Label": "Prev" },
          "First": { "-Label": "First" },
          "ImportCSV": { "-Label": "Import CSV" }
        }
      }
    },
    "Default": {
      "Domain": "awesome.local",
      "Path": "OU=MyOU,DC=awesome,DC=local",
      "Description": "Full-Time Employee",
      "Department": "IT",
      "Company": "Awesome Inc.",
      "Site": "TN",
      "Country": "US",
      "Password": "P@ssw0rd",
      "Group": "Normal User"
    },
    "Locations": {
      "Location": [
        {
          "-Site": "TN",
          "StreetAddress": "1 Main Street",
          "City": "Nashville",
          "State": "TN",
          "PostalCode": "10001",
          "Phone": "888-555-0000",
          "Fax": "888-555-0000"
        },
        { "-Site": "Custom" }
      ]
    },
    "Domains": {
      "Domain": [
        {
          "-Name": "awesome.local",
          "Path": [
            "OU=MyOU,DC=awesome,DC=local",
            "CN=Users,DC=awesome,DC=local"
          ]
        },
        {
          "-Name": "awesome.lab",
          "Path": [
            "OU=RPUsers1,DC=awesome,DC=lab",
            "OU=RPUsers2,DC=awesome,DC=lab",
            "OU=RPUsers3,DC=awesome,DC=lab"
          ]
        }
      ]
    },
    "Descriptions": {
      "Description": [
        "Full-Time Employee",
        "Part-Time Employee",
        "Consultant",
        "Intern",
        "Service Account",
        "Temp",
        "Freelancer"
      ]
    },
    "Departments": {
      "Department": [
        "Finance",
        "IT",
        "Marketing",
        "Sales",
        "Executive",
        "Human Resources",
        "Security"
      ]
    },
    "JobTitles": {
      "JobTitle": [
        "Accountant",
        "Project Manager",
        "Intern",
        "Office Administrator"
      ]
    },
    "Groups": {
      "Group": [
        {
          "-Name": "Normal User",
          "List": [
            {
              "-Type": "SecurityGroup",
              "#text": "Awesome Users"
            },
            {
              "-Type": "ComboGroup",
              "#text": "Security and Distribution List"
            },
            {
              "-Type": "DistributionList",
              "#text": "Awesome List"
            }
          ]
        },
        {
          "-Name": "Administrator",
          "List": [
            {
              "-Type": "SecurityGroup",
              "#text": "Admin Users"
            },
            {
              "-Type": "SecurityGroup",
              "#text": "Awesome Users"
            },
            {
              "-Type": "ComboGroup",
              "#text": "Security and Distribution List"
            },
            {
              "-Type": "DistributionList",
              "#text": "Awesome List"
            }
          ]
        }
      ]
    },
    "SecurityGroups": {
      "SecurityGroup": [
        "Awesome Users",
        "Admin Users"
      ]
    },
    "ComboGroups": { "ComboGroup": "Security and Distribution List" },
    "DistributionLists": { "DistributionList": "Awesome List" }
  }
}