Skip to content

Commit cc33e78

Browse files
imcarolwangmconnew
authored andcommitted
Update.
1 parent 63a8954 commit cc33e78

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/System.Private.ServiceModel/tools/scripts/RefreshServerCertificates.cmd

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ if NOT "%ERRORLEVEL%"=="0" (
4848
)
4949

5050
:: Grant IIS WCF Service Pool permission to access the new certs' private key
51-
set PoolNames=WcfService1 WcfService2 WcfService3 WcfService4 WcfService5 WcfService6 DefaultAppPool
52-
53-
for %%P in (%PoolNames%) do (
51+
for /f "tokens=*" %%P in ('powershell -command "Get-IISAppPool | Where-Object { $_.Name -like '*wcfservice*' } | Select-Object -ExpandProperty Name"') do (
5452
echo [%~n0] powershell -NoProfile -ExecutionPolicy unrestricted %_SCRIPTSDIR%\CertificatePrivateKeyPermissions.ps1 'IIS APPPOOL\%%P' >> %_LOGFILE%
5553
powershell -NoProfile -ExecutionPolicy unrestricted %_SCRIPTSDIR%\CertificatePrivateKeyPermissions.ps1 'IIS APPPOOL\%%P' >> %_LOGFILE% 2>&1
5654
)

0 commit comments

Comments
 (0)