Office Profile Fixer

  1. Make sure all Microsoft Office applications are closed.
  2. Run the script!
$user = $env:username
$OfficePath = "C:\Users\$user\AppData\Local\Microsoft\Office"
if (Test-Path -Path $OfficePath) {
    Rename-Item $OfficePath "Office.old"

There is still an open Office application somewhere or the script isn't being run with administrative rights.

  1. Close all Microsoft Office applications.
  2. Run the script as an administrator.


  • Add check to the script to warn if it detects there's open Office applications before trying to rename the folder.
  • sysadmin/windows/tips_and_tricks/office_profile_fixer.txt
  • Last modified: 2019/09/28 04:38
  • by mjorgensen