PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

EXO module 3.2.0 fails with Beta release 3.0.19-beta19 in Azure Automation

Open satyajit321 opened this issue 2 years ago • 7 comments

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest released version
  • [X] Search the existing issues.

Steps to reproduce

Once the module is updated to the beta one using Deploy to Azure Automation ( https://www.powershellgallery.com/packages/PowerShellGet/3.0.19-beta19) , it starts giving error on all EXO connections and cmdlets.

Expected behavior

EXO cmdlets to function as usual.
Connect-ExchangeOnline
Get-EXOMailbox

Actual behavior

Runbook job fails with error almost immediately.
Could not find file 'C:\Users\Client\Temp\d727d108-ef5f-4f03-ba69-3710bb36901f\tmpEXO_0gnprbg4.w0l.psd1'. (Could not find file 'C:\Users\Client\Temp\d727d108-ef5f-4f03-ba69-3710bb36901f\tmpEXO_0gnprbg4.w0l.psd1'.)

Click here for troubleshooting help
https://aka.ms/troubleshoot-runbooks

Error details

[exception=System.Management.Automation.RuntimeException: Could not find file 'C:\Users\Client\Temp\1ed07d87-5a75-48ab-9af8-d789d94da37b\tmpEXO_3v0dnrzt.icr.psd1'. ---> System.IO.FileNotFoundException: Could not find file 'C:\Users\Client\Temp\1ed07d87-5a75-48ab-9af8-d789d94da37b\tmpEXO_3v0dnrzt.icr.psd1'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost) at Microsoft.PowerShell.PowerShellGet.Cmdlets.UpdateModuleManifest.EndProcessing() at System.Management.Automation.CommandProcessorBase.Complete()

Environment data

PS Version 5.1.0
EXO Module 3.2.0

PowerShellGet 3.0.19-beta19

Works on 2.2.5 version

Visuals

No response

satyajit321 avatar Sep 11 '23 06:09 satyajit321

Thanks for reporting this @satyajit321, can you confirm if this repos with our RC release? https://www.powershellgallery.com/packages/Microsoft.PowerShell.PSResourceGet/0.9.0-rc1

SydneyhSmith avatar Sep 11 '23 18:09 SydneyhSmith

Sorry, I don't have a test environment to test it. Just wanted to call out the impact that was remediated post rollback. I'll give it a shot locally maybe and if it repros share the info.

satyajit321 avatar Sep 12 '23 04:09 satyajit321

PS satyajit.- Connect-ExchangeOnlin.txt PS - get-module powershellget.txt Attached the repro locally. We get the errors. Let me know, if there is another way to enforce the RC release (if so I would need steps). One file has the install cmdlets, others the error and module versions.

satyajit321 avatar Sep 12 '23 04:09 satyajit321

@satyajit321 Is the error happening when you run Connect-ExchangeOnline? Or are you having trouble installing ExchangeOnlineManagement? From the first file you attached it looks like the error occurs after running Connect-ExchangeOnline so this is likely an issue with ExchangeOnlineManagement, not PSResourceGet.

alerickson avatar Sep 12 '23 05:09 alerickson

Yes, It happens with ExchangeOnlineManagement as a result of the issue with PS Get. As it appears something is getting changed there, as EXO module isn't. So this has to be something between EXO <-> PSGet.

EXO module same - works with current PS Get EXO module same - doesn't work with new PS Get

So I'm not certain its EXO module in fault there, unless there is something changed in PS Get, that EXO team needs to work and fix forward.

satyajit321 avatar Sep 12 '23 10:09 satyajit321

@satyajit321 do the contents of the ExchangeOnlineManagement directory after installation look the same when using PowerShellGet 2.2.5 and PSResourceGet?

alerickson avatar Sep 12 '23 15:09 alerickson

Don't see anything that pops out, can you tell me what we are looking for. C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement

satyajit321 avatar Sep 13 '23 07:09 satyajit321