When used in the context of a cmdlet (for example, your example), this is an alias for ForEach-Object :
> Get-Alias -Definition ForEach-Object CommandType Name Definition ----------- ---- ---------- Alias % ForEach-Object Alias foreach ForEach-Object
When used in the context of an equation, it is a module operator :
> 11 % 5 1
and as the module operator % can also be used in the assignment operator ( %= ):
> $this = 11 > $this %= 5 > $this 1
Kohlbrr Apr 03 '14 at 19:03 2014-04-03 19:03
source share