diff options
author | heqnx <root@heqnx.com> | 2025-07-14 16:16:45 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-07-14 16:16:45 +0300 |
commit | 32a92a4fd19baa6438c0443deb247e93d02b1948 (patch) | |
tree | 8e310eeaac4da16f58badbb8e906f6566c3c0803 /ansible/scripts/setup-iis.ps1 | |
parent | b1ca188b8a16a49b79cd18ae39261fe9c666edf1 (diff) | |
download | ansible-active-directory-range-32a92a4fd19baa6438c0443deb247e93d02b1948.tar.gz ansible-active-directory-range-32a92a4fd19baa6438c0443deb247e93d02b1948.zip |
added defender disabling gpo, changed print messages in scripts, logging set domain network
Diffstat (limited to 'ansible/scripts/setup-iis.ps1')
-rw-r--r-- | ansible/scripts/setup-iis.ps1 | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ansible/scripts/setup-iis.ps1 b/ansible/scripts/setup-iis.ps1 index 1bbe48d..1ebdd82 100644 --- a/ansible/scripts/setup-iis.ps1 +++ b/ansible/scripts/setup-iis.ps1 @@ -19,9 +19,9 @@ try { New-NetFirewallRule -DisplayName "HTTP (80)" -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow Restart-WebAppPool -Name "DefaultAppPool" - Write-Host "[INFO] Created first IIS WebSite, Firewall rule and AppPool" + Write-Host "[inf] Created first IIS WebSite, Firewall rule and AppPool" } catch { - Write-Host "[ERR] Failed to create first IIS WebSite, Firewall rule and AppPool" + Write-Host "[err] Failed to create first IIS WebSite, Firewall rule and AppPool" } try { @@ -30,9 +30,9 @@ try { $acl.SetAccessRule($svcIIS03Rule) Set-Acl -Path $wwwroot1 -AclObject $acl - Write-Host "[INFO] Set ACL for $wwwroot1" + Write-Host "[inf] Set ACL for $wwwroot1" } catch { - Write-Host "[ERR] Failed to set ACL for $wwwroot1" + Write-Host "[err] Failed to set ACL for $wwwroot1" } @" @@ -107,9 +107,9 @@ try { Set-ItemProperty "IIS:\AppPools\DefaultAppPool2" -Name processModel -Value @{ identityType=2 } New-NetFirewallRule -DisplayName "HTTP (8080)" -Direction Inbound -Protocol TCP -LocalPort 8080 -Action Allow - Write-Host "[INFO] Created second IIS WebSite, Firewall rule and AppPool" + Write-Host "[inf] Created second IIS WebSite, Firewall rule and AppPool" } catch { - Write-Host "[ERR] Failed to create second IIS WebSite, Firewall rule and AppPool" + Write-Host "[err] Failed to create second IIS WebSite, Firewall rule and AppPool" } try { @@ -119,9 +119,9 @@ try { $acl.SetAccessRule($rule) Set-Acl -Path $wwwroot2 -AclObject $acl - Write-Host "[INFO] Set ACL for $wwwroot2" + Write-Host "[inf] Set ACL for $wwwroot2" } catch { - Write-Host "[ERR] Failed to set ACL for $wwwroot2" + Write-Host "[err] Failed to set ACL for $wwwroot2" } Restart-WebAppPool -Name "DefaultAppPool2" |