Private/Get-ConfigPath.ps1
|
function Get-ConfigPath { <# .SYNOPSIS Get the path to the configuration file .DESCRIPTION Returns the path to the module configuration file #> [CmdletBinding()] param() # Store config in user's AppData $appDataPath = [Environment]::GetFolderPath('ApplicationData') $configDir = Join-Path $appDataPath "NLBaselineCA" if (-not (Test-Path $configDir)) { New-Item -Path $configDir -ItemType Directory -Force | Out-Null } $configPath = Join-Path $configDir "config.json" return $configPath } |