As i understand it, WMF is not applicable to Windows server 2016 (which is what that image runs on).
Powershell is already version 5.1 on all images.
This may have to do with custom powershell host. Can you try to launch your script in a new instance of powershell via RDP

Running the build in a bare PowerShell host does call the intended function correctly. However, I'm going to work around this and will no longer have this issue (I'll be using a different function entirely). Thanks for the tip. Picture attached.