Several months ago, I purchased a PICkit 4 programmer/debugger pod inasmuch as support for the PICkit 3 pod has been discontinued. I wanted to create a programmer profile for the PICkit 4 in the Microcode Studio "View / Compile and Program Options / Programmer Options" so that "Compile Program" would open the PIC programming CMD window and program the target.
Similar to the the PICkit 3 profile I specified the following:
Name of new Programmer: PICkit4
Programmer Executable: ipecmd.exe
File Location: c:\Program Files (x86)\microchip\mplabx\v5.30\mplab_platform\mplab_ ipe
Select Parameters: -TPPK4 -P$target-device$ -F$hex-filename$ -E -M -Y -OL -OB
or
-TSBURxxxxxxxxx -P$target-device$ -F$hex-filename$ -E -M -Y -OL -OB
(TSBURxxxxxxxxx is the PICkit 4's serial number)

(The parameter definitions can be found in the "Readme for IPECMD.htm" document in the directory ..\v5.30\docs)

I discovered that the PICkit 4 doesn't release the PIC's reset line automatically at the end of the programming sequence, as the PICkit 3 does. One of three solutions work:
(1) disconnect PICkit 4's USB or target cable (the most obvious)
(2) close the batch programming CMD window using "q<Enter>" (closing the CMD window with the upper r/h corner "X" won't release the reset)
(3) delete the "-OB" operator in the Parameter line, leaving -OL intact (this closes the CMD window automatically and releases the reset)

The "q<Enter>" option works the best for me as it leaves the CMD window open for inspection in the event of a programming problem