How to create folders on a Windows machine using PowerShell

The below script can be used to create folders on a windows machine. This script takes a list of folders and locations in an array and loops through it to create folders. Make sure you update the machine’s name on which you want to run this script in the TARGET_MACHINE_NAME variable.

This script will skip the directory creation if the directory already exists.