I am using the following to add in the AzureAD
Import-Module AzureAD -UseWindowsPowerShell
I have also added in 'AzureAD' = '2.*' in the requirements.psd1
Yet when I run the function I am getting the following error message:
ERROR: Failed to generate proxies for remote module 'AzureAD'. The -OutputModule parameter does not resolve to a path, and a user module path cannot be found for the provided name.Exception :Type : System.InvalidOperationExceptionMessage : Failed to generate proxies for remote module 'AzureAD'. The -OutputModule parameter does not resolve to a path, and a user module path cannot be found for the provided name.InnerException :Type : System.Management.Automation.CmdletInvocationExceptionErrorRecord :Exception :Type : System.ArgumentExceptionMessage : The -OutputModule parameter does not resolve to a path, and a user module path cannot be found for the provided name.TargetSite :Name : ThrowTerminatingErrorDeclaringType : System.Management.Automation.MshCommandRuntime, System.Management.Automation, Version=7.2.4.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35MemberType : MethodModule : System.Management.Automation.dllSource : System.Management.AutomationHResult : -2147024809StackTrace :at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)TargetObject : Microsoft.PowerShell.Commands.ExportPSSessionCommandCategoryInfo : InvalidArgument: (Microsoft.PowerShel…ortPSSessionCommand:ExportPSSessionCommand) [Export-PSSession], ArgumentExceptionFullyQualifiedErrorId : ExportPSSession_ErrorModuleNameOrPath,Microsoft.PowerShell.Commands.ExportPSSessionCommandInvocationInfo :MyCommand : Export-PSSessionHistoryId : 1InvocationName : Export-PSSessionCommandOrigin : InternalScriptStackTrace : at , C:\home\site\wwwroot\TimerTrigger1\run.ps1: line 3TargetSite :Name : InvokeDeclaringType : System.Management.Automation.Runspaces.PipelineBase, System.Management.Automation, Version=7.2.4.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35MemberType : MethodModule : System.Management.Automation.dllMessage : The -OutputModule parameter does not resolve to a path, and a user module path cannot be found for the provided name.InnerException :Type : System.ArgumentExceptionMessage : The -OutputModule parameter does not resolve to a path, and a user module path cannot be found for the provided name.TargetSite :Name : ThrowTerminatingErrorDeclaringType : System.Management.Automation.MshCommandRuntime, System.Management.Automation, Version=7.2.4.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35MemberType : MethodModule : System.Management.Automation.dllSource : System.Management.AutomationHResult : -2147024809StackTrace :at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)Source : System.Management.AutomationHResult : -2146233087StackTrace :at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)at System.Management.Automation.Runspaces.Pipeline.Invoke()at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings)at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings)at System.Management.Automation.RemoteDiscoveryHelper.InvokeNestedPowerShell(PowerShell powerShell, PSCmdlet cmdlet, PSInvocationSettings invocationSettings, String errorMessageTemplate, CancellationToken cancellationToken)+MoveNext()at System.Management.Automation.RemoteDiscoveryHelper.EnumerateWithCatch[T](IEnumerable1 enumerable, Action1 exceptionHandler)+MoveNext()HResult : -2146233079CategoryInfo : NotSpecified: (:) [Import-Module], InvalidOperationExceptionFullyQualifiedErrorId :




