-
Notifications
You must be signed in to change notification settings - Fork 83
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 Denied trying to change winrm configuration during provisioning #176
Comments
The shell provisioner doesn't have true admin access on the box. The chef provisioner works around this by running Chef through a scheduled task that has 'run with highest privileges'. I've been working on a vagrant-windows branch that runs all provisioners through an elevated shell, so commands that you run locally will run the same through vagrant-windows. |
Using a scheduled task is the workaround I'm investigating in fact. Also, if the installation is done via a scheduled task I would not even need to increase the winrm setting in the first place, but it's not the ideal way to provision the machine. I would rather use puppet, but for the time being that doesn't seem to be an option. |
You could workaround it using a PowerShell script based off this one. It handles creating the scheduled task, running it, and reporting back output. If it were me I'd use vagrant-windows and vagrant-berkshelf with the dotnetframework cookbook running through the chef-solo provisioner. Its pretty simple. |
That's neat, but I guess I'll stick with the simpler scheduled task Thanks On Thu, Mar 6, 2014 at 2:50 AM, Shawn Neal notifications@github.com wrote:
|
Hi, after quite some time spent researching why I could not get to install .NET 4.5 as part of the provisioning, though it worked perfectly if I did the same directly on the guest, I figure out it requires increasing the available memory for winrm using the
MaxMemoryPerShellMB
setting. Now, when trying to do that I always get an error similar to this:Here's the command I'm trying to run:
but I tried different options: inline, powershell script, different ways of changing that setting:
and
Invoke-Command -ComputerName localhost { Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 1024 }
I always get the same error.
Any idea?
The text was updated successfully, but these errors were encountered: