Get-SecureMFA_SSPR_Portal.ps1

#Requires -RunAsAdministrator
#Requires -Version 5.0

<#
     .SYNOPSIS
        Shows SecureMFA SSPR Portal configuration.
    .DESCRIPTION
        Shows SecureMFA SSPR Portal configuration in appsettings.json file.
 
        Dependencies:
        * Only licensed SSPR portal will allow to use customised data_encryption when reading encrypted secrets from database and auth_mode settings cannot be customised.
   
 
    .NOTES
        Version: 2.0.0.1
        Author: SecureMfa.com
        Creation Date: 06/01/2021
        Purpose/Change: Release
   
    .EXAMPLE
        C:\PS> Get-SecureMFA_SSPR_Portal
 
        This command shows <appsettings.json> configuration values from parameters in C:\inetpub\SecureMFASSPR\appsettings.json for SecureMFA SSPR Portal on a server.
    
#>


#Check if windows events source for application log exist, if not create one.
if ([System.Diagnostics.EventLog]::SourceExists("SecureMFA SSPR") -eq $False) {New-EventLog -LogName "Application" -Source "SecureMFA SSPR" ; Write-Host "SecureMFA SSPR Log Source Created."}

Function Get-SecureMFA_SSPR_Portal {
Param
(    
    [Parameter(Mandatory=$false)][string]$WebSSPRPortalPath = "C:\inetpub\SecureMFASSPR\"     
   
)
     
    try
    {
        $Error.Clear()
        
        Get-Content -path ($WebSSPRPortalPath + "appsettings.json")                

    }
    catch
    {
        Write-Host "$($MyInvocation.InvocationName): $_" -ForegroundColor red
    }    


}