Chcę zainstalować funkcję ograniczenia adresów IP i domeny w moim wdrożeniu platformy Azure, ale używam wersji 3 systemu (serwer 2012), która dokonała deprecjacji usługi ServerManageCmd, dlatego następujący kod nie działa:Instalowanie funkcji zadania uruchamiania systemu Azure dla systemu Windows Server 2012
StartupTask.cmd
@echo off
@echo Installing "IPv4 Address and Domain Restrictions" feature
%windir%\System32\ServerManagerCmd.exe -install Web-IP-Security
@echo Unlocking configuration for "IPv4 Address and Domain Restrictions" feature
%windir%\system32\inetsrv\AppCmd.exe unlock config -section:system.webServer/security/ipSecurity
ServiceDefinition.csdef częściowy
<Startup>
<Task commandLine="Startup\StartupTasks.cmd" executionContext="elevated" taskType="simple" />
</Startup>
Sądzę, że potrzebuję użyć poleceń programu Power Shell, ale jestem tu trochę nie na miejscu. Czy ktoś może dostarczyć 2012 odpowiednik tego kodu?