forked from adthom/TeamsE911Automation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest02.ps1
35 lines (28 loc) · 1.03 KB
/
test02.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using module "..\TeamsE911Automation\src\TeamsE911Automation.psd1"
param (
[switch]
$Verbose
)
Write-Information "Testing simplified end-to-end workflow via CSV..."
Write-Information ""
Write-Information "Removing existing configuration..."
Remove-CsE911Configuration -Verbose:$Verbose
Write-Information ""
Write-Information "Beginning Tests..."
Reset-CsE911Cache -Verbose:$Verbose
Write-Information ""
Write-Information "Running Pipeline..."
$CsvPath1 = "$PSScriptRoot\test_data.csv"
$RawInput1 = Import-Csv -Path $CsvPath1 -Verbose:$Verbose
$RawOutput1 = $RawInput1 | Get-CsE911NeededChange -Verbose:$Verbose |
Set-CsE911OnlineChange -Verbose:$Verbose
# write $RawOutput1 back to source data
# $RawOutput1 | Export-Csv -Path $CsvPath1 -NoTypeInformation
Write-Information ""
Write-Information "$($RawInput1.Count) inputs provided to pipeline"
Write-Information "$($RawOutput1.Count) outputs generated from pipeline"
[PSCustomObject]@{
CsvPath1 = $CsvPath1
RawInput1 = $RawInput1
RawOutput1 = $RawOutput1
}