microsoft / MSLab

Azure Stack HCI, Windows 10 and Windows Server rapid lab deployment scripts
MIT License
1.18k stars 284 forks source link

Scenario CA #491

Closed Mrkuff closed 2 years ago

Mrkuff commented 2 years ago

I got this error of CA configuration for Mime

PS C:\Windows\system32> Invoke-Command -ComputerName ca -ScriptBlock { & $Env:WinDir\system32\inetsrv\appcmd.exe set config /section:staticContent /-"[fileExtension='.pem']" & $Env:WinDir\system32\inetsrv\appcmd.exe set config /section:staticContent /+"[fileExtension='.pem',mimeType='text/plain']" } ERROR ( message:Cannot find requested collection element. ) Applied configuration changes to section "system.webServer/staticContent" for "MACHINE/WEBROOT/APPHOST" at configurati on commit path "MACHINE/WEBROOT/APPHOST"

jaromirk commented 2 years ago

yeah, I think this is OK. Removing the extension ("/-"[fileExtension='.pem']") that does not exist will cause this error (and yes, it did not exist). It's because I did reuse the linked guide 1:1.