﻿.\install.ps1 -user app-svc -password "P@ssw0rd123!" -domain contoso.com -srcdir "C:\code\IIS\caapi" -webdir "C:\WepApps\IIS\caapi" -tls $true
Starting IIS Application Deployment...
Checking modules...
Step A: Configuring Domain User 'app-svc'...
User 'app-svc' does not exist. Creating...
Domain user created successfully.
Get-LocalGroupMember : Group IIS_IUSRS was not found.
At C:\Users\Administrator\.gemini\antigravity\scratch\IISDeployment\install.ps1:129 char:15
+     $member = Get-LocalGroupMember -Group "IIS_IUSRS" | Where-Object  ...
+               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (IIS_IUSRS:String) [Get-LocalGroupMember], GroupNotFoundException
    + FullyQualifiedErrorId : GroupNotFound,Microsoft.PowerShell.Commands.GetLocalGroupMemberCommand

Adding 'WIN220\app-svc' to local IIS_IUSRS group...
WARNING: Failed to add user to IIS_IUSRS group via local cmdlets. Attempting manual net.exe fallback or skipping if
permissions issue.
The command completed successfully.

Step B: Configuring Application Pool 'caapi'...
Creating App Pool 'caapi'...
App Pool configured.
Step C: Deploying files and Website...
Creating web directory 'C:\WepApps\IIS\caapi'...
Copying files from 'C:\code\IIS\caapi' to 'C:\WepApps\IIS\caapi'...
Creating Website 'caapi' bound to 'contoso.com'...

Name             ID   State      Physical Path                  Bindings
----             --   -----      -------------                  --------
caapi            6    Started    C:\WepApps\IIS\caapi           http *:80:contoso.com
Step D: Configuring SSL...
Attempting script check for ADCS...
Requesting certificate from ADCS (Template: WebServer)...
Successfully enrolled certificate from CA.
Binding Certificate to Website...
SSL Bound Successfully.
Step E: Updating web.config...
Updated web.config with GUID: 493d6553-9a6d-43e8-8d3b-297260ffa7e7
Deployment Complete!