Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to backup a drive from a laptop that is defunct. This drive was pulled from the machine and mounted in an external enclosure and connected to a desktop via USB.

Laptop that the drive was pulled from is Windows 7 Pro, and the desktop I connected the laptop drive to is Windows 7 Ultimate.

I am running PowerShell on the desktop to copy everything from the laptop drive, prior to reformatting the laptop drive for re-use. The laptop drive appears as e:\ on the desktop.

When I issue "get-childitem 'e:\Documents and Settings' -force -recurse", I get a PermissionDenied exception on that directory.

Anybody know how I can force a listing of the contents of that directory? I am the administrator after all...

Thanks!

share|improve this question
add comment

2 Answers

Try

Get-ChildItem 'e:\Documents and Settings' -Force -Recurse -ErrorAction SilentlyContinue

and report what you find.

share|improve this answer
    
I get no output with that command. –  lifegoeson Jul 14 '10 at 19:20
    
Can you even 'Set-Location E:' ? Or does that throw the same exception? –  fletcher Jul 14 '10 at 19:46
    
I can set the location to this drive, yes. –  lifegoeson Jul 14 '10 at 20:08
add comment

just a guess; but have you tried taking ownership of the folders on the hd from windows?

  1. Right-click the folder that you want to take ownership of, and then click Properties.
  2. Click the Security tab, click Advanced, and then click the Owner tab.
  3. Click Edit. Administrator permission required If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
  4. Click the name of the person you want to give ownership to.
  5. If you want that person to be the owner of files and subfolders in this folder, select the Replace owner on subcontainers and objects check box.
  6. Click OK
share|improve this answer
    
Thanks! That did it. –  lifegoeson Jul 15 '10 at 13:32
2  
Well, vote it up and mark it as the correct answer! –  fletcher Jul 16 '10 at 5:29
    
Command line version of this answer: takeown /F "e:\Documents and Settings" /R /D Y –  Skyhawk Aug 2 '10 at 23:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.