azurebicepvm's People
azurebicepvm's Issues
WindowsDevTools component fails on PowerShell script execution
The following error occurs during the deployment:
{
"code": "VMExtensionProvisioningError",
"message": "VM has reported a failure when processing extension 'WindowsDevTools'. Error message: \"Command execution finished, but failed because it returned a non-zero exit code of: '1'. The command had an error output of: 'Set-ExecutionPolicy : Windows PowerShell updated your execution policy successfully, but the setting is overridden by \r\na policy defined at a more specific scope. Due to the override, your shell will retain its current effective \r\nexecution policy of Unre...' For more information, check the instance view by executing Get-AzVmssVm or Get-AzVm (https://aka.ms/GetAzVm). These commands can be executed using CloudShell (https://aka.ms/CloudShell)\"\r\n\r\nMore information on troubleshooting is available at https://aka.ms/VMExtensionCSEWindowsTroubleshoot "
}
I think the issue is that you're trying to execute a PowerShell script via commandToExecute: 'powershell.exe -ExecutionPolicy Unrestricted -File windowsdevtools.ps1'
And then the first thing you do as part of that same script is to set the policy to RemoteSigned.
If ((Get-ExecutionPolicy) -ne 'RemoteSigned') {Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force}
I tried removing the Unrestricted option and re-running the main.bicep again. However, it runs into a different problem:
{
"code": "VMExtensionProvisioningError",
"message": "VM has reported a failure when processing extension 'WindowsDevTools'. Error message: \"Command execution finished, but failed because it returned a non-zero exit code of: '1'. The command had an error output of: '.NET Framework 4.8 was installed, but a reboot is required. \r\n Please reboot the system and try to install/upgrade Chocolatey again.\r\nAt C:\\Windows\\TEMP\\chocolatey\\chocoInstall\\tools\\chocolateysetup.psm1:815 char:11\r\n+ throw \".NET Framework 4.8 w...' For more information, check the instance view by executing Get-AzVmssVm or Get-AzVm (https://aka.ms/GetAzVm). These commands can be executed using CloudShell (https://aka.ms/CloudShell)\"\r\n\r\nMore information on troubleshooting is available at https://aka.ms/VMExtensionCSEWindowsTroubleshoot "
}
Shall we just do it using winget now?
I can submit a PR ๐
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.