Please refer this script if you want to apply a configuration file in XML format through procedure.
NOTE:
In $Path="C:\ProgramData\config.xml" #please give your own path of the configuration file in xml format
run the script a logged in user.
Please run this script as system user