If the old certificate for RP already is in "Appdata" , "Rename-Item : Cannot create a file when that file already exists." raise.