I executed this copy-item command line on windows 11:
Copy-Item -Path '//c/shared/file.xml' -Destination '\\REMOTE-PC\c$\testFolder' -Force
and It gives me unauthorized access message.
My user has full control and the same line command is working in Windows 10. Something changed in the new version of Windows. Any idea?
Error Message:
Copy-Item : Access is denied At line:1 char:1 + Copy-Item -Path '//source-Pc/shared/file.xml' -Destination '\dest-pc\c$ ... +
+ CategoryInfo : NotSpecified: (:) [Copy-Item], UnauthorizedAccessException + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.CopyItemCommand