Module/Misc/New-BCSModuleProfile.ps1

<#
.SYNOPSIS
    Setup a new Module Profile
.DESCRIPTION
    Creates a new config.json in APPDATA folder
.EXAMPLE
    New-BCSModuleProfile -azureUserName "myUsername" -azurePassword (Get-BCSSecureString "myAzurePasword") -databaseUserName "myDatabaseUserName" -databasePassword (Get-BCSSecureString "myDatabasePasword")
.NOTES
    Author: Mathias Stjernfelt
    Website: http://www.brightcom.se
#>

function New-BCSModuleProfile {
    Param (
        [Parameter(ValueFromPipelineByPropertyName, Mandatory = $true)]
        [string]$azureUserName,
        [Parameter(ValueFromPipelineByPropertyName, Mandatory = $true)]
        [SecureString]$azurePassword,
        [Parameter(ValueFromPipelineByPropertyName, Mandatory = $true)]    
        [string] $databaseUserName,
        [Parameter(ValueFromPipelineByPropertyName, Mandatory = $true)]    
        [SecureString] $databasePassword
    )
    begin {}

    process {
        $userProfilePath = "$env:LOCALAPPDATA\BCSPowershellModule\config.json"

        CreateProfileConfig -userProfilePath $userProfilePath -azureUserName $azureUserName -azurePassword $azurePassword -databaseUserName $databaseUserName -databasePassword $databasePassword;
    }
    end {
    }
}

Export-ModuleMember -Function New-BCSModuleProfile