-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access to path is denied #7
Comments
So I dug into this a little more and found that for whatever reason (I have no idea why) Compress-7Zip will not working over Powershell Remoting. Using the same credentials the script will fail if run remotely and work if run from remote desktop. |
I've never used PowerShell Remoting before. However, as far as I understand it, the module is copied to the remote machine automatically. I guess that the remoting mechanism doesn't copy the required native DLLs |
While in the remote session I did a "install-module" and pulled the module down to the remote machine from the powershell gallery. Also for reference i've always had to install-modules manually on the remote machine before they are usable for remoting. |
I just installed the 1.13 module today, locally in Powershell 5.1 on Windows 10. I tried to 7zip files in a directory I created and had a few pdf files in. I was running Powershell as Administrator. Whenever I try to compress anything, I get this message: Compress-7Zip : Access to the path Why this directory is being used instead of %TEMP%, I'm not certain. This directory doesn't even exist. My command line was this: Compress-7Zip -Path . -Filter *.pdf -ArchiveFileName .\stuff.7z |
I'm trying to compress multiple folders into separate zip files however I keep getting "Access to path is denied". if I run 7za.exe by itself it can zip the folders just fine.
My Script:
$folders = Get-ChildItem -Exclude ".mig",".zip","_Easy File Transfer (migwiz)"
$env:Path = $env:Path + ";K:\TechStuff\Tech_Software\7za"
foreach($folder in $folders) {
}
Error:
Compress-7Zip : Access to the path 'K:\Profile Backups\spatrico' is denied.
At line:6 char:5
The text was updated successfully, but these errors were encountered: