Write-Host : The 'Write-Host' command was found in the module 'Microsoft.PowerShell.Utility', but the module could not be loaded

I got an error reported earlier and not sure what the issue is.
I have attached the log.
We are currently on version 2022.4.8335

Also as you can see in the log we are getting a message in the Acquire step where it says another deployment is currently uploading package, which delays our deployment.
ServerTasks-3234163.log.txt (47.2 KB)

Kind Regards,
Micheál Power

Hi @mikepower79,

Thank you for contacting Octopus Support.

Based on the error in the task logs, this looks to be something environmental on the machine this is running on:

10:38:38   Error    |       Write-Host : The 'Write-Host' command was found in the module 'Microsoft.PowerShell.Utility', but the module could not
10:38:38   Error    |       be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Utility'.
10:38:38   Error    |       At D:\Octopus\EU50APVD350-ITAAG89\Work\20230209103809-3234163-18209\Bootstrap.ps1:17 char:1

Have you tried re-running the task to see if the error occurs on another attempt? If that doesn’t work, you may try restarting that machine. Lastly, assuming this issue isn’t permissions related, I was able to find a Stackoverflow post where someone experienced the same issue and included instructions on how they fixed it.

Let us know if any of the above proves helpful. If you have any additional questions, please don’t hesitate to ask.

Best Regards,

Thanks for the reply Donny, I will take a look into the fix and get back to you.


Hi @donny.bell,
It is an environmental issue with AV scanning on servers. Our network team resolved the issue.
Thanks for your help.

Kind Regards,
Micheál Power

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.