Must be saved and run as a script.
diff is a built-in alias for
gc is a built-in alias for
$MyInvocation.InvocationName gets the full path to the script being executed.
32..126 is the decimal equivalent for
0x20..0x7e, and so creates an array of the decimal ASCII codes we're looking for.
[char] takes the contents of the next object and puts them into an array, breaking them up and converting them into ASCII characters. So, we now have two arrays of ASCII characters - one pulled from this script, the other defined by the challenge criteria.
Compare-Object to "Passthru" format, so only the items which are found different between the inputs are output at the console - indicators of which items were in which input are still stored in the object's data, but are not displayed.
Compare-Object's output to
Where-Object, which filters it down to only the items which are exclusive to the second input.