# If there's an error in a call such as $cfg.settings.Lock(), it is important that the script stops. # Continuing while another application is also potentially modifying settings may corrupt them. $ErrorActionPreference = "Stop" # The PowerShell instance executing this script needs to run elevated, as administrator, to access SSH Server settings. $cfg = new-object -com "Bitvise.BssCfg" # Display the current SSH Server activation information and upgrade access expiry date if ($cfg.actState.isEvaluation) { if ($cfg.actState.isExpired) { Write-Host "This SSH Server installation was under evaluation. The evaluation period has expired." } else { Write-Host "This SSH Server installation is under evaluation. Days remaining: $($cfg.actState.daysRemaining)" } } elseif (0 -eq $cfg.actState.licenseType) { # $cfg.enums.licenseType.unknown Write-Host "This SSH Server installation is not activated." } elseif (1 -eq $cfg.actState.licenseType) { # $cfg.enums.licenseType.personal Write-Host "The SSH Server is installed as Personal Edition." Write-Host "The Personal Edition is licensed only for use that is both personal AND non-commercial." Write-Host "The Personal Edition is not licensed for use in organizations." } else { Write-Host "SSH Server activation information:" Write-Host "Licensed to: $($cfg.actState.licensedTo)" Write-Host "Seller: $($cfg.actState.seller)" Write-Host "Order number: $($cfg.actState.orderNr)" Write-Host "Upgrade expiry: $($cfg.actState.upgradeExpiry)" }