psadmin-io / ps-vagabond

PeopleSoft Image management with Vagrant
MIT License
26 stars 10 forks source link

Access Denied in `cleanup_before_exit` function #27

Open iversond opened 7 years ago

iversond commented 7 years ago

In the provision-boot.ps1 script, an "Access Denied" error is returned when the cleanup_before_exit function is run:

Remove-Item : Cannot remove item
C:\Users\vagrant\AppData\Local\Temp\tmp20A0.tmp: The process cannot access the
file 'tmp20A0.tmp' because it is being used by another process.
At C:\temp\provision-boot.ps1:339 char:5
+     Remove-Item $env:TEMP -Recurse -Force 2>&1 | out-null
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (tmp20A0.tmp:FileInfo) [Remove-Item]
   , IOException
    + FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell
   .Commands.RemoveItemCommand