Monday, March 26, 2018

How do you use ForEach loop in Windows Power Shell?


'For Each Loop' is used in all programming languages the notation may be slightly different. We already saw how we do it writing the array elements in my previous post here.


The ForEach-Object has other simpler aliases as shown here:



You can also access all Windows Objects if you use WMI as shown here.


These are my logical drives:


No comments: