Has anybody out there managed to wrap the Opatch process into a PowerShell script? We are currently using the Oracle 19 64-bit runtime client. The product installs just fine on remote systems via a PowerShell routine however, there is a required OPatch that must be run as well…and that part is not going so well.
So far, I've been able to rename/backup the OPatch directory after the runtime client install. It then recreates the OPatch directory with the new OPatch version that is needed to install the required patch. I can set the “INVENTORY_LOC” env variable on the remote system at the machine level, stop the MSDTC service, set the “ORACLE_HOME” env variable and extract the new patch.
However, when I try running OPatch on the remote system…it runs, no errors returned, takes 1 second (so I know it didn't do anything) and there's no log file in the inventory.
We have a batch file that does work but if/when BAT files go away then I'll need the ps routine to work.