I have two machines Server A and Server B, and I want to copy all the files and folder tree from Server A to Server B using PowerShell.
I have tried the command given below, but it copies only the files in the folder and does not create the folder tree:
Copy-Item E:\TestSource\* //TestDestination/ -recurse -force