test/test.psm1
Import-Module ..\uLog.psd1 -WarningAction SilentlyContinue Remove-Variable -Name uLOG -ErrorAction SilentlyContinue <# .DESCRIPTION This module tests how to write a log from a function in a module. It simulates for example a call from a schedule task which imports the module and call a function. In this case, no log object is set in the first place, we expect the uLog to manage the best way to use the log. As so, the log is writre inthe eventlog. #> function Test-Log { Log-Info -Message 'Hello from module' Log-Warning -Message 'Watch out ! from module' -Indent 3 Log-Info -Message 'Hello from module' } |