Here's my notes on steps I take. I realize this is not all the scenarios.
Create folders:
C:\ISO_Files
C:\ TempMount
C:\ Update_Files
Regarding the highlighted item in above quote, I think I need to explain something about PowerShell scripting language.
A line starting with hash (#) is a comment, remark line that will not be executed but is included in script to explain to anyone not only using the script but also reading it what's happening, what will be done next.
In below code box lines 43 to 45 from the script:
Code:
##########################################################
# Create a temporary working folder C:\TempMount, delete
# old one first if folder with such name already exists
##########################################################
The above lines do not mean you should create the C:\TempMount folder manually, they only explain that in next lines the folder will be created by the script. In fact, if you create the TempMount folder manually or if it exists for any reason, it will be deleted by the script and then recreated. Look at the script lines 48 to 51:
Code:
cls
$Mount = 'C:\TempMount\'
if (Test-Path $Mount) {Remove-Item $Mount}
$Mount = New-Item -ItemType Directory -Path $Mount
Line 48 contains the Clear Screen (cls) command which clears the PowerShell window placing cursor on top, row 1 column 1. The next line then sets value (path) C:\TempMount to variable $Mount.
Following line, the so called IF statement checks if folder C:\TestMount exists from an earlier run, and if yes, removes it. Finally, a new item, a folder (ItemType Directory) will be created and named as C:\TempMount.
Short: each line in script starting with # is a comment, an explanation about what the script will do next. These lines will be ignored when script is run. They are not instructions to user but instead exist to make reading and understanding the functions of the script easier for those reading it, and also for the user who wrote it, in this case me; the script contains over 400 lines, if / when I need to edit it I can find correct place faster by checking the comments before each section.
Kari