ForEach-Object allows you to use script blocks which can be really useful when you need to log the process or clean up when the script is completed. You can output the list of the days contained in the array using a simple For loop, as demonstrated in the following example. Levin Roy is a software engineer who loves writing about technology. Instead of having two times, have one, and instead of keeping a minutes and seconds count, use a "target" DateTime value: C. By subscribing you agree to our Terms of Use and Privacy Policy.
nest...