Share this article

Improve this guide

Copy-item Access is Denied in PowerShell: 8 Tested Fixes

This issue is due to lack of NTFS write permissions

4 min. read

Published onJuly 11, 2024

published onJuly 11, 2024

Share this article

Improve this guide

Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more

Running into the Copy-Item Access is Denied error in PowerShell is baffling since you can perform the process in File Explorer without a problem. This is due to lack of NTFS permissions when writing to a network share but the solutions below will fix the problem in no time.

How do I fix the Copy-Item Access is Denied error in PowerShell?

How do I fix the Copy-Item Access is Denied error in PowerShell?

1. Ensure correct NTFS permissions

Ensuring proper NTFS permissions allows the script to write to the folder, resolving access issues.

2. Verify the Share permissions

Both NTFS and Share permissions need to allow write access for successful file copying.

3. Run PowerShell as Administrator

Running PowerShell as an administrator ensures full access to protected system folders and network shares.

4. Use UNC paths without credentials

Using UNC paths and mapping a network drive helps avoid credential-related issues with network paths.

5. Modify Environment Variables in PowerShell

Correctly referencing environment variables in PowerShell ensures paths are resolved properly.

6. Enable PowerShell Remoting

Enabling PowerShell remoting and using the correct session parameters makes remote file operations smoother.

7. Address User Account Control (UAC) issues

Elevating permissions within the script circumvents UAC restrictions.

8. Handle the Double Hop issue

Pre-copying files and using direct paths prevent issues related to multiple remote connections.

By following these solutions, you should be able to resolve the Copy-Item: Access is denied error in PowerShell.

Once this error is cleared out, you may also check our guide on what to do ifPoweShell is not showing the full output.

Also, ifPowerShell is closing after running a script, click the highlighted link to learn how to keep it open.

For any suggestions or question, hit the comments section below to write them down.

More about the topics:PowerShell

Claudiu Andone

Windows Toubleshooting Expert

Oldtimer in the tech and science press, Claudiu is focused on whatever comes new from Microsoft.

His abrupt interest in computers started when he saw the first Home Computer as a kid. However, his passion for Windows and everything related became obvious when he became a sys admin in a computer science high school.

With 14 years of experience in writing about everything there is to know about science and technology, Claudiu also likes rock music, chilling in the garden, and Star Wars. May the force be with you, always!

User forum

0 messages

Sort by:LatestOldestMost Votes

Comment*

Name*

Email*

Commenting as.Not you?

Save information for future comments

Comment

Δ

Claudiu Andone

Windows Toubleshooting Expert

Oldtimer in the tech and science press, with 14 years of experience in writing on everything there is to know about science, technology, and Microsoft