Product: PowerShell Universal
Version: 4.0.2
What is the correct syntax for creating new logging targets in 4.0.2? Ive tried what I found in a blog post:
New-PSULoggingTarget -Type 'file' -FilePath 'C:\ProgramData\PowerShellUniversal\Debug\log-System.txt' -Scope System
but -FilePath is not an accepted parameter. Ive also tried setting it in the -Properties parameter like this:
New-PSULoggingTarget -Type 'file' -Properties @{"Path = "'C:\ProgramData\PowerShellUniversal\Debug\log-System.txt' } -Scope System
and I just get an error stating that the property “Path” is not accepted (I also tried this with different property names, “file path”, “filepath”, “file” etc.) Im unable to create one inside PowerShell universal as I just get the error “Object not set to an instance of an object”