You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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 withThe target of the specified cmdlet cannot be a Windows client-based operating system.
This seems to be due to a client OS needing the cmdletEnable-WindowsOptionalFeature
rather thanAdd-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)
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
Full task logs with system.debug enabled
Repro steps
No response
The text was updated successfully, but these errors were encountered: