[Setting] Level=5 Name=x:\process.log Log=1 Type=2 [State] stage=10 step=Capture status=BEGIN Step= Status=
Function Get-IniFile { Param( [parameter(mandatory=$true)][string]$path ) $inifile = $path $ini = @{} Get-Content $inifile | ForEach-Object { $_.Trim() } | Where-Object { $_ -notmatch '^(;|$)' } | ForEach-Object { if ($_ -match '^\[.*\]$') { $section = $_ -replace '\[|\]' $ini[$section] = @{} } else { $key, $value = $_ -split '\s*=\s*', 2 $ini[$section][$key] = $value } } $read = $ini.Setting.Name $read }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)