Skip to content
This repository was archived by the owner on Jun 12, 2023. It is now read-only.
This repository was archived by the owner on Jun 12, 2023. It is now read-only.

AzureInformationProtection does not work #12

@vrdse

Description

@vrdse

Steps to reproduce

Import-Module "C:\Program Files (x86)\Microsoft Azure Information Protection\Powershell\AzureInformationProtection"
Get-ChildItem | ForEach-Object { Get-AIPFileStatus $_.FullName }

Expected behavior

An object of the `Microsoft.InformationProtection.Powershell.AIP.Results.GetAIPFileStatusResult` is returned for each item.

Actual behavior

The following error is thrown for each item.

PSMessageDetails      :
Exception             : System.TypeInitializationException: The type initializer for 'NLog.LogManager' threw an exception.
                         ---> System.TypeInitializationException: The type initializer for 'NLog.LogFactory' threw an exception.
                         ---> System.MissingMethodException: Method not found: 'System.String System.AppDomainSetup.get_ConfigurationFile()'.
                           at NLog.Internal.Fakeables.AppDomainWrapper..ctor(AppDomain appDomain)
                           at NLog.Internal.Fakeables.AppDomainWrapper.get_CurrentDomain()
                           at NLog.LogFactory.get_CurrentAppDomain()
                           at NLog.LogFactory..cctor()
                           --- End of inner exception stack trace ---
                           at NLog.LogFactory..ctor()
                           at NLog.LogManager..cctor()
                           --- End of inner exception stack trace ---
                           at NLog.LogManager.GetLogger(String name)
                           at Microsoft.InformationProtection.Lib.NLogConfiguration.GetAssemblyLogger()
                           at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
                        --- End of stack trace from previous location where exception was thrown ---
                           at System.Lazy`1.CreateValue()
                           at Microsoft.InformationProtection.Powershell.AIP.Commandlets.AIPBaseCmdlet.HandleTerminatingException(Exception ex, ErrorCategory errorCategory, String message, Exception forwardException, Object target,
                        String errorId, Boolean isAnError)
                           at Microsoft.InformationProtection.Powershell.AIP.Commandlets.AIPBaseScannerCmdlet.BeginProcessing()
                           at System.Management.Automation.Cmdlet.DoBeginProcessing()
                           at System.Management.Automation.CommandProcessorBase.DoBegin()
TargetObject          :
CategoryInfo          : NotSpecified: (:) [Get-AIPFileStatus], TypeInitializationException
FullyQualifiedErrorId : System.TypeInitializationException,Microsoft.InformationProtection.Powershell.AIP.Commandlets.GetAIPFileStatusCmdLet
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}

Environment data

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.0.0-preview.3
PSEdition                      Core
GitCommitId                    7.0.0-preview.3
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

AzureInformationProtection module version:
ModuleVersion = '2.2.19.0'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions