bin/TestCode/TestModule/TestModule.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Function Test-Function {
    Write-Host "Host: Parent Function - $($args[0])"
    Write-Debug " Parent Function - $($args[0])"
    Write-Information "Info: Parent Function - $($args[0])"
    Write-Output "Output: Parent Function - $($args[0])"
    Write-Verbose "Parent Function - $($args[0])"
    Write-Warning "Parent Function - $($args[0])"
    Start-Sleep -Seconds 1
    Test-Subfunction $args[0]
}

Function Test-Subfunction {
    Write-Host "Host: Child Function - $($args[0])"
    Write-Debug " Child Function - $($args[0])"
    Write-Information "Info: Child Function - $($args[0])"
    Write-Output "Output: Child Function - $($args[0])"
    Write-Verbose "Child Function - $($args[0])"
    Write-Warning "Child Function - $($args[0])"
    Start-Sleep -Seconds 1

    #Write-Progress -Activity 'activity' -Status 'status' -PercentComplete 50 -CurrentOperation 'currentoperation'
}