Copy-Item or Robocopy

# Hi,

# I would like to use a simple copy by Copy-Item , but criteria is to exclude a big folder while copying named "Virtual Machines":

 

 

copy-item 

 

 

 

 

 

C:\Users\R2D2\Documents -destination F:\Backup\Docs -exclude C:\Users\R2D2\Documents\"Virtual Machines" -recurse -verbose

# I tried Copy-Item with -exclude parameter, but somehow only robocopy could use well exclude (/XD) to copy.

robocopy 

 

 

 

 

 

C:\Users\R2D2\Documents F:\Backup\Docs /E /XD C:\Users\R2D2\Documents\"Virtual Machines" /LOG+:"C:\Temp\robolog.txt"

# Do you think I have to use Robocopy for this sort of copy tasks? Or just missed something from my Copy-Item example?

# Thanks in advance

# R.