mefellows / vagrant-dsc

DSC Provisioner for Vagrant
MIT License
46 stars 15 forks source link

Access to the path 'C:\tmp\vagrant-dsc\modules-0' is denied using vagrant-dsc #53

Open A-CoreSoporte opened 6 years ago

A-CoreSoporte commented 6 years ago

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 commented 5 years ago

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

muddman commented 5 years ago

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