Module/HelperFunctions/Get-BCSModuleProfile.ps1
<#
.SYNOPSIS Get your Module profile details .DESCRIPTION Read confing.json in APPDATA\BCSPowershellModule and returns a json object .EXAMPLE Get-BCSModuleProfile .NOTES Author: Mathias Stjernfelt Website: http://www.brightcom.se #> function Get-BCSModuleProfile { begin {} process { $userProfilePath = "$env:APPDATA\BCSPowershellModule\config.json" if (-not (Test-Path $userProfilePath)) { throw new Exception("User profile doesn't exist, please create one using Create-BCSModuleProfile.") } $json = LoadProfileConfig -path $userProfilePath $json } end { } } Export-ModuleMember -Function Get-BCSModuleProfile |