Unable to mount VHD-file from PSU Automation

Product: PowerShell Universal
Version: 2.6.2


We are running PSU under IIS. We are using it to set up a server (or rather several remote-controlled from PSU) for transfer of large amounts of data between environments residing in different security domains. We have a setup that works but are evaluating other algorithms in order to increase transfer speeds. So, to make a long story shorter I need to mount a VHD file and extract contents from it. This works fine using the same account as the application pool in a powershell terminal, but fails when run from Automation. Execution just stops at this line under IIS:

$Drive = Mount-VHD $VHDFilePath -Passthru | Get-Disk | Get-Partition | Get-Volume

So I assume that there is some kind of execution policy preventing IIS from doing this, but I haven’t found anything in any logs and my googling has so far produced absolutely nothing, so I’m currently stumbling in the dark.

PSU indicates the job as failed, but I haven’t even been able to catch the actual error yet.

Does anyone have any idea where I should look at all?

I’ll try to replicate using a dev env not running under IIS, suspect it’ll work just fine then.


Hey Fredrik,

Have you looked in the PSU log to see if there is any info about the job failure? You can download logs by clicking Settings \ General \ Diagnostics. I wonder if there will be more info in there as to why the job may be failing.

1 Like

Ok, so this will make me look stupid now, but that’s life. I was looking at other workarounds for a day and turned back to try to find more log information for the initial problem. And…, suddenly it works.

My main theory right now is that I accidentally mangled my test data at the same time I introduced a major change, after which I’ve been looking at issues in the change rather than in the test setup.

I’ve now systematically worked back every change I made since, back to the state I was at when I had the issue, and I seem unable to repeat the problem unless I break my test data again.

1 Like

If I had a dollar for every time that happened to me :smile:. Thanks for sharing the outcome.

1 Like