Public/Set-FileConfig.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<#
    .SYNOPSIS
    Reads the configuration from an XML file and persists in a script level variable

    .DESCRIPTION
    Reads the configuration from an XML file in the CliXml format.

    .INPUTS
    None. You cannot pipe objects to Set-FileConfig.

    .PARAMETER Path
    The path to the CliXMl file. Defaults to "config.xml"

    .OUTPUTS
    None.

    .NOTES
    Will attempt to IAM authenticate to check the configuration of both IAM and salesforce.
#>

function Set-FileConfig {
    param([String]$Path = "config.xml")
    Set-Config (Import-CliXml -Path $Path)
}