I'm hope someone can help with what I think is a simple thing that is just elluding me, I would lke to have a button that runs a line of powershell as one part of it and I want to aviod exteranl powershell scripts if possible.
The below line is what I am trying (with variations on the {sourcepath} or it not being there at all). I know the command works from a cmd or directly from powershell so I am sure the problem is the path referenceing but I can't figure out what I need to change
Many thanks, didn't solve the issue (may have partly done) but made me look at elsewhere when it still didn't work. I ended up using the below, the problem was I had a % in the command, I just replaced it with the long hand "ForEach-Object"