Skip to content
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 the path 'C:\tmp\vagrant-dsc\modules-0' is denied using vagrant-dsc #53

Open
A-CoreSoporte opened this issue May 16, 2018 · 2 comments

Comments

@A-CoreSoporte
Copy link

Hi,

I am having this error trying to use vagrant-dsc to a Windows 2016 Azure.

INFO interface: info: powershell.exe : gci : Access to the path 'C:\tmp\vagrant-dsc\modules-0' is denied.

I tried with 2012 and 2016, and the problem is the same, powershell provisioner run well.

default: Running provisioner: shell...
default: Running: inline PowerShell script
default: True No Success {Common HTTP Features, Default Document, D...

@jymaiso
Copy link

jymaiso commented Sep 12, 2019

same problem
i'm using vagrant on my windows 10 machine with hyper-v

@muddman
Copy link

muddman commented Oct 15, 2019

same

vagrant 2.2.5
windows 10 1903 (18362.418)

dsc.synced_folder_type = "smb"
dsc.temp_dir = "c:/tmp/vagrant-dsc/"

PS C:\vagrant\windows\StefanScherer\windows_10> vagrant provision --provision-with dsc
==> vagrant-10: Running provisioner: dsc...
==> vagrant-10: "Running DSC Provisioner with Win10DSC.ps1..."
Adding to path: C:\tmp\vagrant-dsc\modules-0
powershell.exe : gci : Access to the path 'C:\tmp\vagrant-dsc\modules-0' is denied.
+ CategoryInfo : NotSpecified: (gci : Access to...s-0' is denied.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
At C:\tmp\vagrant-dsc-runner.ps1:14 char:63

  • ... dsc/modules-0".Split(";") | ForEach-Object { gci -Recurse $_ | ForEa ...
  •                                              ~~~~~~~~~~~~~~~~
    
  • CategoryInfo : PermissionDenied: (C:\tmp\vagrant-dsc\modules-0:String) [Get-ChildIt
    em], UnauthorizedAccessException
  • FullyQualifiedErrorId : DirUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetChildIte
    mCommand

Ensure Modules
Get-PackageProvider : The term 'Get-PackageProvider' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At C:\tmp\vagrant-dsc-runner.ps1:17 char:1

  • Get-PackageProvider -Name NuGet -ListAvailable -ErrorAction SilentlyC ...
  • CategoryInfo : ObjectNotFound: (Get-PackageProvider:String) [], CommandNotFoundExce
    ption
  • FullyQualifiedErrorId : CommandNotFoundException

Get-PSRepository : The term 'Get-PSRepository' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At C:\tmp\vagrant-dsc-runner.ps1:22 char:6

  • if ((Get-PSRepository -Name PSGallery).InstallationPolicy -ne "Truste ...
  •  ~~~~~~~~~~~~~~~~
    
  • CategoryInfo : ObjectNotFound: (Get-PSRepository:String) [], CommandNotFoundExcepti
    on
  • FullyQualifiedErrorId : CommandNotFoundException

Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
At C:\tmp\vagrant-dsc-runner.ps1:26 char:33

  • "cChoco".Split(";") | foreach { Install-Module $_ }
  •                             ~~~~~~~~~~~~~~
    
  • CategoryInfo : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException
  • FullyQualifiedErrorId : CommandNotFoundException

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants