Please use the script to take the ownership of a file or folder
Path - you can specifies your files or folder which you want to take ownership
Path = r'C:\Users\Administrator\Documents\output.txt'
It should be run as a "system user".
This script should be run as a System User