Without a doubt, working with locations is an important aspect of scripting when working with files and directories. This recipe deals with file and directory objects, their properties, and a few cmdlets that help with paths.
The scenario for this recipe is that you need to find the location where the script is running from. You need to find the complete path of the script. Also, similar to the lab setup script, create a new path (do not create the files yet) within the home directory, and create dummy file paths within the new directory (again, no actual files yet). The important point to remember is that this script should be platform-agnostic; it should run without errors on Windows, Linux, and macOS environments. Also, you have a group of users using your computer. Find out which among those users has a directory called random within their home directory...