mardi 28 février 2017

Create a nested set of folders based on the directories.json file

You need to create a nested set of folders based on the directories.json file.

{
   "Grandparent": {
        "Parent": "Child"
    },
    "Very": {
        "Many": {
            "Subdirectories": {
                "Make": {
                    "Me": {
                        "Very": "Happy"

                    }
                }
            }
        }
    }
}

In each subdirectory you must create a text file named random.txt which contains a random number from 8-100. You must be able to re-run the script multiple times without errors, with each run updating the random number in the previously created files.

Success Criteria

  1. Folders created in accordance with directories.json
  2. At least one random.txt file created
  3. All created random.txt files contain a random number between 8-100
  4. Running the script multiple times updates the random numbers in the random.txt files
  5. Running the script multiple times does not create new random.txt files
  6. The script must be tested with Pester
  7. The script must pass by PSScriptAnalyzer



Aucun commentaire:

Enregistrer un commentaire