Permalink
Browse files

First commit

  • Loading branch information...
ndrshnsn committed Jul 28, 2017
0 parents commit 530837b33847627468c4b7106d77531e09f314e3
Showing with 2,051 additions and 0 deletions.
  1. +1 −0 ignored.txt
  2. +39 −0 lib/config.ps1
  3. +799 −0 lib/functions.ps1
  4. +302 −0 lib/logging.ps1
  5. +657 −0 lib/utils.ps1
  6. +161 −0 mailTemplate.htm
  7. BIN pFolder.ps1
  8. +92 −0 pFolder.xml
@@ -0,0 +1 @@
@@ -0,0 +1,39 @@
<#
.SYNOPSIS
Get config from XML
.DESCRIPTION
Get content from XML file and put in array
.PARAMETER path
Mandatory. Source of config
.INPUTS
Parameters above
.OUTPUTS
None
.NOTES
Version: 1.0
Author: Andreas Hansen
Creation Date: 24/02/2014
Purpose/Change: Creat array from XML file
#>
Param ($path = $(throw "You must specify a config file"))
$global:appSettings = @{}
$config = [xml](get-content $path)
foreach ($addNode in $config.configuration.appsettings.add) {
if ($addNode.Value.Contains(‘,’)) {
# Array case
$value = $addNode.Value.Split(‘,’)
for ($i = 0; $i -lt $value.length; $i++) {
$value[$i] = $value[$i].Trim()
}
} else {
# Scalar case
$value = $addNode.Value
}
$global:appSettings[$addNode.Key] = $value
}
Oops, something went wrong.

0 comments on commit 530837b

Please sign in to comment.