Hello all, I'm new to powershell and I was wondering if someone can tell me what I'm doing wrong in the below code. Basically, all I'm trying to do is copy files from one directory to another and at the same time write-out to the ps console how many items were moved. Here is my script from the console
I would use $counter ++ – personal preference
I would use Write-Output not Write-Host (need I say why!?)
No need for the '+' signs
I would use 'copied' instead of 'moved' since it's more accurate representation of what was performed.