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

[BUG]: Using IISWebAppManagementOnMachineGroup on Client OS fails to install IIS #19819

Open
4 of 7 tasks
chaddoncooper opened this issue Apr 26, 2024 · 0 comments
Open
4 of 7 tasks

Comments

@chaddoncooper
Copy link

chaddoncooper commented Apr 26, 2024

New issue checklist

Task name

IIS Web App Manage

Task version

No response

Issue Description

When using the IIS Web App Manage task on a windows client (Windows 10/11 pro/enterprise) o/s in a machine group pipeline, if the Enable IIS option is selected the task will fail.

Initially it fails due to trying to import the powershell servermanager module, but after enabling RSAT it fails with The target of the specified cmdlet cannot be a Windows client-based operating system. This seems to be due to a client OS needing the cmdlet Enable-WindowsOptionalFeature rather than Add-WindowsFeature.

If you were to perhaps run a check on the Get-CimInstance -ClassName Win32_OperatingSystem ProductType and then if it's a client OS run (Get-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole).State to check it's Available we could then use the Enable-WindowsOptionalFeature which would fix the issue.

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows 10 Enterprise

Relevant log output

Before enabling RSAT:

2024-04-25T15:51:06.6288123Z ##[section]Starting: Create IIS API Website
2024-04-25T15:51:06.6293774Z ==============================================================================
2024-04-25T15:51:06.6293841Z Task         : IIS web app manage
2024-04-25T15:51:06.6293874Z Description  : Create or update websites, web apps, virtual directories, or application pools
2024-04-25T15:51:06.6293925Z Version      : 0.238.0
2024-04-25T15:51:06.6293952Z Author       : Microsoft Corporation
2024-04-25T15:51:06.6294128Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/iis-web-app-management-on-machine-group
2024-04-25T15:51:06.6294187Z ==============================================================================
2024-04-25T15:51:09.2550957Z Installing IIS. This may take few minutes.
2024-04-25T15:51:09.4414709Z ##[error]The specified module 'servermanager' was not loaded because no valid module file was found in any module directory.
2024-04-25T15:51:09.4941398Z ##[section]Finishing: Create IIS API Website

After enabling RSAT:
2024-04-25T16:14:43.0347688Z ##[section]Starting: Create IIS API Website
2024-04-25T16:14:43.0353238Z ==============================================================================
2024-04-25T16:14:43.0353302Z Task         : IIS web app manage
2024-04-25T16:14:43.0353336Z Description  : Create or update websites, web apps, virtual directories, or application pools
2024-04-25T16:14:43.0353388Z Version      : 0.238.0
2024-04-25T16:14:43.0353425Z Author       : Microsoft Corporation
2024-04-25T16:14:43.0353456Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/iis-web-app-management-on-machine-group
2024-04-25T16:14:43.0353874Z ==============================================================================
2024-04-25T16:14:45.3236026Z Installing IIS. This may take few minutes.
2024-04-25T16:14:45.6690422Z ##[error]The target of the specified cmdlet cannot be a Windows client-based operating system.
2024-04-25T16:14:45.7133425Z ##[section]Finishing: Create IIS API Website

Full task logs with system.debug enabled

 [REPLACE THIS WITH YOUR INFORMATION] 

Repro steps

No response

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

No branches or pull requests

1 participant