Validating the destination file paths exchange 2016
I have parameterized the scriptblock to accept values for file content and a file name.
Values are passed with the –Argument List parameter.
With Power Shell remoting you have a secure, encrypted connection between two computers. Personally, I find the big benefit is that communication is done through a single port, which makes the entire process very firewall friendly.
In the Windows world this has usually been a no-brainer.
But if you are running Power Shell 4 and try to copy files to a computer running the v5 preview, you will get an error. Specify a local file and a folder on a remote computer. My command will copy the file to the remote folder over a PSSession.