Closes #22951 Thanks to Sorikoff for the initial script (cherry picked from commit 75a987ccf83becd140fb71b75acb0269f9a98323)