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

xDscWebService: Created IIS application pool will not be removed if Ensure = Absent #464

Closed
tmeckel opened this issue Nov 14, 2018 · 4 comments

Comments

@tmeckel
Copy link
Contributor

tmeckel commented Nov 14, 2018

Details of the scenario you tried and the problem that is occurring

When a deployed DSC Pull Server is retracted by setting Ensure to Absent the created IIS Application Pool ist not deleted if the ApplicationPool isn't in use anymore.

Verbose logs showing the problem

No error or warning is shown. The application pool is still shown though in the IIS administration console or by using dir dir IIS:\AppPools

The DSC configuration that is used to reproduce the issue (as detailed as possible)

Configuration HTTPPullServer {

    Import-DSCResource -ModuleName xPSDesiredStateConfiguration

    Node $NodeName
    {
        WindowsFeature DSCServiceFeature
        {
            Ensure = "Present"
            Name   = "DSC-Service"
        }

        xDscWebService PSDSCPullServer
        {
            Ensure                  = $State
            EndpointName            = $EndpointName
            Port                    = $Port
            PhysicalPath            = "$env:SystemDrive\inetpub\PSDSCPullServer"
            CertificateThumbPrint   = $certificateThumbPrint
            ModulePath              = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules"
            ConfigurationPath       = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration"
            State                   = "Started"
            DependsOn               = "[WindowsFeature]DSCServiceFeature"
            RegistrationKeyPath     = "$env:PROGRAMFILES\WindowsPowerShell\DscService"
            AcceptSelfSignedCertificates = $true
            Enable32BitAppOnWin64   = $false
            UseSecurityBestPractices = $false
        }

        File RegistrationKeyFile
        {
            Ensure          = $State
            Type            = 'File'
            DestinationPath = "$env:ProgramFiles\WindowsPowerShell\DscService\RegistrationKeys.txt"
            Contents        = $RegistrationKey
            DependsOn       = "[WindowsFeature]DSCServiceFeature"
        }
    }
}

The operating system the target node is running

OsName               : Microsoft Windows Server 2012 R2 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture       : 64-bit
WindowsBuildLabEx    : 9600.19125.amd64fre.winblue_ltsb.180812-0703
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Version and build of PowerShell the target node is running

Name                           Value
----                           -----
PSVersion                      5.1.14409.1012
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14409.1012
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Version of the DSC module that was used ('dev' if using current dev branch)

ResourceType  : MSFT_xDSCWebService
Name          : xDSCWebService
FriendlyName  : xDSCWebService
Module        : xPSDesiredStateConfiguration
ModuleName    : xPSDesiredStateConfiguration
Version       : 8.4.0.0
Path          : C:\Program Files\WindowsPowerShell\Modules\xPSDesiredStateConfiguration\8.4.0.0\DSCResources\MSFT_xDSCWebService\MSFT_xDSCWebService.psm1
ParentPath    : C:\Program Files\WindowsPowerShell\Modules\xPSDesiredStateConfiguration\8.4.0.0\DSCResources\MSFT_xDSCWebService
ImplementedAs : PowerShell
CompanyName   : Microsoft Corporation
@stale
Copy link

stale bot commented Dec 14, 2018

This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.

@stale stale bot added the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Dec 14, 2018
@stale
Copy link

stale bot commented Jan 25, 2019

This issue has been automatically closed because it is has not had activity from the community in the last 40 days.

@stale stale bot closed this as completed Jan 25, 2019
@mhendric
Copy link
Contributor

Reopening issue and making it not stale.

@mhendric mhendric reopened this Jan 25, 2019
@mhendric mhendric removed the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Jan 25, 2019
@PlagueHO
Copy link
Member

Fixed with PR #465

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

No branches or pull requests

3 participants