1 2 3 4 5 6 7 8 9
[CmdletBinding()] Param( [Parameter(Mandatory=$True)] [string]$Directory ) git status --porcelain $Directory | ForEach-Object { (-split $_)[1] }