Skip to content

PowerShell 7 - Enable-LogFile: Object reference not set to an instance of an object. #9

@mlueckert

Description

@mlueckert

Dear All

When trying to use the module in PowerShell 7 I get the following error.

C:\> import-module PowerShellLogging
C:\> Enable-LogFile -Path "c:\temp\test.txt"

ErrorCallback Path             Streams DateTimeFormat
------------- ----             ------- --------------
              C:\temp\test.txt     All r
Enable-LogFile: Object reference not set to an instance of an object.

Thank you very much.
Marc

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.0.0
PSEdition                      Core
GitCommitId                    7.0.0
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
get-module -Name PowerShellLogging
                                                                                
ModuleType Version    PreRelease Name                                ExportedCom
---------- -------    ---------- ----                                -----------
Script     1.3.0                 PowerShellLogging                   {Disable-Lo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions