레거시 제어판(CSCP) 사용 안 함

New 제어판 시작 후 비즈니스용 Skype 서버 빌드 2019 2046.524에서 입력의 유효성을 검사하고 시작 옵션 메뉴에서 원래 제어판(CSCP)를 사용하지 않도록 설정하는 두 개의 새로운 레지스트리 키에 대한 지원을 추가하고 있습니다.

SOFTWARE\Microsoft\Real-Time Communications{5DC8C4D5-5133-4CE5-BF4E-8C459BF419D6}\DMR : 모니터링 서버에 대한 유효성 검사를 추가합니다.

SOFTWARE\Microsoft\Real-Time Communications{5DC8C4D5-5133-4CE5-BF4E-8C459BF419D6}\OCP : 원래 제어판(CSCP)을 사용하지 않도록 설정하기 위한 레지스트리 키

참고

레지스트리 키가 없는 경우 제어판 시작 동작은 변경되지 않습니다.

다음 PowerShell 스크립트는 두 개의 새 레지스트리 키를 추가합니다.

[CmdletBinding()]
param (
    [switch]$Undo
)

# IIS site details
$iisSiteName = "Skype for Business Server Internal Web Site"
$iisAppName = "cscp"
$iisAppPhysicalPathOld = "C:\Program Files\Skype for Business Server 2019\Web Components\AdminUI"
$iisAppPhysicalPath = "C:\Program Files\Skype for Business Server 2019\Web Components"

# Load the WebAdministration module
Import-Module WebAdministration

if ($Undo) {
    # Undo the changes made by the script
    $parentKey = "HKLM:\SOFTWARE\Microsoft\Real-Time Communications\{5DC8C4D5-5133-4CE5-BF4E-8C459BF419D6}"
    $registryKeys = @("DMR", "OCP")

    foreach ($key in $registryKeys) {
        $registryKey = "$parentKey\$key"
        # Check if the key exists before removing it
        if (Test-Path $registryKey) {
            Remove-Item -Path $registryKey -Recurse -Force
            Write-Host "Registry key '$registryKey' removed."
        } else {
            Write-Host "Registry key '$registryKey' does not exist. No changes were made."
        }
    }

     # IIS application changes
    # Check if the IIS site exists
    if ($iisSite = Get-Website $iisSiteName -ErrorAction SilentlyContinue) {
        # Check if the application exists
        $existingApp = Get-WebApplication -Site $iisSiteName | Where-Object { $_.Path -eq "/$iisAppName" }
        if ($existingApp) {
            # If the application exists, change the Physical Path using Set-WebConfigurationProperty
            Set-WebConfigurationProperty -Filter "/system.applicationHost/sites/site[@name='$iisSiteName']/application[@path='/$iisAppName']/virtualDirectory[@path='/']" -Name "physicalPath" -Value $iisAppPhysicalPathOld
            Write-Host "IIS application '$iisAppName' Physical Path changed to '$iisAppPhysicalPathOld'."
        } else {
            Write-Host "IIS application '$iisAppName' does not exist. The Physical Path cannot be changed."
        }
    } else {
        Write-Host "IIS site '$iisSiteName' does not exist. The application cannot be changed."
    }
}
else {
    # Apply the changes

    # Registry changes
    $parentKey = "HKLM:\SOFTWARE\Microsoft\Real-Time Communications\{5DC8C4D5-5133-4CE5-BF4E-8C459BF419D6}"
    $registryKeys = @("DMR", "OCP")

    foreach ($key in $registryKeys) {
        $registryKey = "$parentKey\$key"
        # Check if the key exists
        if (-Not (Test-Path $registryKey)) {
            # If the key does not exist, create it with a default value or add any necessary subkeys or values
            New-Item -Path $registryKey -Force | Out-Null
            Write-Host "Registry key '$registryKey' and values created."
        } else {
            Write-Host "Registry key '$registryKey' already exists."
        }
    }

    # IIS application changes
    # Check if the IIS site exists
    if ($iisSite = Get-Website $iisSiteName -ErrorAction SilentlyContinue) {
        # Check if the application exists
        $existingApp = Get-WebApplication -Site $iisSiteName | Where-Object { $_.Path -eq "/$iisAppName" }
        if ($existingApp) {
            # If the application exists, change the Physical Path using Set-WebConfigurationProperty
            Set-WebConfigurationProperty -Filter "/system.applicationHost/sites/site[@name='$iisSiteName']/application[@path='/$iisAppName']/virtualDirectory[@path='/']" -Name "physicalPath" -Value $iisAppPhysicalPath
            Write-Host "IIS application '$iisAppName' Physical Path changed to '$iisAppPhysicalPath'."
        } else {
            Write-Host "IIS application '$iisAppName' does not exist. The Physical Path cannot be changed."
        }
    } else {
        Write-Host "IIS site '$iisSiteName' does not exist. The application cannot be changed."
    }
}

Write-Host "Restarting IIS Server"
# Perform IIS reset
iisreset
Write-Host "Done"

참고

실수로 위의 스크립트를 실행하고 변경 내용을 되돌리기 경우 매개 변수를 사용하여 위의 PowerShell 스크립트를 -Undo 실행합니다.