November 2018
Intermediate to advanced
566 pages
17h 15m
English
How this works is simple. Based on how comfortable we are with scripting and how readable we would like to make the scripts, we assign values to variables. In our case, for the sake of ease of use, we split $PathInfo.Exclusion -split ';' into $ExclusionPaths.
$PathInfo.Exclusion is a single string. However, $ExclusionPaths is a string array (which is why the .Count property returned 2).
When we had to display the array in a single human-readable sentence, we used the -join operator to join the two elements with a comma and a space. This works for any number of elements in the array.
Read now
Unlock full access