Quantcast
Channel: Microsoft forum - dslreports.com
Viewing all articles
Browse latest Browse all 8524

Powershell Script to Backup Files and EFS Brick Wall

$
0
0
I'm trying to create a simple Powershell script that we can use to backup files rather than doing it manually before rebuilding a Windows 7 machine. Seems like a simple enough task, except I've run into a brick wall called EFS. The source directories are all EFS encrypted. I started intending to use robocopy, it protests however that the file could not be encrypted copying to the network drive. Could not find a way around this, so I tried using Powershells own Copy-Item. Again "Copy-Item : The specified file could not be encrypted." Tried adding -Force to the command, no difference. Using the command below. Copy-Item $ENV:USERPROFILE\Favorites $ENV:HOMEDRIVE\Win7_Bkup\Favorites -recurse -force I don't care the the files will no longer be encrypted in the destination. However neither robocopy or Copy-Item can deal with this. They INSIST that EFS encrypted files MUST be copied to an EFS capable destination. Any ideas on how I can get around this short of first decrypting the files?

Viewing all articles
Browse latest Browse all 8524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>